diff --git a/.gitignore b/.gitignore
index 89fab064ccd7d05bccee889818d8ef84ffb65fb8..514801379cadb2d6bad3e3ff02bebe0604a6910b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,4 +54,4 @@ lib/
 env/
 
 # CPMD files
-parser/parser-cpmd/cpmdparser.egg-info/
+cpmdparser.egg-info/
diff --git a/parser/parser-cpmd/cpmdparser/__init__.py b/parser/parser-cpmd/cpmdparser/__init__.py
deleted file mode 100644
index efb4c8f960c3f52dde7431b8497f78add696f815..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from cpmdparser.parser import CPMDParser
diff --git a/parser/parser-cpmd/cpmdparser/generic/__init__.py b/parser/parser-cpmd/cpmdparser/generic/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/parser/parser-cpmd/cpmdparser/generic/inputparsing.py b/parser/parser-cpmd/cpmdparser/generic/inputparsing.py
deleted file mode 100644
index daf45f607b8d3008376b9805cd60fb295018c896..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/generic/inputparsing.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from builtins import str
-from builtins import object
-import logging
-from collections import defaultdict
-logger = logging.getLogger("nomad")
-
-
-metainfo_section_prefix = "x_cpmd_section_input_"
-metainfo_data_prefix = "x_cpmd_input_"
-
-
-#===============================================================================
-class Section(object):
-    """An input section in a CPMD calculation.
-    """
-    def __init__(self, name, description=None):
-        self.accessed = False
-        self.name = name
-        self.description = description
-        self.keywords = defaultdict(list)
-        self.subsections = {}
-        self.default_keyword = None
-
-    def get_keyword(self, name):
-        keyword = self.keywords.get(name)
-        if keyword:
-            if len(keyword) == 1:
-                return keyword[0]
-            else:
-                logger.error("The keyword '{}' in '{}' does not exist or has too many entries.".format(name, self.name))
-
-    def get_section(self, name):
-        return self.subsections.get(name)
-
-
-#===============================================================================
-class Keyword(object):
-    """Keyword in a CPMD input file.
-    """
-    def __init__(self, name, description=None):
-        self.accessed = False
-        self.name = name
-        self.unique_name = None
-        self.available_options = []
-        self.options = None
-        self.parameters = None
-        self.description = description
diff --git a/parser/parser-cpmd/cpmdparser/parser.py b/parser/parser-cpmd/cpmdparser/parser.py
deleted file mode 100644
index b97a3c37000ffbcc44d8c722935d79be7746e21a..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/parser.py
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from builtins import next
-from builtins import range
-import os
-import re
-import logging
-import importlib
-from nomadcore.baseclasses import ParserInterface
-logger = logging.getLogger("nomad")
-
-
-class CPMDRunType(object):
-    def __init__(self, module_name, class_name):
-        self.module_name = module_name
-        self.class_name = class_name
-
-
-class CPMDParser(ParserInterface):
-    """This class handles the initial setup before any parsing can happen. It
-    determines which version of CPMD was used to generate the output and then
-    sets up a correct main parser.
-
-    After the implementation has been setup, you can parse the files with
-    parse().
-    """
-    def __init__(self, metainfo_to_keep=None, backend=None, default_units=None, metainfo_units=None, debug=True, log_level=logging.ERROR, store=True):
-        super(CPMDParser, self).__init__(metainfo_to_keep, backend, default_units, metainfo_units, debug, log_level, store)
-
-    def setup_version(self):
-        """Setups the version by looking at the output file and the version
-        specified in it.
-        """
-        # Search for the CPMD version specification and the run type for the
-        # calculation. The correct and optimized parser is initialized based on
-        # this information.
-        regex_version = re.compile("\s+VERSION ([\d\.]+)")
-        regex_single_point = re.compile(r" SINGLE POINT DENSITY OPTIMIZATION")
-        regex_geo_opt = re.compile(r" OPTIMIZATION OF IONIC POSITIONS")
-        regex_md = re.compile(r"( CAR-PARRINELLO MOLECULAR DYNAMICS)|( BORN-OPPENHEIMER MOLECULAR DYNAMICS)")
-        regex_vib = re.compile(r" PERFORM A VIBRATIONAL ANALYSIS BY FINITE DIFFERENCES")
-        regex_prop = re.compile(r" CALCULATE SOME PROPERTIES")
-        run_type = None
-        n_lines = 1000
-        version_id = None
-        with open(self.parser_context.main_file, 'r') as outputfile:
-            for i_line in range(n_lines):
-                try:
-                    line = next(outputfile)
-                except StopIteration:
-                    break
-
-                # Look for version
-                result_version = regex_version.match(line)
-                if result_version:
-                    version_id = result_version.group(1).replace('.', '')
-
-                # Look for geometry optimization
-                result_geo_opt = regex_geo_opt.match(line)
-                if result_geo_opt:
-                    run_type = CPMDRunType(module_name="geooptparser", class_name="CPMDGeoOptParser")
-
-                # Look for single point calculation
-                result_single_point = regex_single_point.match(line)
-                if result_single_point:
-                    run_type = CPMDRunType(module_name="singlepointparser", class_name="CPMDSinglePointParser")
-
-                # Look for MD calculation
-                result_md = regex_md.match(line)
-                if result_md:
-                    run_type = CPMDRunType(module_name="mdparser", class_name="CPMDMDParser")
-
-                # Look for vibrational analysis
-                result_vib = regex_vib.match(line)
-                if result_vib:
-                    run_type = CPMDRunType(module_name="vibrationparser", class_name="CPMDVibrationParser")
-
-                # Look for properties calculation
-                result_prop = regex_prop.match(line)
-                if result_prop:
-                    run_type = CPMDRunType(module_name="propertiesparser", class_name="CPMDPropertiesParser")
-
-        if version_id is None:
-            msg = "Could not find a version specification from the given main file."
-            logger.exception(msg)
-            raise RuntimeError(msg)
-
-        if run_type is None:
-            msg = "Could not find a run type specification from the given main file at: {}".format(self.parser_context.main_file)
-            logger.exception(msg)
-            raise RuntimeError(msg)
-
-        # Setup the root folder to the fileservice that is used to access files
-        dirpath, filename = os.path.split(self.parser_context.main_file)
-        dirpath = os.path.abspath(dirpath)
-        self.parser_context.file_service.setup_root_folder(dirpath)
-        self.parser_context.file_service.set_file_id(filename, "output")
-
-        # Setup the correct main parser based on the version id. If no match
-        # for the version is found, use the main parser for CPMD 4.1
-        self.setup_main_parser(version_id, run_type)
-
-    def get_metainfo_filename(self):
-        return "cpmd.nomadmetainfo.json"
-
-    def get_parser_info(self):
-        return {'name': 'cpmd-parser', 'version': '1.0'}
-
-    def setup_main_parser(self, version_id, run_type):
-        # Currently the version id is a pure integer, so it can directly be mapped
-        # into a package name.
-        base = "cpmdparser.versions.cpmd{}.{}".format(version_id, run_type.module_name)
-        parser_module = None
-        parser_class = None
-        try:
-            parser_module = importlib.import_module(base)
-        except ImportError:
-            logger.warning("Could not find a parser for version '{}'. Trying to default to the base implementation for CPMD 4.1".format(version_id))
-            base = "cpmdparser.versions.cpmd41.{}".format(run_type.module_name)
-            try:
-                parser_module = importlib.import_module(base)
-            except ImportError:
-                logger.exception("Tried to default to the CPMD 4.1 implementation but could not find the correct module.")
-                raise
-        try:
-            parser_class = getattr(parser_module, "{}".format(run_type.class_name))
-        except AttributeError:
-            logger.exception("A parser class '{}' could not be found in the module '[]'.".format(run_type.class_name, parser_module))
-            raise
-        self.main_parser = parser_class(self.parser_context)
diff --git a/parser/parser-cpmd/cpmdparser/scalainterface.py b/parser/parser-cpmd/cpmdparser/scalainterface.py
deleted file mode 100644
index d15ab1bebd424583c1a1aca7996c774cd9c432eb..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/scalainterface.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-"""
-This is the access point to the parser for the scala layer in the
-nomad project.
-"""
-from __future__ import absolute_import
-import sys
-import setup_paths
-from nomadcore.parser_backend import JsonParseEventsWriterBackend
-from cpmdparser import CPMDParser
-
-
-if __name__ == "__main__":
-
-    # Initialise the parser with the main filename and a JSON backend
-    main_file = sys.argv[1]
-    parser = CPMDParser(backend=JsonParseEventsWriterBackend)
-    parser.parse(main_file)
diff --git a/parser/parser-cpmd/cpmdparser/setup_paths.py b/parser/parser-cpmd/cpmdparser/setup_paths.py
deleted file mode 100644
index 4b51dde6b7033423925fdd677509342eea4da6d0..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/setup_paths.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-"""
-Setups the python-common library in the PYTHONPATH system variable.
-"""
-import sys
-import os
-import os.path
-
-baseDir = os.path.dirname(os.path.abspath(__file__))
-commonDir = os.path.normpath(os.path.join(baseDir, "../../../../../python-common/common/python"))
-parserDir = os.path.normpath(os.path.join(baseDir, "../../parser-cpmd"))
-
-# Using sys.path.insert(1, ...) instead of sys.path.insert(0, ...) based on
-# this discusssion:
-# http://stackoverflow.com/questions/10095037/why-use-sys-path-appendpath-instead-of-sys-path-insert1-path
-if commonDir not in sys.path:
-    sys.path.insert(1, commonDir)
-    sys.path.insert(1, parserDir)
diff --git a/parser/parser-cpmd/cpmdparser/tools/__init__.py b/parser/parser-cpmd/cpmdparser/tools/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/parser/parser-cpmd/cpmdparser/tools/input_structure_generation.py b/parser/parser-cpmd/cpmdparser/tools/input_structure_generation.py
deleted file mode 100644
index efbca21761b432d955501314d3b0d7ad1fd13494..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/tools/input_structure_generation.py
+++ /dev/null
@@ -1,280 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-"""
-Used to read the CPMD manual .tex file and generate the input file structure
-from it. From the structure one can automatically generate the metainfo
-definitions and the pickle file that is used to validate the structure during
-parsing.
-"""
-import re
-import json
-import pickle
-from cpmdparser.generic.inputparsing import Section, Keyword, metainfo_data_prefix, metainfo_section_prefix
-
-
-#===============================================================================
-def generate_input_tree(filepath):
-
-    with open(filepath, "r") as fin:
-        lines = fin.readlines()
-
-    # Create the sections
-    section_regex_string = "\\\> \\\&(\w+) \.\.\.\s+\\\> \\\&END  \\\>  \$"
-    section_regex = re.compile(section_regex_string)
-    root_section = Section("", "The root section for CPMD input. Contains all the other input sections.")
-
-    for i_line in range(len(lines)):
-        line = lines[i_line]
-        match = section_regex.match(line)
-        if match:
-            section_name = match.groups()[0]
-            section = Section(section_name)
-
-            desc_end = "\>"
-            desc_ended = False
-            description = []
-            i_line_desc = 1
-            while not desc_ended:
-                desc_line = lines[i_line + i_line_desc]
-                i_line_desc += 1
-                if desc_line.startswith(desc_end):
-                    desc_ended = True
-                else:
-                    description.append(desc_line.strip()[0:-2])
-            section.description = " ".join(description)
-            if section_name in root_section.subsections:
-                raise KeyError("Multiple sections with the same name")
-            root_section.subsections[section_name] = section
-
-    # Create the keywords
-    keyword_regex_string = r"\\keyword\{([\w ]+)\}\{(.*?)\}\{(.*?)\}\{(.*?)\}\{\\&(\w+)\}"
-    keyword_regex = re.compile(keyword_regex_string)
-    spekeyword_regex_string = r"\\spekeyword\{(\w+)\}\{(.*?)\}\{(.*?)\}\{(.*?)\}\{\\&(\w+)\}\{(\w+)\}"
-    spekeyword_regex = re.compile(spekeyword_regex_string)
-
-    for i_line in range(len(lines)):
-        line = lines[i_line]
-        keywordmatch = keyword_regex.match(line)
-        spekeywordmatch = spekeyword_regex.match(line)
-        if keywordmatch or spekeywordmatch:
-            if keywordmatch:
-                groups = keywordmatch.groups()
-            elif spekeywordmatch:
-                groups = spekeywordmatch.groups()
-            keyword_name = groups[0]
-            # print(keyword_name)
-            # if keyword_name == "OPTIMIZE WAVEFUNCTION":
-                # print("FOUND")
-            available_options1 = groups[1]
-            available_options2 = groups[2]
-            parent_section_name = groups[4]
-            keyword = Keyword(keyword_name)
-            if spekeywordmatch:
-                unique_name = groups[5]
-                keyword.unique_name = unique_name
-            else:
-                keyword.unique_name = keyword_name
-
-            # Parse the available options in the first list
-            if available_options1:
-                available_options = available_options1.split(",")
-                for option in available_options:
-                    if "=" in option:
-                        option_split = option.split("=")
-                        option_name = option_split[0]
-                    else:
-                        option_name = option
-                    option_name = re.sub(r"[\{\}\[\]\\ ]", "", option_name)
-                    keyword.available_options.append(option_name)
-                # print(keyword.available_options)
-
-            # Parse the available options in the second list
-            if available_options2:
-                available_options = available_options2.split(",")
-                for option in available_options:
-                    if "=" in option:
-                        option_split = option.split("=")
-                        option_name = option_split[0]
-                    else:
-                        option_name = option
-                    option_name = re.sub(r"[\{\}\[\]\\ ]", "", option_name)
-                    keyword.available_options.append(option_name)
-                # print(keyword.available_options)
-
-            # Parse the description
-            desc_ended = False
-            description = []
-            i_line_desc = 1
-            n_braces = 0
-            while not desc_ended:
-                desc_line = lines[i_line + i_line_desc]
-                i_line_desc += 1
-                for i_char, character in enumerate(desc_line):
-                    if character == "{":
-                        n_braces += 1
-                    elif character == "}":
-                        n_braces -= 1
-                        if n_braces == 0:
-                            # if desc_line.startswith("\desc{"):
-                                # desc_line = desc_line
-                            description.append(desc_line[0:i_char].strip())
-                            desc_ended = True
-                if n_braces != 0:
-                    full_line = desc_line.strip()
-                    # if full_line.startswith("\desc{"):
-                        # full_line = full_line[6:]
-                    if full_line.endswith(r"\\"):
-                        full_line = full_line[:-2]
-                    if full_line == "%":
-                        full_line = "\n"
-                    description.append(full_line)
-            keyword.description = " ".join(description)
-            if keyword.description.startswith("\desc{"):
-                keyword.description = keyword.description[6:]
-                # print("DESC")
-
-            parent_section = root_section.subsections[parent_section_name]
-            parent_section.keywords[keyword_name].append(keyword)
-
-    return root_section
-
-
-#===============================================================================
-def generate_pickle(filepath):
-    input_tree = generate_input_tree(filepath)
-    file_name = "../versions/cpmd41/input_data/cpmd_input_tree.pickle"
-    fh = open(file_name, "wb")
-    pickle.dump(input_tree, fh, protocol=2)
-
-
-#===============================================================================
-def generate_input_metainfos(filepath):
-
-    json_root = {
-        "type": "nomad_meta_info_1_0",
-        "description": "Metainfo for the values parsed from a CPMD input file.",
-        "dependencies": [ {
-            "relativePath": "cpmd.general.nomadmetainfo.json"
-            }],
-    }
-
-    root = generate_input_tree(filepath)
-    parent = None
-    root.name = ""
-    root.description = "Contains the CPMD input file contents."
-    container = []
-    generate_metainfo_recursively(root, parent, container)
-    json_root["metaInfos"] = container
-    with open("input_metainfo.json", "w") as f:
-        f.write(json.dumps(json_root, indent=2, separators=(',', ': ')))
-
-
-#===============================================================================
-def generate_metainfo_recursively(section, parent, container):
-
-    json = generate_section_metainfo_json(section, parent)
-    container.append(json)
-    for subsection in section.subsections.values():
-        generate_metainfo_recursively(subsection, section, container)
-    for keyword_list in section.keywords.values():
-        for keyword in keyword_list:
-            key_json = generate_keyword_metainfo_json(keyword, section)
-            options_json = generate_options_metainfo_json(keyword, section)
-            parameter_json = generate_parameter_metainfo_json(keyword, section)
-            container.append(key_json)
-            container.append(options_json)
-            container.append(parameter_json)
-    if parent is not None:
-        def_json = generate_default_keyword_metainfo_json(section)
-    container.append(def_json)
-
-
-#===============================================================================
-def generate_keyword_metainfo_json(keyword, section):
-    json_obj = {}
-    json_obj["name"] = metainfo_section_prefix + "{}.{}".format(section.name, keyword.unique_name.replace(" ", "_"))
-    json_obj["superNames"] = [metainfo_section_prefix + "{}".format(section.name)]
-
-    # Description
-    description = keyword.description
-    if description is None or description.isspace():
-        description = "Settings for {}".format(keyword.unique_name.replace(" ", "_"))
-    json_obj["description"] = description
-    json_obj["kindStr"] = "type_section"
-
-    return json_obj
-
-
-#===============================================================================
-def generate_parameter_metainfo_json(keyword, section):
-    json_obj = {}
-    json_obj["name"] = metainfo_data_prefix + "{}.{}_parameters".format(section.name, keyword.unique_name).replace(" ", "_")
-    json_obj["description"] = "The parameters for keyword {}.".format(keyword.unique_name.replace(" ", "_"))
-    json_obj["superNames"] = [metainfo_section_prefix + "{}.{}".format(section.name, keyword.unique_name.replace(" ", "_"))]
-    json_obj["dtypeStr"] = "C"
-    json_obj["shape"] = []
-
-    return json_obj
-
-
-#===============================================================================
-def generate_options_metainfo_json(keyword, section):
-    json_obj = {}
-    json_obj["name"] = metainfo_data_prefix + "{}.{}_options".format(section.name, keyword.unique_name.replace(" ", "_"))
-    json_obj["description"] = "The options given for keyword {}.".format(keyword.unique_name.replace(" ", "_"))
-    json_obj["superNames"] = [metainfo_section_prefix + "{}.{}".format(section.name, keyword.unique_name.replace(" ", "_"))]
-    json_obj["dtypeStr"] = "C"
-    json_obj["shape"] = []
-
-    return json_obj
-
-
-#===============================================================================
-def generate_default_keyword_metainfo_json(section):
-    json_obj = {}
-    json_obj["name"] = metainfo_data_prefix + "{}_default_keyword".format(section.name)
-    json_obj["description"] = "The parameters that are present in the section {} even without a keyword.".format(section.name)
-    json_obj["superNames"] = [metainfo_section_prefix + "{}".format(section.name)]
-    json_obj["dtypeStr"] = "C"
-    json_obj["shape"] = []
-
-    return json_obj
-
-
-#===============================================================================
-def generate_section_metainfo_json(section, parent):
-    json_obj = {}
-
-    if parent is None:
-        json_obj["name"] = "x_cpmd_section_input"
-        json_obj["superNames"] = ["section_run"]
-    else:
-        json_obj["name"] = metainfo_section_prefix + "{}".format(section.name.replace(" ", "_"))
-        json_obj["superNames"] = ["x_cpmd_section_input"]
-    json_obj["kindStr"] = "type_section"
-
-    description = section.description
-    if description is None or description.isspace():
-        description = "Settings for {}".format(section.name)
-    json_obj["description"] = description
-
-    return json_obj
-
-
-#===============================================================================
-if __name__ == "__main__":
-    filepath = "../versions/cpmd41/input_data/manual.tex"
-    generate_pickle(filepath)
-    # generate_input_metainfos(filepath)
diff --git a/parser/parser-cpmd/cpmdparser/versions/__init__.py b/parser/parser-cpmd/cpmdparser/versions/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/__init__.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/commonparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/commonparser.py
deleted file mode 100644
index 58238cd17eb0e352c16cd4ecb68d34959007059d..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/commonparser.py
+++ /dev/null
@@ -1,509 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-import re
-import logging
-import datetime
-import calendar
-import numpy as np
-from nomadcore.baseclasses import CommonParser
-from nomadcore.simple_parser import SimpleMatcher as SM
-from nomadcore.unit_conversion.unit_conversion import convert_unit
-from .inputparser import CPMDInputParser
-logger = logging.getLogger("nomad")
-
-
-class CPMDCommonParser(CommonParser):
-    """
-    This class is used to store and instantiate common parts of the
-    hierarchical SimpleMatcher structure used in the parsing of a CPMD
-    calculation.
-    """
-    def __init__(self, parser_context):
-        super(CPMDCommonParser, self).__init__(parser_context)
-
-        #=======================================================================
-        # Globally cached values
-        self.cache_service.add("initial_positions", single=False, update=False)
-        self.cache_service.add("atom_labels", single=False, update=False)
-        self.cache_service.add("number_of_atoms", single=False, update=False)
-        self.cache_service.add("simulation_cell", single=False, update=False)
-        self.cache_service.add("n_steps")
-        self.cache_service.add("ensemble_type")
-        self.cache_service.add("time_step_ions")
-
-        self.cache_service.add("trajectory_range", False)
-        self.cache_service.add("trajectory_sample", False)
-        self.cache_service.add("print_freq", 1)
-        self.cache_service.add("configuration_periodic_dimensions", single=False, update=False)
-
-        self.cache_service.add("single_configuration_calculation_to_system_ref", single=False, update=True)
-        self.cache_service.add("single_configuration_to_calculation_method_ref", single=False, update=False)
-
-    #===========================================================================
-    # Common SimpleMatchers
-    def header(self):
-        """Returns the simplematcher that parser the CPMD header containng the
-        starting information. Common to all run types.
-        """
-        return SM( " PROGRAM CPMD STARTED AT",
-            forwardMatch=True,
-            sections=["x_cpmd_section_start_information"],
-            subMatchers=[
-                SM( " PROGRAM CPMD STARTED AT: (?P<x_cpmd_start_datetime>{})".format(self.regexs.eol)),
-                SM( "\s+VERSION (?P<program_version>\d+\.\d+)"),
-                SM( r"\s+\*\*\*  (?P<x_cpmd_compilation_date>[\s\w\-:\d]+)  \*\*\*$"),
-                SM( " THE INPUT FILE IS:\s+(?P<x_cpmd_input_filename>{})".format(self.regexs.eol)),
-                SM( " THIS JOB RUNS ON:\s+(?P<x_cpmd_run_host_name>{})".format(self.regexs.eol)),
-                SM( " THE PROCESS ID IS:\s+(?P<x_cpmd_process_id>{})".format(self.regexs.int)),
-                SM( " THE JOB WAS SUBMITTED BY:\s+(?P<x_cpmd_run_user_name>{})".format(self.regexs.eol)),
-            ]
-        )
-
-    def method(self):
-        """Returns the simplematcher that parses informatio about the method
-        used. Common to all run types.
-        """
-        return SM( "(?: SINGLE POINT DENSITY OPTIMIZATION)|(?: OPTIMIZATION OF IONIC POSITIONS)|(?: CAR-PARRINELLO MOLECULAR DYNAMICS)|(?: BORN-OPPENHEIMER MOLECULAR DYNAMICS)",
-            subMatchers=[
-                SM( " USING SEED",
-                    forwardMatch=True,
-                    sections=["x_cpmd_section_run_type_information"],
-                    subMatchers=[
-                        SM( " USING SEED\s+{}\s+TO INIT. PSEUDO RANDOM NUMBER GEN.".format(self.regexs.int)),
-                        SM( " PATH TO THE RESTART FILES:\s+{}".format(self.regexs.eol)),
-                        SM( " GRAM-SCHMIDT ORTHOGONALIZATION"),
-                        SM( " ITERATIVE ORTHOGONALIZATION",
-                            subMatchers={
-                                SM("    MAXIT:\s+{}".format(self.regexs.int)),
-                                SM("    EPS:\s+{}".format(self.regexs.float)),
-                            }
-                        ),
-                        SM( " MAXIMUM NUMBER OF STEPS:\s+(?P<x_cpmd_max_steps>{}) STEPS".format(self.regexs.int)),
-                        SM( " MAXIMUM NUMBER OF ITERATIONS FOR SC:\s+(?P<scf_max_iteration>{}) STEPS".format(self.regexs.int)),
-                        SM( " PRINT INTERMEDIATE RESULTS EVERY\s+{} STEPS".format(self.regexs.int)),
-                        SM( " STORE INTERMEDIATE RESULTS EVERY\s+{} STEPS".format(self.regexs.int)),
-                        SM( " STORE INTERMEDIATE RESULTS EVERY\s+{} SELF-CONSISTENT STEPS".format(self.regexs.int)),
-                        SM( " NUMBER OF DISTINCT RESTART FILES:\s+{}".format(self.regexs.int)),
-                        SM( " TEMPERATURE IS CALCULATED ASSUMING EXTENDED BULK BEHAVIOR"),
-                        SM( " FICTITIOUS ELECTRON MASS:\s+{}".format(self.regexs.float)),
-                        SM( " TIME STEP FOR ELECTRONS:\s+(?P<x_cpmd_time_step_electrons__hbar_hartree_1>{})".format(self.regexs.float)),
-                        SM( " TIME STEP FOR IONS:\s+(?P<x_cpmd_time_step_ions__hbar_hartree_1>{})".format(self.regexs.float)),
-
-                        SM( " TRAJECTORIES ARE SAVED ON FILE"),
-                        SM( " TRAJEC\.xyz IS SAVED ON FILE"),
-                        SM( " ELECTRON DYNAMICS:"),
-                        SM( " ION DYNAMICS:(?P<x_cpmd_ion_temperature_control>{})".format(self.regexs.eol)),
-
-                        SM( " CONVERGENCE CRITERIA FOR WAVEFUNCTION OPTIMIZATION:\s+(?P<scf_threshold_energy_change__hartree>{})".format(self.regexs.float)),
-                        SM( " WAVEFUNCTION OPTIMIZATION BY PRECONDITIONED DIIS"),
-                        SM( " THRESHOLD FOR THE WF-HESSIAN IS\s+{}".format(self.regexs.float)),
-                        SM( " MAXIMUM NUMBER OF VECTORS RETAINED FOR DIIS:\s+{}".format(self.regexs.int)),
-                        SM( " STEPS UNTIL DIIS RESET ON POOR PROGRESS:\s+{}".format(self.regexs.int)),
-                        SM( " FULL ELECTRONIC GRADIENT IS USED".format(self.regexs.int)),
-
-                        SM( " CONVERGENCE CRITERIA FOR GEOMETRY OPTIMIZATION:\s+(?P<geometry_optimization_threshold_force__hartree_bohr_1>{})".format(self.regexs.float)),
-                        SM( " GEOMETRY OPTIMIZATION BY (?P<x_cpmd_geo_opt_method>(?:GDIIS/BFGS)|(?:LOW-MEMORY BFGS)|(?:CONJUGATE GRADIENT)|(?:STEEPEST DESCENT))"),
-                        SM( "   SIZE OF GDIIS MATRIX:\s+{}".format(self.regexs.int)),
-                        SM( "GEOMETRY OPTIMIZATION IS SAVED ON FILE {}".format(self.regexs.eol)),
-                        SM( " EMPIRICAL INITIAL HESSIAN (DISCO PARAMETRISATION)"),
-
-                        SM( " SPLINE INTERPOLATION IN G-SPACE FOR PSEUDOPOTENTIAL FUNCTIONS",
-                            subMatchers=[
-                                SM( "    NUMBER OF SPLINE POINTS:\s+{}".format(self.regexs.int)),
-                            ]
-                        ),
-                    ]
-                ),
-                SM( " EXCHANGE CORRELATION FUNCTIONALS",
-                    sections=["x_cpmd_section_xc_information"],
-                    subMatchers=[
-                        # SM( " PROGRAM CPMD STARTED AT: (?P<x_cpmd_start_datetime>{})".format(self.regexs.eol)),
-                    ]
-                ),
-            ]
-        )
-
-    def atoms(self):
-        """Returns the simplematcher that parses system information including
-        the atom labels, positions, and pseudopotentials. Common to all run
-        types.
-        """
-        return SM( re.escape(" ***************************** ATOMS ****************************"),
-            forwardMatch=True,
-            subMatchers=[
-                SM( re.escape(" ***************************** ATOMS ****************************"),
-                    sections=["x_cpmd_section_system_information"],
-                    subMatchers=[
-                        SM( "   NR   TYPE        X(BOHR)        Y(BOHR)        Z(BOHR)     MBL".replace("(", "\(").replace(")", "\)"),
-                            adHoc=self.ad_hoc_atom_information()
-                        ),
-                        SM( " CHARGE:\s+(?P<total_charge>{})".format(self.regexs.int)),
-                    ]
-                ),
-                SM( re.escape("    |    Pseudopotential Report"),
-                    sections=["x_cpmd_section_pseudopotential_information"],
-                ),
-                SM( re.escape(" *   ATOM       MASS   RAGGIO NLCC              PSEUDOPOTENTIAL *"),
-                    sections=["x_cpmd_section_atom_kinds"],
-                    subMatchers=[
-                        SM( " \*\s+(?P<x_cpmd_atom_kind_label>{0})\s+(?P<x_cpmd_atom_kind_mass>{1})\s+(?P<x_cpmd_atom_kind_raggio>{1})\s+(?P<x_cpmd_atom_kind_nlcc>{0})\s+(?P<x_cpmd_atom_kind_pseudopotential_l>{0})\s+(?P<x_cpmd_atom_kind_pseudopotential_type>{0})\s+\*".format(self.regexs.word, self.regexs.float),
-                            sections=["x_cpmd_section_atom_kind"],
-                            repeats=True,
-                        ),
-                    ]
-                ),
-            ]
-        )
-
-    def cell(self):
-        """Returns the simplematcher that parser the cell information. Common to all run types.
-        """
-        return SM( re.escape(" ************************** SUPERCELL ***************************"),
-            sections=["x_cpmd_section_supercell"],
-            subMatchers=[
-                SM( " SYMMETRY:\s+(?P<x_cpmd_cell_symmetry>{})".format(self.regexs.eol)),
-                SM( " LATTICE CONSTANT\(a\.u\.\):\s+(?P<x_cpmd_cell_lattice_constant>{})".format(self.regexs.float)),
-                SM( " CELL DIMENSION:\s+(?P<x_cpmd_cell_dimension>{})".format(self.regexs.eol)),
-                SM( " VOLUME\(OMEGA IN BOHR\^3\):\s+(?P<x_cpmd_cell_volume>{})".format(self.regexs.float)),
-                SM( " LATTICE VECTOR A1\(BOHR\):\s+(?P<x_cpmd_lattice_vector_A1>{})".format(self.regexs.eol)),
-                SM( " LATTICE VECTOR A2\(BOHR\):\s+(?P<x_cpmd_lattice_vector_A2>{})".format(self.regexs.eol)),
-                SM( " LATTICE VECTOR A3\(BOHR\):\s+(?P<x_cpmd_lattice_vector_A3>{})".format(self.regexs.eol)),
-                SM( " RECIP\. LAT\. VEC\. B1\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B1>{})".format(self.regexs.eol)),
-                SM( " RECIP\. LAT\. VEC\. B2\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B2>{})".format(self.regexs.eol)),
-                SM( " RECIP\. LAT\. VEC\. B3\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B3>{})".format(self.regexs.eol)),
-                SM( " RECIP\. LAT\. VEC\. B3\(2Pi/BOHR\):\s+(?P<x_cpmd_reciprocal_lattice_vector_B3>{})".format(self.regexs.eol)),
-                SM( " REAL SPACE MESH:\s+(?P<x_cpmd_real_space_mesh>{})".format(self.regexs.eol)),
-                SM( " WAVEFUNCTION CUTOFF\(RYDBERG\):\s+(?P<x_cpmd_wave_function_cutoff>{})".format(self.regexs.float)),
-                SM( " DENSITY CUTOFF\(RYDBERG\):          \(DUAL= 4\.00\)\s+(?P<x_cpmd_density_cutoff>{})".format(self.regexs.float)),
-                SM( " NUMBER OF PLANE WAVES FOR WAVEFUNCTION CUTOFF:\s+(?P<x_cpmd_number_of_planewaves_wave_function>{})".format(self.regexs.int)),
-                SM( " NUMBER OF PLANE WAVES FOR DENSITY CUTOFF:\s+(?P<x_cpmd_number_of_planewaves_density>{})".format(self.regexs.int)),
-            ]
-        )
-
-    def initialization(self):
-        """Returns the simplematcher that parser the atom initialization
-        information. Common to all run types.
-        """
-        return SM(" GENERATE ATOMIC BASIS SET",
-            forwardMatch=True,
-            sections=["x_cpmd_section_wave_function_initialization"],
-            subMatchers=[
-            ]
-        )
-
-    def footer(self):
-        """Returns the simplematcher that parser the CPMD footer containng the
-        ending information. Common to all run types.
-        """
-        return SM( re.escape(" *                            TIMING                            *"),
-            forwardMatch=True,
-            subMatchers=[
-                SM( re.escape(" *                            TIMING                            *"),
-                    sections=["x_cpmd_section_timing"],
-                    subMatchers=[
-                    ]
-                ),
-                SM( "       CPU TIME :",
-                    forwardMatch=True,
-                    sections=["x_cpmd_section_end_information"],
-                    subMatchers=[
-                        # SM( " PROGRAM CPMD STARTED AT: (?P<x_cpmd_start_datetime>{})".format(self.regexs.eol)),
-                    ]
-                )
-            ]
-        )
-
-    #===========================================================================
-    # onOpen triggers
-    def onOpen_section_method(self, backend, gIndex, section):
-        self.cache_service["single_configuration_to_calculation_method_ref"] = gIndex
-
-    def onOpen_section_system(self, backend, gIndex, section):
-        self.cache_service["single_configuration_calculation_to_system_ref"] = gIndex
-
-    #===========================================================================
-    # onClose triggers
-    def onClose_section_run(self, backend, gIndex, section):
-        backend.addValue("program_name", "CPMD")
-        backend.addValue("program_basis_set_type", "plane waves")
-
-    def onClose_section_single_configuration_calculation(self, backend, gIndex, section):
-        self.cache_service.addValue("single_configuration_calculation_to_system_ref")
-        self.cache_service.addValue("single_configuration_to_calculation_method_ref")
-
-    def onClose_section_system(self, backend, gIndex, section):
-        self.cache_service.addArrayValues("configuration_periodic_dimensions")
-
-    def onClose_section_method(self, backend, gIndex, section):
-        backend.addValue("electronic_structure_method", "DFT")
-        basis_id = backend.openSection("section_method_basis_set")
-        backend.addValue("method_basis_set_kind", "wavefunction")
-        backend.addValue("mapping_section_method_basis_set_cell_associated", 0)
-        backend.closeSection("section_method_basis_set", basis_id)
-
-    def onClose_x_cpmd_section_atom_kind(self, backend, gIndex, section):
-        # Atomic kinds
-        label = section.get_latest_value("x_cpmd_atom_kind_label")
-        number = self.get_atom_number(label)
-        id_kind = backend.openSection("section_method_atom_kind")
-        backend.addValue("method_atom_kind_atom_number", number)
-        backend.addValue("method_atom_kind_label", label)
-        backend.closeSection("section_method_atom_kind", id_kind)
-
-    def onClose_x_cpmd_section_start_information(self, backend, gIndex, section):
-        # Starting date and time
-        start_datetime = section.get_latest_value("x_cpmd_start_datetime")
-        timestamp = self.timestamp_from_string(start_datetime)
-        if timestamp:
-            start_date_stamp, start_wall_time = timestamp
-            backend.addValue("time_run_date_start", start_date_stamp)
-            backend.addValue("time_run_wall_start", start_wall_time)
-
-        # Input file
-        input_filename = section.get_latest_value("x_cpmd_input_filename")
-        input_filepath = self.file_service.set_file_id(input_filename, "input")
-        if input_filepath is not None:
-            input_parser = CPMDInputParser(self.parser_context)
-            input_parser.parse(input_filepath)
-        else:
-            logger.warning("The input file for the calculation could not be found.")
-
-        # Compilation date
-        # date = section.get_latest_value("x_cpmd_compilation_date")
-
-    def onClose_x_cpmd_section_supercell(self, backend, gIndex, section):
-        # Simulation cell
-        A1 = section.get_latest_value("x_cpmd_lattice_vector_A1")
-        A2 = section.get_latest_value("x_cpmd_lattice_vector_A2")
-        A3 = section.get_latest_value("x_cpmd_lattice_vector_A3")
-        A1_array = self.vector_from_string(A1)
-        A2_array = self.vector_from_string(A2)
-        A3_array = self.vector_from_string(A3)
-        cell = np.vstack((A1_array, A2_array, A3_array))
-        self.cache_service["simulation_cell"] = cell
-
-        # Plane wave basis
-        cutoff = section.get_latest_value("x_cpmd_wave_function_cutoff")
-        si_cutoff = convert_unit(cutoff, "rydberg")
-        basis_id = backend.openSection("section_basis_set_cell_dependent")
-        backend.addValue("basis_set_cell_dependent_kind", "plane_waves")
-        backend.addValue("basis_set_cell_dependent_name", "PW_{}".format(cutoff))
-        backend.addValue("basis_set_planewave_cutoff", si_cutoff)
-        backend.closeSection("section_basis_set_cell_dependent", basis_id)
-
-    def onClose_x_cpmd_section_run_type_information(self, backend, gIndex, section):
-        geo_opt_method = section.get_latest_value("x_cpmd_geo_opt_method")
-        geo_opt_method_mapping = {
-            "GDIIS/BFGS": "bfgs",
-            "LOW-MEMORY BFGS": "bfgs",
-            "CONJUGATE GRADIENT": "conjugate_gradient",
-            "STEEPEST DESCENT": "steepest_descent",
-        }
-        geo_opt_method = geo_opt_method_mapping.get(geo_opt_method)
-        if geo_opt_method is not None:
-            backend.addValue("geometry_optimization_method", geo_opt_method)
-
-        # Number of steps
-        n_steps = section.get_latest_value("x_cpmd_max_steps")
-        self.cache_service["n_steps"] = n_steps
-
-        # Temperature control for ions
-        temp_control = section.get_latest_value("x_cpmd_ion_temperature_control")
-        if temp_control is not None:
-            if temp_control.strip() == "THE TEMPERATURE IS NOT CONTROLLED":
-                self.cache_service["ensemble_type"] = "NVE"
-
-        # Ions time step
-        time_step_ions = section.get_latest_value("x_cpmd_time_step_ions")
-        self.cache_service["time_step_ions"] = time_step_ions
-
-    #===========================================================================
-    # adHoc functions
-    def ad_hoc_atom_information(self):
-        """Parses the atom labels and coordinates.
-        """
-        def wrapper(parser):
-            # Define the regex that extracts the information
-            regex_string = r"\s+({0})\s+({1})\s+({2})\s+({2})\s+({2})\s+({0})".format(self.regexs.int, self.regexs.word, self.regexs.float)
-            regex_compiled = re.compile(regex_string)
-
-            match = True
-            coordinates = []
-            labels = []
-
-            while match:
-                line = parser.fIn.readline()
-                result = regex_compiled.match(line)
-
-                if result:
-                    match = True
-                    label = result.groups()[1]
-                    labels.append(label)
-                    coordinate = [float(x) for x in result.groups()[2:5]]
-                    coordinates.append(coordinate)
-                else:
-                    match = False
-
-            coordinates = np.array(coordinates)
-            labels = np.array(labels)
-
-            # If anything found, push the results to the correct section
-            if len(coordinates) != 0:
-                self.cache_service["initial_positions"] = coordinates
-                self.cache_service["atom_labels"] = labels
-                self.cache_service["number_of_atoms"] = coordinates.shape[0]
-
-        return wrapper
-
-    def ad_hoc_positions_forces(self, coord_metaname, force_metaname, coord_unit, force_unit):
-        """Parses multiple lines with atom coordinates and forces.
-        """
-        def wrapper(parser):
-            # Define the regex that extracts the information
-            regex_string = r"\s+({0})\s+({1})\s+({2})\s+({2})\s+({2})\s+({2})\s+({2})\s+({2})".format(self.regexs.int, self.regexs.word, self.regexs.float)
-            regex_compiled = re.compile(regex_string)
-
-            match = True
-            coordinates = []
-            forces = []
-
-            while match:
-                line = parser.fIn.readline()
-                result = regex_compiled.match(line)
-
-                if result:
-                    match = True
-                    coordinate = [float(x) for x in result.groups()[2:5]]
-                    force = [float(x) for x in result.groups()[5:8]]
-                    coordinates.append(coordinate)
-                    forces.append(force)
-                else:
-                    match = False
-
-            coordinates = np.array(coordinates)
-            forces = -np.array(forces)
-
-            # If anything found, push the results to the correct section
-            if len(coordinates) == len(forces) and len(coordinates) != 0:
-                parser.backend.addArrayValues(coord_metaname, coordinates, unit=coord_unit)
-                parser.backend.addArrayValues(force_metaname, forces, unit=force_unit)
-
-        return wrapper
-
-    def debug(self):
-        def wrapper(parser):
-            print("DEBUG")
-        return wrapper
-
-    #===========================================================================
-    # Misc. functions
-    def timestamp_from_string(self, timestring):
-
-        class UTCtzinfo(datetime.tzinfo):
-            """Class that represents the UTC timezone.
-            """
-            ZERO = datetime.timedelta(0)
-
-            def utcoffset(self, dt):
-                return UTCtzinfo.ZERO
-
-            def tzname(self, dt):
-                return "UTC"
-
-            def dst(self, dt):
-                return UTCtzinfo.ZERO
-
-        """Returns the seconds since epoch for the given date and the wall
-        clock seconds for the given wall clock time. Assumes UTC timezone.
-        """
-        # The start datetime can be formatted in different ways. First we try
-        # to determine which way is used.
-        try:
-            timestring = timestring.strip()
-            splitted = timestring.split()
-            n_split = len(splitted)
-            if n_split == 2:
-                date, clock_time = timestring.split()
-                year, month, day = [int(x) for x in date.split("-")]
-                hour, minute, second, msec = [float(x) for x in re.split("[:.]", clock_time)]
-
-                date_obj = datetime.datetime(year, month, day, tzinfo=UTCtzinfo())
-                date_timestamp = (date_obj - datetime.datetime(1970, 1, 1, tzinfo=UTCtzinfo())).total_seconds()
-
-                wall_time = hour*3600+minute*60+second+0.001*msec
-            elif n_split == 5:
-                weekday, month, day, clock_time, year = timestring.split()
-                year = int(year)
-                day = int(day)
-                hour, minute, second = [float(x) for x in re.split("[:]", clock_time)]
-                month_name_to_number = dict((v, k) for k, v in enumerate(calendar.month_abbr))
-                month = month_name_to_number[month]
-
-                date_obj = datetime.datetime(year, month, day, tzinfo=UTCtzinfo())
-                date_timestamp = (date_obj - datetime.datetime(1970, 1, 1, tzinfo=UTCtzinfo())).total_seconds()
-                wall_time = hour*3600+minute*60+second
-        # If any sxception is encountered here, just return None as the
-        # datetime is not very crucial
-        except Exception:
-            return None
-        else:
-            return date_timestamp, wall_time
-
-    def get_atom_number(self, symbol):
-        """ Returns the atomic number when given the atomic symbol.
-
-        Args:
-            symbol: atomic symbol as string
-
-        Returns:
-            The atomic number (number of protons) for the given symbol.
-        """
-        chemical_symbols = [
-            'X',  'H',  'He', 'Li', 'Be',
-            'B',  'C',  'N',  'O',  'F',
-            'Ne', 'Na', 'Mg', 'Al', 'Si',
-            'P',  'S',  'Cl', 'Ar', 'K',
-            'Ca', 'Sc', 'Ti', 'V',  'Cr',
-            'Mn', 'Fe', 'Co', 'Ni', 'Cu',
-            'Zn', 'Ga', 'Ge', 'As', 'Se',
-            'Br', 'Kr', 'Rb', 'Sr', 'Y',
-            'Zr', 'Nb', 'Mo', 'Tc', 'Ru',
-            'Rh', 'Pd', 'Ag', 'Cd', 'In',
-            'Sn', 'Sb', 'Te', 'I',  'Xe',
-            'Cs', 'Ba', 'La', 'Ce', 'Pr',
-            'Nd', 'Pm', 'Sm', 'Eu', 'Gd',
-            'Tb', 'Dy', 'Ho', 'Er', 'Tm',
-            'Yb', 'Lu', 'Hf', 'Ta', 'W',
-            'Re', 'Os', 'Ir', 'Pt', 'Au',
-            'Hg', 'Tl', 'Pb', 'Bi', 'Po',
-            'At', 'Rn', 'Fr', 'Ra', 'Ac',
-            'Th', 'Pa', 'U',  'Np', 'Pu',
-            'Am', 'Cm', 'Bk', 'Cf', 'Es',
-            'Fm', 'Md', 'No', 'Lr'
-        ]
-
-        atom_numbers = {}
-        for Z, name in enumerate(chemical_symbols):
-            atom_numbers[name] = Z
-
-        return atom_numbers[symbol]
-
-    def vector_from_string(self, vectorstr):
-        """Returns a numpy array from a string comprising of floating
-        point numbers.
-        """
-        vectorstr = vectorstr.strip().split()
-        vec_array = np.array([float(x) for x in vectorstr])
-        return vec_array
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/geooptparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/geooptparser.py
deleted file mode 100644
index 31143b44b7cf909f9a6443e704d5ea53e347b1b4..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/geooptparser.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from __future__ import absolute_import
-from nomadcore.simple_parser import SimpleMatcher as SM
-from nomadcore.baseclasses import MainHierarchicalParser
-import numpy as np
-from .commonparser import CPMDCommonParser
-import re
-import logging
-LOGGER = logging.getLogger("nomad")
-
-
-class CPMDGeoOptParser(MainHierarchicalParser):
-    """The main parser class that is called for all run types. Parses the CPMD
-    output file.
-    """
-    def __init__(self, parser_context):
-        """
-        """
-        super(CPMDGeoOptParser, self).__init__(parser_context)
-        self.setup_common_matcher(CPMDCommonParser(parser_context))
-        self.n_frames = 0
-        self.sampling_method_gid = None
-        self.frame_refs = []
-        self.energies = []
-
-        #=======================================================================
-        # Cache levels
-        # self.caching_levels.update({
-            # 'section_run': CachingLevel.ForwardAndCache,
-        # })
-
-        #=======================================================================
-        # Main structure
-        self.root_matcher = SM("",
-            forwardMatch=True,
-            sections=['section_run', "section_frame_sequence", "section_sampling_method",  "section_method"],
-            subMatchers=[
-                self.cm.header(),
-                self.cm.method(),
-                self.cm.atoms(),
-                self.cm.cell(),
-                self.cm.initialization(),
-                SM( " INITIALIZE EMPIRICAL HESSIAN",
-                    sections=["x_cpmd_section_geo_opt_initialization"],
-                    subMatchers=[
-                        SM("                           <<<<< ASSUMED BONDS >>>>>"),
-                        SM("\s+{0}\s+<-->\s+{0}".format(self.regexs.int),
-                            repeats=True
-                        ),
-                        SM(" TOTAL NUMBER OF MOLECULAR STRUCTURES:\s+(?P<x_cpmd_total_number_of_molecular_structures>{})".format(self.regexs.int)),
-                        SM(re.escape("   ATOM          COORDINATES            GRADIENTS (-FORCES)"),
-                            adHoc=self.cm.ad_hoc_positions_forces("x_cpmd_initialized_positions", "x_cpmd_initialized_forces", "bohr", "hartree/bohr"),
-                        ),
-                        SM(" CPU TIME FOR INITIALIZATION\s+(?P<x_cpmd_geo_opt_initialization_time>{}) SECONDS".format(self.regexs.float)),
-                    ]
-                ),
-                SM( re.escape(" =                  GEOMETRY OPTIMIZATION                       ="),
-                    endReStr=re.escape(" =              END OF GEOMETRY OPTIMIZATION                    ="),
-                    subMatchers=[
-                        SM(" NFI      GEMAX       CNORM           ETOT        DETOT      TCPU"),
-                        SM(" EWALD\| SUM IN REAL SPACE OVER"),
-                        SM("\s+{0}\s+{1}\s+{1}\s+{1}\s+{1}\s+{1}".format(self.regexs.int, self.regexs.float),
-                            forwardMatch=True,
-                            endReStr=re.escape(" *** CNSTR="),
-                            repeats=True,
-                            sections=["section_single_configuration_calculation", "section_system", "x_cpmd_section_geo_opt_step"],
-                            subMatchers=[
-                                SM( "\s+(?P<x_cpmd_geo_opt_scf_nfi>{0})\s+(?P<x_cpmd_geo_opt_scf_gemax>{1})\s+(?P<x_cpmd_geo_opt_scf_cnorm>{1})\s+(?P<x_cpmd_geo_opt_scf_etot__hartree>{1})\s+(?P<x_cpmd_geo_opt_scf_detot__hartree>{1})\s+(?P<x_cpmd_geo_opt_scf_tcpu__s>{1})".format(self.regexs.int, self.regexs.float),
-                                    sections=["x_cpmd_section_geo_opt_scf_iteration"],
-                                    repeats=True,
-                                ),
-                                SM(" RESTART INFORMATION WRITTEN ON FILE\s+{}".format(self.regexs.eol)),
-                                SM( re.escape("   ATOM          COORDINATES            GRADIENTS (-FORCES)"),
-                                    adHoc=self.cm.ad_hoc_positions_forces("x_cpmd_geo_opt_step_positions", "x_cpmd_geo_opt_step_forces", "bohr", "hartree/bohr"),
-                                ),
-                                SM(" *** TOTAL STEP NR\.\s+(?P<x_cpmd_geo_opt_step_total_number_of_scf_steps>{0})\s+GEOMETRY STEP NR\.\s+(?P<x_cpmd_geo_opt_step_number>{0})  ***".replace("*", "\*").format(self.regexs.int)),
-                                SM(" *** GNMAX=\s+(?P<x_cpmd_geo_opt_step_gnmax>{0})(?:\s+\[{0}\])?\s+ETOT=\s+(?P<x_cpmd_geo_opt_step_etot__hartree>{0})  ***".replace("*", "\*").format(self.regexs.float)),
-                                SM(" *** GNORM=\s+(?P<x_cpmd_geo_opt_step_gnorm>{0})\s+DETOT=\s+(?P<x_cpmd_geo_opt_step_detot>{0})  ***".replace("*", "\*").format(self.regexs.float)),
-                                SM(" *** CNSTR=\s+(?P<x_cpmd_geo_opt_step_cnstr>{0})\s+TCPU=\s+(?P<x_cpmd_geo_opt_step_tcpu>{0})  ***".replace("*", "\*").format(self.regexs.float)),
-                            ]
-                        ),
-                    ]
-                ),
-                self.cm.footer(),
-            ]
-        )
-
-    #=======================================================================
-    # onClose triggers
-    def onClose_x_cpmd_section_geo_opt_scf_iteration(self, backend, gIndex, section):
-        # SCF step energy and energy change
-        scf_id = backend.openSection("section_scf_iteration")
-        energy = section.get_latest_value("x_cpmd_geo_opt_scf_etot")
-        backend.addValue("energy_total_scf_iteration", energy)
-        denergy = section.get_latest_value("x_cpmd_geo_opt_scf_detot")
-        backend.addValue("energy_change_scf_iteration", denergy)
-        backend.closeSection("section_scf_iteration", scf_id)
-
-    def onClose_x_cpmd_section_geo_opt_step(self, backend, gIndex, section):
-        total_energy = section.get_latest_value("x_cpmd_geo_opt_step_etot")
-        if total_energy:
-            backend.addValue("energy_total", total_energy)
-            self.energies.append(total_energy)
-        forces = section.get_latest_value("x_cpmd_geo_opt_step_forces")
-        backend.addArrayValues("atom_forces", forces)
-        positions = section.get_latest_value("x_cpmd_geo_opt_step_positions")
-        backend.addArrayValues("atom_positions", positions)
-        self.n_frames += 1
-
-    def onClose_section_single_configuration_calculation(self, backend, gIndex, section):
-        self.frame_refs.append(gIndex)
-
-    def onClose_section_frame_sequence(self, backend, gIndex, section):
-        backend.addValue("number_of_frames_in_sequence", self.n_frames)
-        if self.sampling_method_gid is not None:
-            backend.addValue("frame_sequence_to_sampling_ref", self.sampling_method_gid)
-        if self.frame_refs:
-            backend.addArrayValues("frame_sequence_local_frames_ref", np.array(self.frame_refs))
-        if self.energies:
-            backend.addArrayValues("frame_sequence_potential_energy", np.array(self.energies))
-
-    def onClose_section_sampling_method(self, backend, gIndex, section):
-        # For single point calculations there is only one method and system.
-        self.sampling_method_gid = gIndex
-        backend.addValue("sampling_method", "geometry_optimization")
-
-    def onClose_section_system(self, backend, gIndex, section):
-        self.cache_service.addArrayValues("atom_labels")
-        self.cache_service.addArrayValues("simulation_cell", unit="bohr")
-        self.cache_service.addValue("number_of_atoms")
-
-    #=======================================================================
-    # adHoc
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/input_data/cpmd_input_tree.pickle b/parser/parser-cpmd/cpmdparser/versions/cpmd41/input_data/cpmd_input_tree.pickle
deleted file mode 100644
index 8a8c72b451b3f17d6db135b266f42eb27aab7188..0000000000000000000000000000000000000000
Binary files a/parser/parser-cpmd/cpmdparser/versions/cpmd41/input_data/cpmd_input_tree.pickle and /dev/null differ
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/input_data/manual.tex b/parser/parser-cpmd/cpmdparser/versions/cpmd41/input_data/manual.tex
deleted file mode 100644
index c6f920b2aef33d2de609480c689ada815b859ef0..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/input_data/manual.tex
+++ /dev/null
@@ -1,11161 +0,0 @@
-\documentclass[twoside,10pt,titlepage,a4paper]{article}
-%
-\usepackage{amsmath}
-\usepackage{amssymb}
-\usepackage{makeidx}
-\usepackage{multicol}
-\sloppy%\nonstopmode
-%Version CPMD
-\newcommand{\cpmdversion}{4.1.0}
-\newcommand{\cpmd}{CPMD \cpmdversion}
-\newcommand{\sgn}{\mathrm{sgn}}
-
-\usepackage[bookmarks,bookmarksopen,colorlinks,
-            pdftitle={Manual of \cpmd},
-            pdfsubject={How to use \cpmd},
-            pdfauthor={The CPMD consortium},
-            pdfkeywords={\cpmd, ab initio},
-            linkcolor={blue},
-            citecolor={blue},
-            urlcolor={red},
-            hyperindex]{hyperref}
-%%%%%% MAKE FILE SETUP %%%%%%%%
-%  HTML TAG -  DO NOT REMOVE  %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\makeindex
-
-% Definition of the page
-\setlength{\paperheight}{297mm}
-\setlength{\paperwidth}{210mm}
-\setlength{\textheight}{230mm}
-\setlength{\textwidth}{150mm}
-\setlength{\evensidemargin}{-0.4mm}
-\setlength{\oddsidemargin}{9.6mm}
-\setlength{\topmargin}{-0.4mm}
-\setlength{\overfullrule}{2pt}
-\setlength{\parindent}{0pt}
-\setlength{\parskip}{0pt}
-\renewcommand{\baselinestretch}{1.0}
-
-% Optimize output for different media (links, summaries)
-% Call pdflatex with pdflatex '\def\faqsum{include} \input manual'
-% if you want to get a summary of each FAQ section with links
-\newif\ifhtmlmanual \htmlmanualfalse
-\newif\ifpdfmanual  \pdfmanualfalse
-\newif\iffaqsum     \ifx\undefined\faqsum\faqsumfalse\else\faqsumtrue\fi
-
-\ifx\undefined\pdfoutput
-\else
-  \ifnum\pdfoutput=1 \pdfmanualtrue\fi
-\fi
-\ifpdfmanual
-  \htmlmanualfalse
-\else
-  \faqsumtrue
-  \htmlmanualtrue
-\fi
-
-\ifpdfmanual
-  \typeout{This manual is optimized for PDF output}
-  \newcommand{\referto}[2]{\hyperlink{#1}{#2}}
-  \newcommand{\reflabel}[1]{\hypertarget{#1}}
-\else
-  \typeout{This manual is optimized for HTML output}
-  \faqsumtrue
-  \newcommand{\referto}[2]{\htmlref{#2}{#1}}
-  \newcommand{\reflabel}[1]{\label{#1}}
-\fi
-
-\ifpdfmanual
-  \newcommand{\htref}[2]{\href{#1}{#2}}
-\fi
-\ifhtmlmanual
-  \newcommand{\htref}[2]{\htmladdnormallink{#2}{#1}}
-\fi
-
-\newcommand{\reffaqquestion}[2]{\referto{faq#1}{#2}}
-\newcommand{\faqquestion}[1]{\vspace{2ex}\reflabel{faq#1}{{\bf Q:\ }}}
-\newcommand{\faqanswer}{\vspace{1ex}{{\bf A:\ }}}
-
-% Arguments: name contribution_in_index hypertargetname
-\newcommand{\keyword}[5]{%
-\vspace{1.0cm}
-\begin{minipage}{15cm}
-%\hypertarget{#1}{\textbf{\large #1}}% Name; printed
-\reflabel{#1}{\textbf{\large #1}}% Name; printed
-\index{#1}% Index
-%\index{Keywords!#1}% Index
-\ \textbf{#2}% Optional arguments
-\ \textbf{#3}% Exclusive arguments
-\ \textit{#4}% Notes
-     \hfill\\\smallskip
-     {Section: #5}
-     \hfill\\\smallskip\vskip 10pt
-\end{minipage}
-}%
-\newcommand{\spekeyword}[6]{%
-\vspace{1.0cm}
-\begin{minipage}{15cm}
-%\hypertarget{#6}{\textbf{\large #1}}% Name; printed
-\reflabel{#6}{\textbf{\large #1}}% Name; printed
-\index{#6@#1}% Index
-%\index{Keywords!#1}% Index
-\ \textbf{#2}% Optional arguments
-\ \textbf{#3}% Exclusive arguments
-\ \textit{#4}% Notes
-     \hfill\\\smallskip
-     {Section: #5}
-     \hfill\\\smallskip\vskip 10pt
-\end{minipage}
-}%
-
-% Arguments: name hypertargetname
-\newcommand{\refkeyword}[1]{%
-%\hyperlink{#1}{\textbf{#1}}%
-\referto{#1}{\textbf{#1}}%
-\index{#1}% Index
-%\index{Keywords!#1}% Index
-}%
-\newcommand{\refspekeyword}[2]{%
-%\hyperlink{#2}{\textbf{#1}}%
-\referto{#2}{\textbf{#1}}%
-\index{#2@#1}% Index
-%\index{Keywords!#1}% Index
-}%
-
-% Arguments: options options notes
-\newcommand{\options}[3]{%
-\ \textbf{#1}% Optional arguments
-\ \textbf{#2}% Exclusive arguments
-\ \textit{#3}% Notes
-     \hfill\\\smallskip
-}%
-
-% Arguments: text
-\ifpdfmanual
-   \newcommand{\desc}[1]{%
-   \hspace*{\fill} \parbox{130mm}{\sloppy
-                          {#1}% all the text
-                             }
-     \hfill\\\smallskip
-   }%
-\else
-   \newcommand{\desc}[1]{#1\vspace{1ex}}
-\fi
-
-\newcommand{\shellcommand}[1]{%
-  \vspace*{3mm}
-  \noindent
-  \texttt{\# #1}
-  \vspace*{3mm}
-}
-
-\newcommand{\defaultvalue}[1]{%
-  \textbf{#1}
-}
-
-\begin{document}
-%---------------------------------------------------------------------
-
-%---------------------------------------------------------------------
-\setcounter{page}{-3}
-\pagestyle{empty}
-   \rule{0in}{1in}
-   \begin{center}
-       {\Huge\bf CPMD \\}
-       \vspace{5ex}
-       {\huge Car-Parrinello Molecular Dynamics \\}
-       \vspace{5ex}
-       {\Large An {\sl ab initio} Electronic Structure and \\
-               \vspace{1ex}
-               Molecular Dynamics Program} \\
-       \vspace{10ex}
-       {\large
-          The CPMD consortium                 \smallskip \\
-          WWW: \htref{http://www.cpmd.org/}{http://www.cpmd.org/} \smallskip \\
-          Mailing list: \htref{mailto:cpmd-list@cpmd.org}{cpmd-list@cpmd.org} \smallskip  \\
-          E-mail: \htref{mailto:cpmd@cpmd.org}{cpmd@cpmd.org}  \smallskip  \\ }
-       \vspace{5ex}
-       {\large \today\\}
-       \vspace{10ex}
-       Send comments and bug reports to \medskip \\
-       \htref{mailto:cpmd@cpmd.org}{cpmd@cpmd.org} \\
-       \vfill
-       {\bf This manual is for CPMD version \cpmdversion}
-       \end{center}
-
-\clearpage
-
-\vfill
-
-\cpmd  \hfill  \today
-
-\clearpage
-
-\tableofcontents
-
-\clearpage
-
-\pagestyle{myheadings}
-\markboth{\cpmd}{\cpmd}
-
-% Freedom for page bottom in order to avoid underfull \vbox
-\raggedbottom
-%---------------------------------------------------------------------
-\part{Overview}
-\section{About this manual}\label{about}
-
-  Many members of the CPMD consortium
-(\htref{http://www.cpmd.org/}{http://www.cpmd.org/}) contributed to this manual.
-This version of the manual is based on a compilation by Barbara Kirchner,
-Ari P.~Seitsonen and J\"urg Hutter working at the Physical Chemistry Institute
-of the University of Zurich. Recent updates by Mauro Boero, Alessandro Curioni,
-J\"urg Hutter, Axel Kohlmeyer, Nisanth Nair and Wolfram Quester.
-
-  If you want to contribute or have constructive critisism please contact
-\htref{mailto:cpmd@cpmd.org}{cpmd@cpmd.org}.
-
-\vspace{5mm}
-
-\section{Citation}\label{citation}
-%
-Publications of results obtained with CPMD should acknowledge its
-use by an appropriate citation of the following kind:
-\vspace{5mm}
-
-\noindent
-\textit{CPMD, http://www.cpmd.org/,\\
- Copyright IBM Corp 1990-2015,\\
- Copyright MPI f\"ur Festk\"orperforschung Stuttgart 1997-2001}.
-%
-
-\vspace{5mm}
-
-\section{Important constants and conversion factors}
-Input and output are in Hartree atomic units (a.u.),
-unless otherwise explicitly mentioned.
-
-\subsubsection*{IMPORTANT NOTICE:}
- As of CPMD version 3.15.1 all constants and conversion factors
- have been consolidated and updated to the CODATA 2006 data 
- set\cite{codata2006}. For details see the file {\tt cnst.inc} and
-\htref{http://physics.nist.gov/constants}%
-{http://physics.nist.gov/constants}.
-
-
-\begin{tabbing}
-1234567890123456789012 \= 1234567890123456789012  \kill
-\textit{quantity} \> \textit{conversion factor} \\
-%AK: these are the old values:
-%time step         \> 1 a.u.\ = 0.0241888428 fs \\
-%coordinates       \> 1 Bohr = 1 a$_0$ = 0.529177249 {\AA} \\
-%velocity          \> 1 a.u.\ = 1 Bohr / 1 a.t.u.\ = 2188491.52 m/s \\
-%energy            \> 1 Ha = 27.21161 eV = 627.5095 kcal/mol = 2625.5 kJ/mol \\
-%plane wave cutoff \> 1 Ry = 1/2 Ha = 13.6058 eV \\
-time step         \> 1 a.u.\ =  0.02418884326505 fs \\
-coordinates       \> 1 Bohr = 1 a$_0$ = 0.52917720859 {\AA} \\
-velocity          \> 1 a.u.\ = 1 Bohr / 1 a.t.u.\ = 2187691.2541 m/s \\
-energy            \> 1 Ha = 27.21138386 eV = 627.5094706 kcal/mol = 2625.4996251 kJ/mol \\
-plane wave cutoff \> 1 Ry = 1/2 Ha = 13.60569193 eV \\
-dipole moment     \> 1 a.u.\ = 2.5417462289 Debye\\
-atomic mass       \> 1 a.u.\ = 0.00054857990943 a.m.u\\
-\end{tabbing}
-%---------------------------------------------------------------------
-\clearpage
-%---------------------------------------------------------------------
-
-\clearpage
-\section{Recommendations for further reading}\label{intro:further}
-\begin{itemize}
-\item {\bf General Introduction to Theory and Methods}\\
-  Jorge Kohanoff, "Electronic Structure Calculation for Solids and Molecules",\\
-  Cambridge University Press, 2006, ISBN-13 978-0-521-81591-8\\
-  \htref{http://www.cambridge.org/9780521815918}%
-{http://www.cambridge.org/9780521815918}
-\item {\bf General introduction to Car-Parrinello simulation}\\
-  D. Marx and J. Hutter, "Ab Initio Molecular Dynamics - Basic Theory
-  and Advanced Methods'',\\
-  Cambridge University Press, 2009\\
-  D. Marx and J. Hutter, "Modern Methods and Algorithms of Quantum Chemistry",\\
-  Forschungszentrum J\"ulich, NIC Series, Vol. 1 (2000), 301-449 \\
-  W. Andreoni and A. Curioni,\\
- "New Advances in Chemistry and Material Science with CPMD and Parallel Computing",\\
-{ \em Parallel Computing}, 26 (2000) 819.
-\item {\bf Electronic Structure Theory}\\
-  Richard M.~Martin, "Electronic Structure: Basic Theory and Practical Methods'",\\
-  Cambridge University Press, 2004, ISBN-13: 978-0-521-78285-2 \\
-  \htref{http://electronicstructure.org}{http://electronicstructure.org}
-\item{\bf General overview about quantum simulation techniques}\\
-  J. Grotendorst, D. Marx, and A. Muramatsu,
-  {\em Quantum Simulations of Complex Many--Body Systems:
-  From Theory to Algorithms},
-  (John von Neumann Institute for Computing,
-  Forschungszentrum J\"ulich 2002);
-  \newline
-  Printed Version:
-  ISBN 3--00--009057--6
-  \newline
-  Electronic Version:
-  \htref{http://www.fz-juelich.de/nic-series/volume10/}%
-  {http://www.fz-juelich.de/nic-series/volume10/}
-  \newline
-  Audio--Visual Version:
-  \htref{http://www.fz-juelich.de/video/wsqs/}%
-  {http://www.fz-juelich.de/video/wsqs/}
-
-\item {\bf Molecular dynamics simulation}\\
-     M.~P.~Allen and D.~J.~Tildesley, {\em Computer Simulation of Liquids}
-     (Clarendon Press, Oxford, 1987; reprinted 1990).\\
-     D.~Frenkel and B.~Smit, {\em Understanding Molecular Simulation --
-     From Algorithms to Applications} (Academic Press, San Diego, 1996).\\
-     M.~E.~Tuckerman and G.~J.~Martyna, J.~Phys.~Chem.~B {\bf 104} 159 (2000).
-
-\item {\bf Pseudopotentials}\\
-\htref{http://www.cpmd.org/documentation/useful-links}%
-{http://www.cpmd.org/documentation/useful-links}\\
-\htref{http://www.cpmd.org/cpmd_download.html}%
-{http://www.cpmd.org/cpmd\_download.html}\\
-\htref{http://cvs.berlios.de/cgi-bin/viewcvs.cgi/cp2k/potentials/Goedecker/cpmd/}%
-{http://cvs.berlios.de/cgi-bin/viewcvs.cgi/cp2k/potentials/Goedecker/cpmd/}\\
-\htref{http://www.fhi-berlin.mpg.de/th/fhi98md/fhi98PP/}%
-{http://www.fhi-berlin.mpg.de/th/fhi98md/fhi98PP/}\\
-\htref{http://www.physics.rutgers.edu/~dhv/uspp/}%
-{http://www.physics.rutgers.edu/\~{}dhv/uspp/}\\
-\htref{http://www.pwscf.org/pseudo.htm}%
-{http://www.pwscf.org/pseudo.htm}
-
-\item{\bf Parallelization \& Performance}\\
-     J.~Hutter and A.~Curioni,
-     Parallel Computing {\bf 31}, 1 (2005). \\
-     J.~Hutter and A.~Curioni,
-     ChemPhysChem {\bf 6}, 1788-1793 (2005). \\
-     C.~Bekas and A.Curioni,
-     Comp.~Phys.~Comm.{\bf 181}, 1057 (2010). \\
-\end{itemize}
-
-\clearpage
-
-\section{History}\label{intro}
-
-\subsection{CPMD Version 1}
-
-  In summer 1993 a project was started to combine the two different ab initio
-molecular dynamics codes~\cite{Allen87} that were used in the group for computational physics
-of the IBM Research Laboratory in R\"uschlikon. There was the IBM-AIX version
-(ported by J.~Kohanoff and F.~Buda)  of the IBM-VM version (by W.~Andreoni and P.~Ballone) 
-of the original Car-Parrinello~\cite{CP85} code and a version of the code by K.~Laasonen 
-and F.~Buda that could handle ultra-soft pseudopotentials~\cite{Vanderbilt}.
-Further goals were to provide a common
-platform for future developments, as new integration techniques or
-parallelization. The original Car--Parrinello code~\cite{CP85,Galli91} was about 8000 lines of
-Fortran. A first parallel version using the IBM MPL library was finished in
-1993. Many people contributed to this effort in different ways: M.~Parrinello,
-J.~Hutter, W.~Andreoni, A.~Curioni, P.~Giannozzi, E.~Fois, D.~Marx and M.~Tuckerman.
-
-\subsection{CPMD Version 2}
-
-\subsubsection{Version 2.0}
-
-  The first major update of the code was finished in summer 1993. New
-features of the code included a keyword driven input, an initial guess from
-atomic pseudo-wavefunctions, a module for geometry optimization, several new
-types of molecular dynamics, Nos\'e--Hoover~\cite{Nose84,Hoover85} thermostats and a 
-diagonalization routine to get Kohn-Sham energies~\cite{KS}. This code had 17'000 lines.
-
-\subsubsection{Version 2.5}
-
-  In 1994 many additions were made to the code. The communication was improved
-and a library interface for MPI was introduced. The code reached its most
-stable version at the end of the year with version number 2.5.
-At this stage a working version of {\em ab initio} path integrals~\cite{Marx94,Marx96} 
-based on a one level parallelization was implemented in a separate branch
-of the code by Dominik Marx.
-
-\subsection{CPMD Version 3}
-
-\subsubsection{Version 3.0}
-
-  This major update included changes to improve the portability of the code to
-other platforms. Most notable was the shmem interface for optimal parallel
-performance on Cray computers. New features of this version were constant
-pressure molecular dynamics using the Parrinello-Rahman Lagrangian~\cite{parrah,parrah2}, 
-the possibility for symmetry constraints and Stefan Goedecker's dual space
-pseudopotentials~\cite{goe_pp}. The library concept for the pseudopotentials had been
-changed. The code had grown to 55'000 lines.
-
-\subsubsection{Version 3.1}
-
-  Only minor updates were made for this version. However, it served as a
-starting point for two major new developments. The free energy functional~\cite{Alavi94} 
-code with {\bf k} points was developed by Ali Alavi and Thierry Deutsch in Belfast. An
-efficient path integral version using two level parallelism was put together 
-by  Mark Tuckerman, Dominik Marx, and J\"urg Hutter~\cite{Tuckerman96} .
-
-\subsubsection{Version 3.2}
-
-  This version included several new algorithms. Some of these were lost in the
-transfer to the next version.
-
-\subsubsection{Version 3.3}
-
-  This version was developed using the free energy functional version (based on
-3.1) as a basis. The path integral version was fully included but only part of
-the changes from the "main" version 3.2 were taken over. The QM/MM interface to
-the EGO code was included~\cite{egoqmmm}. 
-Development of the linear response~\cite{LinRes} parts of the code started.
-Maximally localized Wannier functions~\cite{Marzari97} were implemented.
-This version was finished in 1998, the code was about 115'000 lines
-long.
-
-\subsubsection{Version 3.4}
-
-  The most notable change to this version was the inclusion of the QM/MM
-interface developed by Alessandro Laio, Joost VandeVondele and Ursula
-R\"othlisberger~\cite{qmmm02,qmmm03,qmmm04}. 
-Besides that only minor changes to the functionality of the
-code were done. This version included mostly bug fixes and was finished in
-2000.
-
-\subsubsection{Version 3.5}
-
-  This was the first version made generally available at www.cpmd.org in early
-2002. Many bugs were fixed, most notably the code for the ultra-soft
-pseudopotentials was working again. The new size of the code was 136'000 lines.
-
-\subsubsection{Version 3.6}
-
-  This developers version included the final versions of the linear response
-methods for the calculation of the polarizability and the chemical NMR shifts
-developed by Anna Putrino and Daniel Sebastiani~\cite{apdsmp,apmp,dsmp}. 
-Marcella Iannuzzi contributed a ${\bf k} \cdot {\bf p}$ module~\cite{mimp}.
-Time-dependent density functional response theory was
-implemented and forces for excited state energies programmed.
-Salomon Billeter, Alessandro Curioni and Wanda Andreoni implemented
-new linear scaling geometry optimizers that allow to locate geometrical
-transition states in a clean way~\cite{LSCAL}.
-Fine grained parallelism with OpenMP was added (by Alessandro Curioni
-and J\"urg Hutter) and can be used together with the distributed
-memory MPI version.
-
-\subsubsection{Version 3.7}
-
-  The stable version of the developers code was made publicly available in
-early 2003. The code has 150'000 lines.
-
-\subsubsection{Version 3.8}
-
- Developer's version.
-
-\subsubsection{Version 3.9}
-
-  Many new developments, improvements, cleanups, and bug fixes have been added
-  since the last public version of the code.
-  Most notably, the methodology for reactive
-  Car-Parrinello metadynamics~\cite{alaio,iannuzzi}
-  is made available in this version.\\
-  Other new functionality includes
-  G-space localization of wavefunctions,
-  Hockney-type Poisson Solver~\cite{Hockney70}
-  for slabs with influence function in G-Space,
-  code to determine molecular KS states from Wannier functions,
-  code for trajectory analysis, calculation of dipole moments using
-  the Berry phase and in real space,
-  transition matrix elements between orbitals,
-  growth function for constraints and restraints,
-  new code for applying static electrical fields,
-  periodic or final diagonalization of WF, van der Waals force field
-  according to Elstner's formula~\cite{Elstner}
-  and dumping files for PDOS.\\
-  Improvements of the code include
-  performance and OpenMP improvements,
-  improved code for keeping wavefunction in real space,
-  updated TDDFT, SAOP TDDFT functional,
-  a much improved configure script,
-  bug fixes for HF exchange, screened exchange,
-  cleanup of memory management,
-  more checks on unsupported options,
-  fixed constraints in geometry optimization. \\
-  Modified ROKS~\cite{Frank98}, 
-  Ports to MacOS-X/PPC, Cray X1, and Intel EM64T,
-  k-points with swapfiles are working again on many platforms,
-  detection of incompatible Vanderbilt pseudopotentials.
-%
-
-\subsubsection{Version 3.10}
-
-  Developer's version.
-
-\subsubsection{Version 3.11}
-  Many improvements, cleanups, bug fixes and some new features
-  have been added since the last public version of the code.
-  New functionalities include calculation of the electric field 
-  gradient tensor along MD trajectory, EPR calculations, efficient 
-  wavefunction extrapolation for BOMD, distance screening for HFX 
-  calculation and hybrid funcional with PBC, interaction perturbation method,
-  molecular states in TDDFT calculations, analytic second derivatives of 
-  gradient corrected functionals~\cite{xcder}, Born charge tensor during 
-  finite difference vibrational analysis, Gromacs  QM/MM 
-  interface~\cite{gmxqmmm}, and distributed linear algebra support. \\
-  New supported platforms include, IBM Blue Gene/L~\cite{bgl}, Cray XT3,
-  NEC-SX6 Earth Simulator (Vector-Parallel) and Windows NT/XT using GNU Gfortran.
-  Performance tunings for existing platforms include FFTW interface,
-  16 Byte memory, alignment for Blue Gene/L, extension of the taskgroup 
-  implementation to cartesian taskgroups (Blue Gene/L),
-  parallel distributed linear algebra, 
-  alltoall communication in either single (to reduce
-  communication bandwidth) or double precision, special parallel OPEIGR,
-  improved OpenMP support \cite{mixed}, and improved metadynamics.
-
-
-\subsubsection{Version 3.12}
-
-  Developer's version.
-
-\subsubsection{Version 3.13}
-  Several improvements, cleanups, bug fixes and a few new features
-  have been added since the last public version of the code.
-  New functionalities include additional distributed linear algebra code 
-  for initialization, final wavefunction projection and Friesner 
-  diagonalization, mean free energy path search method, multiscale 
-  shock method~\cite{shock}, Langevin lntegrator for metadynamics 
-  with extended Lagrangian, calculation of non-adiabatic couplings, 
-  Landau-Zener Surface hopping, ROKS-based Slater transition-state
-  density, linear-response DFPT with a ROKS-based reference 
-  state~\cite{GrimmJCP2003}, simplified van der Waals correction 
-  according to Grimme~\cite{Grimme06}, simplified ROKS input options
-  with hard-wired variants of modified Goedecker algorithms for ROKS,
-  PBEsol functional, ports to IBM Blue Gene/P, MacOS-X/x86 and PACS-CS / T2K,
-  support for fftw-3, improved  ultrasoft pseudopotential parallel code (VDB) 
-  (MPI and OpenMP), optimizations for scalar CPUs, new collective 
-  variables for metadynamics, variable cell support in DCD output, 
-  isotropic and zflexible cell for parrinello-rahman dynamics, 
-  damped dynamics and berendsen thermostats for electrons, ions and cell,
-  path-integral support for BO-MD, support for completely reproducable 
-  outputs for CPMD TestSuite, consistent and updated unit conversions 
-  throughout the code, spin-density Mulliken analysis,
-  aClimax format output of vibrational frequencies, optimization scheme 
-  for Goedecker pseudopotential parameters for use as link atoms in 
-  QM/MM applications, support for QUENCH BO with PCG MINIMIZE when using 
-  VDB potentials, corrections for a number of serious bugs in the Gromos 
-  QM/MM code, use of PDB format coordinate files for Amber2Gromos,
-  Taskgroup support for Gromos QM/MM with SPLIT option, BO-MD with 
-  EXTRAPOLATE WFN fully restartable, access to QM and MM energy in 
-  QM/MM calculations, and improvements of the manual.
-
-\subsubsection{Version 3.14}
-
-  Developer's version.
-
-\subsubsection{Version 3.15}
-New features, performance improvement and bug fixes have been added
-since the latest version of the code. 
-These include a new efficient orthogonalization scheme~\cite{be_cur},
-Constrained Density Functional Theory~\cite{ober}, force matching in
-QM/MM runs, the new generalized Langevin thermostat ~\cite{ceriotti},
-the screened hybrid functional HSE06 from the group of 
-Scuseria ~\cite{HSE06a,HSE06b}, 
-multiple walkers in metadynamics, surface hopping
-dynamics with non-adiabatic coupling vectors in TDDFT~\cite{taver},
-extensions of Grimme vdW corrections and initial support for the Ehrenfest Molecular
-Dynamics~\cite{taver1}, and Kerker mixing for handling metallic 
-systems~\cite{Kerker}.  
-The new version includes also ports to IBM
-POWER7, Fujitsu-Primergy BX900, several Linux updates and an updated
-pseudopotential library.
-
-\subsubsection{Version 3.17}
-New features, scalability improvements and bug fixes have been added since the 
-latest version of the code.
-Among the several novel implementations we number a new highly parallel scheme 
-for the evaluation of the Hartree--Fock exact exchange with an efficient thresholding, support for parallel I/O in
-writing and reading the RESTART file, the introduction of a second parallelization layer over the molecular states which
-replaces the original TASKGROUP parallelization, increasing further the scalability together with the already available parallelization over plane-waves.
-Finally, improved OpenMP 3.0 support has been introduced both in the main code and in the QM/MM interface.
-This allows for a substantial speedup of the code in a hybrid OMP/MPI distribution (see note below). 
-Between the novel methodologies  we mention the availability of the {\it ab-initio} vdW corrections, 
-of a fully functional Ehrenfest Dynamics module and of several improvements to the FO-DFT scheme. Additional developments include 
-novel schemes for treating  QM/MM link-atoms and the possibility of post-processing Nos\'e-Hoover trajectories and energies.
-The new version includes also porting and optimization to the IBM BlueGene/Q and different updates to the Linux architecture files.
-
-\emph{Note on OMP 3.0}: The {\it collapse(n)} clause, although 
-powerful in well nested loops, may not work in old compilers and is known to have troubles
-e.g. in old Intel Fortran Compilers (versions 11 and former ones).
-Please, check carefully your OS and your compiler berfore compiling 
-blindly and refer to the discussion in
-http://openmp.org/forum/viewtopic.php?f=3\&t=1023\&start=10.
-
-\subsubsection{Version 4.0}
-A new development version started in 2012 (and developed concurrently with version 3.17.1) with the purpose to refactor CPMD.
-
-\subsubsection{Version 4.1}
-Release 4.1 is the new version made available after almost two years from the last public release. It sets a turning point to CPMD and its new position as a modern software (object oriented) while still retaining all the features and functionalities from the previous versions.
-
-Among the major technical breakthroughs: all memory allocations are converted to dynamical allocations using standard fortran; extensive usage of modules so to promote a code re-usage policy; fixed several instabilities due to arithmetical exceptions;  all floats operations are now converted to arbitrary precision; support of few more compilers; all COMMONs have been converted to TYPES; extensive usage of IMPLICIT NONE; removed a massive amounts of unused variables and procedures. Finally, we have build-up a regression tester that covers more than half of the functionalities (700 tests and keeps increasing day by day), providing a quality control for developers and users.
-
-Beyond cleanup and bug fixes improving the stability of all functionalities, we also report the implementation of new features such as: Spin-Orbit-Coupling, local control, inter-system-crossing SH dynamics together, Adiabatic Bohmian dynamics; coupling with IPHIGENIE to perform QM/MM calculations with polarizable schemes and a wider usage of CP_GROUPS to improve scalability of different other functionalities.
-The new version includes also porting, optimisation and different updates for various architectures. The work initiated with version 4.0 will continue tirelessly on the forthcoming version.
-
-% XXX tutorial added.
-\clearpage
-%---------------------------------------------------------------------
-\section{Installation}\label{installation}
-%
-This version of CPMD is equipped with a shell script to create 
-a Makefile for a number of given platforms. If you run the shell 
-script \texttt{config.sh} (NOTE: this script was previously
-named \texttt{config.sh}) without any options it will tell you 
-what platforms are available. Choose the label for a target 
-platform close to what your machine is and run the script again.
-
-\shellcommand{./config.sh PLATFORM }
-
-\textbf{NOTE:} Due to filesystem implementation limitations,
-compilation under MacOS X, and Windows NT/XP/Vista requires the
-compilation outside of the \textbf{src} directory. See below.
-
-Most likely the generated makefile with \textbf{not} match the
-setup on your machine and you have to adapt the various definitions 
-of compilers, optimization flags, library locations and so on.
-To display additional information about a configuration type:
-
-\shellcommand{./config.sh -i PLATFORM}
-
-The executable can then be compiled using the \texttt{make} command. 
-To see all possible options use
-
-\shellcommand{./config.sh -help}
-
-A common problem is that the default names of the libraries and the path to
-the libraries are not correct in the \texttt{Makefile}. In this case you
-have to change the corresponding entries in the \texttt{Makefile} manually.
-If you are changing the preprocessor flags (the CPPFLAGS entry), 
-e.g.\ going from a serial to a parallel compilation, you have to delete 
-all "\texttt{.f}" and "\texttt{.o}" files first, preferably by executing:
-
-\shellcommand{make clean}
-
-\vspace{3mm}
-  Alternatively you can compile CPMD outside the source directory.
-  This is highly recommended, if you need to compile several executables
-  concurrently, e.g. if you are doing development on several platforms.
-  This is done by creating a directory for each platform
-  (e.g. by 'mkdir ../cpmd-pc-pgi; mkdir ../cpmd-pc-pgi-mpi'  ) and then
-  create a makefile for each of those directories and pointing to the
-  original source directory with with \texttt{SRC} and \texttt{DEST}
-  flags. For the above examples this would be:\\
-\shellcommand{./config.sh -m -SRC=\$PWD -DEST=../cpmd-pc-pgi PC-PGI}\\
-\shellcommand{./config.sh -m -SRC=\$PWD -DEST=../cpmd-pc-pgi-mpi  PC-PGI-MPI}\\
-  Now you can do development in the original source directory and only
-  need to recompile the altered modules by typing 'make' in the
-  respective subdirectories.
-
-\textbf{NOTE:} For compilation under Mac OS-X this procedure is
-  currently \textbf{required}.
-
-
-\vspace{3mm}
-  Compiling CPMD on Linux platforms can be particularly tricky,
-  since there are several Fortran compilers available and there
-  are no standard locations for supporting libraries (which on top
-  of that usually have to be compiled with the same or a compatible
-  compiler). If you run into problems, you may want to check out the
-  CPMD Mailing list archives at
-
-  \centerline{\htref{http://www.cpmd.org/pipermail/cpmd-list/}{http://www.cpmd.org/pipermail/cpmd-list/}}
-
-  to see, whether your specific problem has already been dealt with.
-
-\vspace{7mm}
-  Please also note that only recent versions of the GNU gfortran compiler
-  (4.1 and later) are sufficient to compile CPMD. The now obsolete GNU 
-  Fortran 77 compiler, \texttt{g77}, and the G95 Fortran compiler, 
-  \texttt{g95}, are {\em not} able to compile CPMD.
-  \clearpage
-%---------------------------------------------------------------------
-\section{Running CPMD}\label{runcpmd}
-%
-The CPMD program is started with the following command:
-
-\shellcommand{cpmd.x {\sl file.in} [{\sl PP\_path}] $>$ {\sl file.out}}
-
-Running \texttt{cpmd.x} requires the following files:
-\begin{itemize}
-  \item an {\bf input file}\ \ {\sl file.in}\ (see section \ref{inputfile})
-
-  \item {\bf pseudopotential files} for all atomic species specified
-        in {\sl file.in} (see section \ref{S_Pseudopotentials}).
-\end{itemize}
-
-\bigskip
-
-The path to the pseudopotential library can be given in different ways:
-\begin{itemize}
-
-\item The second command line argument \ [{\sl PP\_path}]\ \ is set.
-
-\item If the second command line argument \ [{\sl PP\_path}]\ \ is not
-  given, the program checks the environment variables\\ {\bf
-    CPMD\_PP\_LIBRARY\_PATH and PP\_LIBRARY\_PATH}.
-
-\item If neither the environment variables nor the second command line
-  argument are set, the program assumes that the pseudopotential files are
-  in the current directory
-\end{itemize}
-
-During the run\ cpmd.x\ creates different outputs:
-\begin{itemize}
-\item Various status messages to monitor the correct operation of the program is
-  printed to standard output (in our case redirected to the file {\sl file.out}).
-
-\item
-  Detailed data is written into different files (depending on the keywords
-  specified in the input {\sl file.in}). An overview on them is given in section
-  \ref{FILES}. Large files are written either to the current directory, the directory
-  specified by the environment variable {\bf CPMD\_FILEPATH}, or the directory
-  specified in the input file using the keyword \refkeyword{FILEPATH}.
-\end{itemize}
-
-  Jobs can be stopped at the next breakpoint by creating a file:
-
-\medskip
-
-\begin{center}
-{\em EXIT}
-\end{center}
-                
-\noindent
-in the run-directory.
-\index{stopping a run}
-%AK: this is also more confusing than helping.
-%\medskip
-%
-%For IBM, DEC, SGI, and SUN machines
-%there is the possibility to use the command:
-%
-%\medskip
-%\centerline{\sl kill -30 pid}
-%\begin{center}
-%\sl kill -30 pid
-%\end{center}
-%\noindent
-%where pid is the process ID.
-%
-\clearpage
-%---------------------------------------------------------------------
-\section{Files}\label{FILES}
-%
-
-Incomplete list of the files used or created by CPMD:\par
-
-\begin{tabbing}
-1234567890123456789012 \= 1234567890123456789012  \kill
-\textsl{File}   \> \textsl{Contents}                     \\
-\\
-RESTART         \> Restart file                          \\
-RESTART.x       \> Old/New restart files                 \\
-LATEST          \> Info file on the last restart file    \\
-\\
-GEOMETRY        \> Current ionic positions and velocities \\
-GEOMETRY.xyz    \> Current ionic positions and velocities in \AA\\
-GEOMETRY.scale  \> Current unit cell vectors in \AA and atomic units \\
-                 \> and ionic positions in scaled coordinates \\
-GSHELL          \> {\bf G}$^2$ (NOT normalized), G-shells $|{\bf G}|$ in a.u.\\
-                \> and related shell index \\
-\\
-TRAJECTORY      \> All ionic positions and velocities along the trajectory \\
-TRAJEC.xyz      \> All ionic positions along the trajectory in xyz-format\\
-TRAJEC.dcd      \> All ionic positions along the trajectory in dcd-format\\
-GEO\_OPT.xyz     \> All ionic positions along the geometry optimization\\
-                \> in xyz-format\\
-ENERGIES        \> All energies along the trajectory     \\
-MOVIE           \> Atomic coordinates in Movie format    \\
-\\
-STRESS          \> The "trajectory" of stress tensors    \\
-CELL            \> The "trajectory" of the unit cell     \\
-NOSE\_ENERGY    \> The kinetic, potential and total energies of the Nose-Hoover thermostat(s) \\
-NOSE\_TRAJEC    \> The "trajectory" of the Nose-Hoover variables and velocities \\
-CONSTRAINT      \> The "trajectory" of constraint/restraint forces \\
-METRIC          \> The "trajectory" of collective variable metric (restraints only) \\
-DIPOLE          \> The "trajectory" of dipole moments    \\
-dipole.dat      \> The dipole file produced in the spectra calculation using the propagation TDDFT scheme \\
-\\
-DENSITY.x       \> Charge density in Fourier space       \\
-SPINDEN.x       \> Spin density in Fourier space         \\
-ELF             \> Electron localization function in Fourier space \\
-LSD\_ELF        \> Spin polarized electron localisation function \\
-ELF\_ALPHA      \> Electron localisation function of the alpha density \\
-ELF\_BETA       \> Electron localisation function of the beta density \\
-WAVEFUNCTION    \> Wavefunction instead of density is stored \\
-\\
-HESSIAN         \> Approximate Hessian used in geometry optimization \\
-FINDIF          \> Positions and gradients for finite    \\
-                \> difference calculations               \\
-VIBEIGVEC       \> Eigenvectors of Hessian               \\
-MOLVIB          \> The matrix of second derivatives,     \\
-                \> as used by the program MOLVIB         \\
-VIB1.log        \> Contains the modes 4\,--\,3N in a style\\
-                \> similar to the gaussian output for    \\
-                \> visualization with MOLDEN, MOLEKEL,...\\
-VIB2.log        \> Contains the modes 1\,--\,3N-3        \\
-ENERGYBANDS     \> Eigenvalues for each k points         \\
-KPTS\_GENERATION\> Output of k points generation         \\
-WANNIER\_CENTER \> Centers of the Wannier functions      \\
-WC\_SPREAD      \> Spread of the Wannier functions      \\
-WC\_QUAD        \> Second moments of the Wannier functions as : \\
-                \> ISTEP QXX QXY QXZ QYY QYZ QZZ              \\
-IONS+CENTERS.xyz\> Trajectory of ionic positions and WFCs in \AA\\
-WANNIER\_DOS    \> Projection of the Wannier functions   \\
-                \> onto the Kohn-Sham states             \\
-WANNIER\_HAM    \> KS Hamiltonian in the Wannier states representation \\
-WANNIER\_1.x    \> Wannier orbitals or orbital densities \\
-wavefunctions   \> Containes the complex wavefunctions for Ehrenfest dynamics\\
-HARDNESS        \> Orbital hardness matrix               \\
-\\
-RESTART.NMR     \> Files needed to restart a NMR/EPR calculation \\
-RESTART.EPR      \\
-RESTART.L\_x     \\
-RESTART.L\_y     \\
-RESTART.L\_z     \\
-RESTART.p\_x     \\
-RESTART.p\_y     \\
-RESTART.p\_z     \\
-j$\alpha$\_B$\beta$.cube \> Files in .CUBE format that contain the \\
-B$\alpha$\_B$\beta$.cube \> induced current densities and magnetic fields \\
-                 \> in an NMR calculation, respectively
-                    ($\alpha,\beta$=x,y,z)\\
-\\
-PSI\_A.$i$.cube  \> Files in .CUBE format that contain (spinpolarized) \\
-PSI\_B.$i$.cube  \> orbitals and densities.\\
-RHO\_TOT.cube    \\
-RHO\_SPIN.cube   \\
-\\
-
-QMMM\_ORDER  \> Relation between the various internal atom order lists in QM/MM runs.\\
-QM\_TEMP     \> ``local'' temperatures of the QM/MM subsystems.\\
-CRD\_INI.grm \> Positions of all atoms of first step in Gromos format (QM/MM only).\\
-CRD\_FIN.grm \> Positions of all atoms of last step in Gromos format (QM/MM only).\\
-MM\_TOPOLOGY \> New Gromos format topology file (QM/MM only).\\
-ESP          \> Containes the ESP charges of the QM atoms (QM/MM only).\\
-EL\_ENERGY   \> Contains the electrostatic interaction energy (QM/MM only).\\
-MULTIPOLE    \> Contains the dipole- and the quadrupole-momenent of the quantum system.\\
-MM\_CELL\_TRANS \> Contains the trajectory of the offset of the QM cell (QM/MM only).\\
-\end{tabbing}
-
-In case of path integral runs
-every replica $s=\{1, \dots , P\}$ gets its own
-\texttt{RESTART\_$s$},
-\texttt{RESTART\_$s$.x},
-\texttt{DENSITY\_$s$.x},
-\texttt{ELF\_$s$.x},
-and
-\texttt{GEOMETRY\_$s$} file.
-
-\smallskip
-
-In contrast, in case of mean free energy path searches, each replica uses 
-its own directory for nearly all files. Exception are the file 
-\texttt{LATEST} and the geometry files named as for path integrals: 
-\texttt{GEOMETRY\_$s$}. The directories are built from the 
-\refkeyword{FILEPATH} path (or else from the environment variable 
-{\bf CPMD\_FILEPATH}) with the suffixes \texttt{\_$s$}, $s=\{1, \dots , P\}$.
-
-\medskip
-
-In general, existing files are {\bf overwritten}!
-
-\medskip
-
-  Exceptions are ``trajectory'' type files (\texttt{TRAJECTORY},
-\texttt{ENERGIES}, \texttt{MOVIE}, \texttt{STRESS}, ...), in them data are {\bf
-appended}.
-
-\clearpage
-\part{Reference Manual}
-%---------------------------------------------------------------------
-\section{Input File Reference}\label{inputfile}
-%---------------------------------------------------------------------
-The following sections \textbf{try} to explain the various keywords and
-syntax of a CPMD input file. It is not meant to teach how to
-create good CPMD input files, but as a reference manual.
-
-\subsection{Basic rules}
-\begin{itemize}
-  \item \textbf{Warning:} Do not expect the input to be logical.
-    The programmers logic may be different from yours.
-
-  \item \textbf{Warning:} This input description may not refer to the actual
-    version of the program you are using. Therefore the ultimate and
-    authoritative input guide is the source code. Most of the input
-    file is read via the code in the files\\ 
-    \texttt{control.F},  \texttt{sysin.F},    \texttt{dftin.F}, 
-    \texttt{ratom.F},    \texttt{recpnew.F},  \texttt{detsp.F},
-    \texttt{proppt.F},   \texttt{setbasis.F}, \texttt{vdwin.F},
-    \texttt{egointer.F}, \texttt{pi\_cntl.F}, \texttt{pi\_cntl.F},
-    \texttt{respin\_p.F}, \texttt{lr\_in.F},  \texttt{orbhard.F},
-    \texttt{cl\_init.F}, \texttt{cplngs.F}
-
-  \item The input is free format except when especially stated
-
-  \item In most cases, only the first 80 characters of a line are read
-   (exceptions are lists, that have to be on one line).
-
-  \item Lines that do not match a keyword are treated as comments
-    and thus ignored.\\
-    \textbf{Warning:} For most sections there will be a report of
-    unrecognized keywords. For the \verb+&ATOMS+ this is not possible,
-    so please check the atom coordinates in the output with particular
-    care.
-
-  \item Take warnings seriously. There are a few warnings, that can
-   be safely ignored under specific circumstances, but usually warnings
-   are added to a program for a good reason.
-
-  \item The order of the keywords is arbitrary unless it is explicitly
-    stated. For keywords that select one of many alternatives (e.g. the
-    algorithm for wavefunction optimization), the last one `wins'.
-
-  \item Only keywords with capital letters match
-
-  \item Lists inclosed in \textbf{\{ \}} imply that you have to choose {\bf
-    exactly one} of the items
-
-  \item Lists inclosed in \textbf{[ ]} imply that you can choose {\bf any
-    number} of items on the same line
-
-  \item Arguments to a keyword are given on the following line(s)
-
-  \item The full keyword/input line has to be within columns 1 to 80
-
-  \item There are exceptions to those rules.
-
-\end{itemize}
-%
-\clearpage
-\subsection{Input Sections}\label{sections}
-%
-The input file is composed of different sections. Each section is started by
-\verb+&SECTIONNAME+ and ended by \verb+&END+. All input outside the
-sections is ignored.
-
-\begin{tabbing}
-12345 \= 1234567890123456789 \= 12345678 \= 12345 \= \kill
-\> \&INFO ...   \> \&END  \>  $\leftrightarrow$ \>
-   A place to put comments about the job.\\
-\> The contents of this
-   section will be copied to the output file at the beginning of
-   the calculation.\\
-\\
-\> \&CPMD ...   \> \&END  \>  $\leftrightarrow$ \>
-   General control parameters for calculation (\textbf{required}).\\
-\\
-\> \&SYSTEM ... \> \&END  \>  $\leftrightarrow$ \>
-   Simulation cell and plane wave parameters (\textbf{required}).\\
-\\
-\> \&PIMD ...   \> \&END  \>  $\leftrightarrow$ \>
-   Path integral molecular dynamics (PIMD)\\
-\> This section is only evaluated if the \refkeyword{PATH INTEGRAL}
-   keyword is given in the \&CPMD section.\\
-\\
-\> \&PATH ...   \> \&END  \>  $\leftrightarrow$ \>
-   Mean free energy path calculation (MFEP)\\
-\> This section is only evaluated if the \refkeyword{PATH MINIMIZATION}
-   keyword is given in the \&CPMD section.\\
-\\
-\> \&ATOMS ...  \> \&END  \>  $\leftrightarrow$ \>
-   Atoms and pseudopotentials and related parameters (\textbf{required}).\\
-\> Section \ref{S_Pseudopotentials} explains the usage of
-   pseudopotentials in more detail.\\
-\\
-\> \&DFT ...    \> \&END  \>  $\leftrightarrow$ \>
-   Exchange and correlation functional and related parameters.\\
-\\
-\> \&PROP ...   \> \&END  \>  $\leftrightarrow$ \>
-   Calculation of properties\\
-\> This section is only fully evaluated if the \refkeyword{PROPERTIES} keyword
-   is given in the \&CPMD section.\\
-\\
-\> \&BASIS ...  \> \&END  \>  $\leftrightarrow$ \>
-   Atomic basis sets for properties or initial guess\\
-\\
-\> \&RESP ...  \> \&END  \>  $\leftrightarrow$ \>
-   Response calculations \\
-\> This section is always evaluated, even if it is not used.\\
-\\
-\> \&PTDDFT ...  \> \&END  \>  $\leftrightarrow$ \>
-   Propagation TDDFT for Ehrenfest dynamics and spectra calculation \\
-\\
-\> \&LINRES ...  \> \&END  \>  $\leftrightarrow$ \>
-   General input for HARDNESS and TDDFT calculations \\
-\\
-\> \&HARDNESS ...  \> \&END  \>  $\leftrightarrow$ \>
-   Input for HARDNESS calculations \\
-\> This section is only evaluated if the
-   \refkeyword{ORBITAL HARDNESS}~\textbf{LR}\\
-\> keyword is given in the \&CPMD section.\\
-\\
-\> \&TDDFT ...  \> \&END  \>  $\leftrightarrow$ \>
-   Input for TDDFT calculations \\
-\\
-\> \&QMMM ...  \> \&END  \>  $\leftrightarrow$ \>
-   Input for Gromos QM/MM interface (see section \ref{sec:qmmm}).\\
-\> \textbf{Required} if the \refkeyword{QMMM} keyword is given in the \&CPMD section \\
-\\
-\> \&CLASSIC ...  \> \&END  \>  $\leftrightarrow$ \>
-   Simple classical code interface \\
-\\
-\> \&EXTE ...  \> \&END  \>  $\leftrightarrow$ \>
-   External field definition for EGO QM/MM interface \\
-\\
-\> \&VDW ...    \> \&END  \>  $\leftrightarrow$ \>
-   Empirical van der Waals correction\\
-   or van der Waals interaction based on Wannier functions \\
-\> This section is only evaluated if the keyword \refkeyword{VDW CORRECTION}
-   or, alternatively, \refkeyword{VDW WANNIER} is given in the \&CPMD section.\\
-\end{tabbing}
-
-  A detailed discussion of the different keywords will be given in the
-following section.
-
-\clearpage
-%
-%---------------------------------------------------------------------
-\subsection{List of Keywords by Sections}
-%
-\subsubsection[\&CPMD ... \&END]{\&CPMD $\ldots$ \&END}
-\parindent=0pt
-\options{}{}{}
-\refkeyword{ALEXANDER MIXING}\options{}{}{}
-\refkeyword{ALLTOALL}\options{\{SINGLE,DOUBLE\}}{}{}
-\refkeyword{ANDERSON MIXING}\options{}{}{}
-\refkeyword{ANNEALING}\options{\{IONS,ELECTRONS,CELL\}}{}{}
-\refkeyword{BENCHMARK}\options{}{}{}
-\refkeyword{BERENDSEN}\options{\{IONS,ELECTRONS,CELL\}}{}{}
-\refkeyword{BFGS}\options{}{}{}
-\refkeyword{BLOCKSIZE STATES}\options{}{}{}
-\refkeyword{BOGOLIUBOV CORRECTION}\options{}{[OFF]}{}
-\refkeyword{BOX WALLS}\options{}{}{}
-\refkeyword{BROYDEN MIXING}\options{}{}{}
-\refkeyword{CDFT}\options{}{[NEWTON, DEKKER],[SPIN, ALL, PCGFI, RESWF, NOCCOR, HDA[AUTO, PHIOUT, PROJECT]]}{}
-\refkeyword{CENTER MOLECULE}\options{}{[OFF]}{}
-\refkeyword{CHECK MEMORY}\options{}{}{}
-\refkeyword{CLASSTRESS}\options{}{}{}
-\refkeyword{CMASS}\options{}{}{}
-\refkeyword{COMBINE SYSTEMS}\options{}{[REFLECT,NONORTH,SAB]}{}
-\refkeyword{COMPRESS}\options{\{WRITEnn\}}{}{}
-\refkeyword{CONJUGATE GRADIENTS}\options{\{ELECTRONS, IONS\}}{}{}
-\refkeyword{CONVERGENCE}\options{}{[ORBITALS, GEOMETRY, CELL]}{}
-\refspekeyword{CONVERGENCE}{CONVERGENCE 2}\options{}{[ADAPT, ENERGY, CALFOR, RELAX, INITIAL]}{}
-\refspekeyword{CONVERGENCE}{CONVERGENCE 3}\options{}{[CONSTRAINT]}{}
-\refspekeyword{CP\_GROUPS}{CP GROUPS}\options{}{}{}
-\refkeyword{CZONES}\options{}{[SET]}{}
-\refkeyword{DAMPING}\options{\{IONS,ELECTRONS,CELL\}}{}{}
-\refkeyword{DAVIDSON DIAGONALIZATION}\options{}{}{}
-\refkeyword{DAVIDSON PARAMETER}\options{}{}{}
-\refkeyword{DEBUG FILEOPEN}\options{}{}{}
-\refkeyword{DEBUG FORCES}\options{}{}{}
-\refkeyword{DEBUG MEMORY}\options{}{}{}
-\refkeyword{DEBUG NOACC}\options{}{}{}
-\refkeyword{DIIS MIXING}\options{}{}{}
-\refkeyword{DIPOLE DYNAMICS}\options{\{SAMPLE,WANNIER\}}{}{}
-\refkeyword{DISTRIBUTED LINALG}\options{\{ON,OFF\}}{}{}
-\refkeyword{DISTRIBUTE FNL}\options{}{}{}
-\refkeyword{ELECTRONIC SPECTRA}\options{}{}{}
-\refkeyword{ELECTROSTATIC POTENTIAL}\options{}{[SAMPLE=nrhoout]}{}
-\refkeyword{ELF}\options{}{[PARAMETER]}{}
-\refkeyword{EMASS}\options{}{}{}
-\refkeyword{ENERGYBANDS}\options{}{}{}
-\refkeyword{EXTERNAL POTENTIAL}\options{\{ADD\}}{}{}
-\refkeyword{EXTRAPOLATE WFN}\options{\{STORE\}}{}{}
-\refkeyword{EXTRAPOLATE CONSTRAINT}\options{}{}{}
-\refkeyword{FFTW WISDOM}\options{}{[ON,OFF]}{}
-\refkeyword{FILE FUSION}\options{}{}{}
-\refkeyword{FILEPATH}\options{}{}{}
-\refkeyword{FINITE DIFFERENCES}\options{}{}{}
-\refkeyword{FIXRHO UPWFN}\options{}{}{}
-\refkeyword{FREE ENERGY FUNCTIONAL}\options{}{}{}
-\refkeyword{GDIIS}\options{}{}{}
-\refkeyword{GSHELL}\options{}{}{}
-\refkeyword{HAMILTONIAN CUTOFF}\options{}{}{}
-\refkeyword{HARMONIC REFERENCE SYSTEM}\options{}{[OFF]}{}
-\refkeyword{HESSCORE}\options{}{}{}
-\refkeyword{HESSIAN}\options{}{[DISCO,SCHLEGEL,UNIT,PARTIAL]}{}
-\refkeyword{IMPLICIT NEWTON RAPHSON}\options{options}{}{}
-\refkeyword{INITIALIZE WAVEFUNCTION}\options{\{RANDOM, ATOMS\}}{[PRIMITIVE]}{}
-\refkeyword{INTERFACE}\options{\{EGO,GMX\}}{\{[MULLIKEN, LOWDIN, ESP, HIRSHFELD],PCGFIRST\}}{}
-\refkeyword{INTFILE}{[READ,WRITE,FILENAME]}\options{}{}{}
-\refkeyword{ISOLATED MOLECULE}\options{}{}{}
-\refkeyword{KOHN-SHAM ENERGIES}\options{}{[OFF,NOWAVEFUNCTION]}{}
-\refkeyword{KSHAM}\options{}{[MATRIX,ROUT,STATE]}{}
-\refkeyword{LANCZOS DIAGONALIZATION}\options{\{ALL\}}{}{}
-\refspekeyword{LANCZOS DIAGONALIZATION}{LANCZOS DIAGONALIZATION OPT}\options{\{OPT,RESET=n\}}{}{}
-\refkeyword{LANCZOS PARAMETER}\options{[N=n]}{[ALL]}{}
-\refkeyword{LANGEVIN}\options{\{WHITE, CPMD, OPTIMAL, SMART, CUSTOM\}}{[MOVECOM]}{}
-\refkeyword{LBFGS}\options{}{[NREM, NTRUST, NRESTT, TRUSTR]}{}
-\refkeyword{LINEAR RESPONSE}\options{}{}{}
-\refkeyword{LSD}\options{}{}{}
-\refkeyword{LOCAL SPIN DENSITY}\options{}{}{}
-\refkeyword{MAXRUNTIME}\options{}{}{}
-\refkeyword{MAXITER}\options{}{}{}
-\refkeyword{MAXSTEP}\options{}{}{}
-\refkeyword{MEMORY}\options{}{[SMALL, BIG]}{}
-\refkeyword{MIRROR}\options{}{}{}
-\refkeyword{MIXDIIS}\options{}{}{}
-\refkeyword{MIXSD}\options{}{}{}
-\refkeyword{MODIFIED GOEDECKER}\options{[PARAMETERS]}{}{}
-\refkeyword{MOLECULAR DYNAMICS}\options{\{CP, BO, EH, PT, CLASSICAL, FILE [XYZ, NSKIP=N, NSAMPLE=M]\}}{}{}
-\refkeyword{MOVERHO}\options{}{}{}
-\refkeyword{MOVIE}\options{}{[OFF, SAMPLE]}{}
-\refkeyword{NOGEOCHECK}\options{}{}{}
-\refkeyword{NONORTHOGONAL ORBITALS}\options{}{[OFF]}{}
-\refkeyword{NOSE}\options{\{IONS, ELECTRONS, CELL\}}{[ULTRA,MASSIVE,CAFES]}{}
-\refkeyword{NOSE PARAMETERS}\options{}{}{}
-\refkeyword{ODIIS}\options{}{[NOPRECONDITIONING,NO\_RESET=nreset]}{}
-\refkeyword{OPTIMIZE GEOMETRY}\options{}{[XYZ, SAMPLE]}{}
-\refkeyword{OPTIMIZE WAVEFUNCTION}\options{}{}{}
-\refkeyword{ORBITAL HARDNESS}\options{\{LR,FD\}}{}{}
-\refkeyword{ORTHOGONALIZATION}\options{}{[LOWDIN, GRAM-SCHMIDT]}{[MATRIX]}
-\refspekeyword{PARA\_BUFF\_SIZE}{PARA BUFF SIZE}\options{}{}{}
-\refspekeyword{PARA\_STACK\_BUFF\_SIZE}{PARA STACK BUFF SIZE}\options{}{}{}
-\refspekeyword{PARA\_USE\_MPI\_IN\_PLACE}{PARA USE MPI IN PLACE}\options{}{}{}
-\refkeyword{PARRINELLO-RAHMAN}\options{\{NPT,SHOCK\}}{}{}
-\refkeyword{PATH INTEGRAL}\options{}{}{}
-\refkeyword{PATH MINIMIZATION}\options{}{}{}
-\refkeyword{PATH SAMPLING}\options{}{}{}
-\refkeyword{PCG}\options{}{[MINIMIZE,NOPRECONDITIONING]}{}
-\refkeyword{PRFO}\options{}{[MODE, MDLOCK, TRUSTP, OMIN, PRJHES, DISPLACEMENT, HESSTYPE]}{}
-\refspekeyword{PRFO}{PRFO NVAR}\options{}{[NVAR, CORE, TOLENV, NSMAXP]}{}
-\refkeyword{PRFO NSVIB}\options{}{}{}
-\refkeyword{PRINT}\options{\{ON,OFF\}}{options}{}
-\refkeyword{PRINT ENERGY}\options{ \{ON, OFF\}} {options}{}
-\refkeyword{PRNGSEED}\options{}{}{}
-\refkeyword{PROJECT}\options{\{NONE, DIAGONAL, FULL\}}{}{}
-\refkeyword{PROPAGATION SPECTRA}\options{}{}{}
-\refkeyword{PROPERTIES}\options{}{}{}
-\refkeyword{QUENCH}\options{}{[IONS, ELECTRONS, CELL, BO]}{}
-\refkeyword{RANDOMIZE}\options{}{[COORDINATES, WAVEFUNCTION], [DENSITY,
-    CELL]}{}
-\refkeyword{RATTLE}\options{}{}{}
-\refkeyword{REAL SPACE WFN KEEP}\options{}{[SIZE]}{}
-\refkeyword{RESCALE OLD VELOCITIES}\options{}{}{}
-\refkeyword{RESTART}\options{}{}{[{options}]}
-\refkeyword{RESTFILE}\options{}{}{}
-\refkeyword{REVERSE VELOCITIES}\options{}{}{}
-\refkeyword{RFO ORDER=nsorder}\options{}{}{}
-\refkeyword{RHOOUT}\options{}{[BANDS,SAMPLE=nrhoout]}{}
-\refkeyword{ROKS}\options{}{\{SINGLET, TRIPLET\},\{DELOCALIZED, LOCALIZED, GOEDECKER\}}{}
-\refkeyword{SCALED MASSES}\options{}{[OFF]}{}
-\refkeyword{SHIFT POTENTIAL}\options{}{}{}
-\refkeyword{SPLINE}\options{}{[POINTS, QFUNCTION, INIT, RANGE]}{}
-\refkeyword{SSIC}\options{}{}{}
-\refkeyword{STEEPEST DESCENT}\options{}{[ELECTRONS, IONS, CELL,
-    NOPRECONDITIONING, LINE]}{}
-\refkeyword{STORE}\options{ \{OFF\}} {[WAVEFUNCTIONS, DENSITY, POTENTIAL]}{}
-\refspekeyword{STRESS TENSOR}{STRESS TENSOR CPMD}\options{}{}{}
-\refkeyword{STRUCTURE}\options{}{[BONDS, ANGLES, DIHEDRALS, SELECT]}{}
-\refkeyword{SUBTRACT}\options{}{[COMVEL, ROTVEL]}{}
-\refkeyword{SURFACE HOPPING}\options{}{}{}
-%\refkeyword{TASKGROUPS}\options{}{[MINIMAL,MAXIMAL,CARTESIAN]}{}
-\refkeyword{TDDFT}\options{}{}{}
-\refkeyword{TEMPCONTROL}\options{}{{IONS, ELECTRONS, CELL}}{}
-\refkeyword{TEMPERATURE}\options{}{[RAMP]}{}
-\refkeyword{TEMPERATURE ELECTRON}\options{}{}{}
-\refkeyword{TIMESTEP}\options{}{}{}
-\refkeyword{TIMESTEP ELECTRONS}\options{}{}{}
-\refkeyword{TIMESTEP IONS}\options{}{}{}
-\refkeyword{TRACE}\options{}{[ALL,MASTER]}{}
-\refspekeyword{TRACE\_PROCEDURE}{TRACE PROCEDURE}\options{}{}{}
-\refspekeyword{TRACE\_MAX\_DEPTH}{TRACE MAX DEPTH}\options{}{}{}
-\refspekeyword{TRACE\_MAX\_CALLS}{TRACE MAX CALLS}\options{}{}{}
-\refkeyword{TRAJECTORY}\options{}{[OFF, XYZ, DCD, SAMPLE, BINARY, RANGE, FORCES]}{}
-\refkeyword{TROTTER FACTOR}\options{}{}{}
-\refkeyword{TROTTER FACTORIZATION OFF}\options{}{}{}
-\refspekeyword{USE\_IN\_STREAM}{USE IN STREAM}\options{}{}{}
-\refspekeyword{USE\_OUT\_STREAM}{USE OUT STREAM}\options{}{}{}
-\refspekeyword{USE\_MPI\_IO}{USE MPI IO}\options{}{}{}
-\refkeyword{QMMM}\options{}{[QMMMEASY]}{}{}{}
-%_FM[
-\refkeyword{FORCEMATCH}\options{}{}{}
-%_FM]
-\refkeyword{VGFACTOR}\options{}{}{}
-\refkeyword{VIBRATIONAL ANALYSIS}\options{}{[FD, LR, IN], [GAUSS, SAMPLE, ACLIMAX]}{}
-\refkeyword{VMIRROR}\options{}{}{}
-\refkeyword{VDW CORRECTION}\options{}{[ON, OFF]}{}
-\refkeyword{VDW WANNIER}\options{}{}{}
-\refkeyword{WANNIER DOS}\options{}{}{}
-\refkeyword{WANNIER MOLECULAR}\options{}{}{}
-\refkeyword{WANNIER NPROC}\options{}{}{}
-\refkeyword{WANNIER OPTIMIZATION}\options{\{SD,JACOBI,SVD\}}{}{}
-\refkeyword{WANNIER PARAMETER}\options{}{}{}
-\refkeyword{WANNIER REFERENCE}\options{}{}{}
-\refspekeyword{WANNIER RELOCALIZE\_EVERY}{WANNIER RELOCALIZE EVERY}\options{}{}{}
-\refspekeyword{WANNIER RELOCALIZE\_IN\_SCF}{WANNIER RELOCALIZE IN SCF}\options{}{}{}
-\refkeyword{WANNIER SERIAL}\options{}{}{}
-\refkeyword{WANNIER TYPE}\options{\{VANDERBILT,RESTA\}}{}{}
-\refkeyword{WANNIER WFNOUT}\options{}{[ALL,PARTIAL,LIST,DENSITY]}{}
-\refkeyword{WOUT}\options{}{[FULL]}{}
-%
-%
-\subsubsection[\&SYSTEM ... \&END]{\&SYSTEM $\ldots$ \&END}
-%
-\options{}{}{}
-\refkeyword{ACCEPTOR}\options{}{[HDASINGLE,WMULT]}{}
-\refkeyword{ANGSTROM}\options{}{}{}
-\refkeyword{CELL}\options{}{[ABSOLUTE, DEGREE, VECTORS]}{}
-\refkeyword{CHARGE}\options{}{}{}
-\refkeyword{CHECK SYMMETRY}\options{}{[OFF]}{}
-\refkeyword{CLASSICAL CELL}\options{}{[ABSOLUTE, DEGREE]}{}
-\refkeyword{CLUSTER}\options{}{}{}
-\refkeyword{CONSTANT CUTOFF}\options{}{}{}
-\refkeyword{COUPLINGS}\options{\{FD,PROD\}}{[NAT]}{}
-\refkeyword{COUPLINGS LINRES}\options{\{BRUTE FORCE,NVECT\}}{[THR,TOL]}{}
-\refkeyword{COUPLINGS NSURF}\options{}{}{}
-\refkeyword{CUTOFF}\options{}{[SPHERICAL,NOSPHERICAL]}{}
-\refkeyword{DENSITY CUTOFF}\options{}{[NUMBER]}{}
-\refkeyword{DONOR}\options{}{}{}
-\refkeyword{DUAL}\options{}{}{}
-\refkeyword{ENERGY PROFILE}\options{}{}{}
-\refkeyword{EXTERNAL FIELD}\options{}{}{}
-\refkeyword{HFX CUTOFF}\options{}{}{}
-\refkeyword{ISOTROPIC CELL}\options{}{}{}
-\refkeyword{KPOINTS}\options{}{}{options}
-\refkeyword{LOW SPIN EXCITATION}\options{}{}{}
-\refkeyword{LOW SPIN EXCITATION LSETS}\options{}{}{}
-\refkeyword{LSE PARAMETERS}\options{}{}{}
-\refkeyword{MESH}\options{}{}{}
-\refkeyword{MULTIPLICITY}\options{}{}{}
-\refkeyword{OCCUPATION}\options{}{[FIXED]}{}
-\refkeyword{NSUP}\options{}{}{}
-\refkeyword{POINT GROUP}\options{}{[MOLECULE], [AUTO], [DELTA=delta]}{}
-\refkeyword{POISSON SOLVER}\options{ \{HOCKNEY, TUCKERMAN, MORTENSEN\}}{[PARAMETER]}{}
-\refkeyword{POLYMER}\options{}{}{}
-\refkeyword{PRESSURE}\options{}{}{}
-\refkeyword{REFERENCE CELL}\options{}{[ABSOLUTE, DEGREE, VECTORS]}{}
-\refkeyword{SCALE}\options{}{[CARTESIAN]}{[S=sascale] [SX=sxscale] [SY=syscale]
-  [SZ=szscale]}
-\refkeyword{STATES}\options{}{}{}
-\refspekeyword{STRESS TENSOR}{STRESS TENSOR SYSTEM}\options{}{}{}
-\refkeyword{SURFACE}\options{}{}{}
-\refkeyword{SYMMETRIZE COORDINATES}\options{}{}{}
-\refkeyword{SYMMETRY}\options{}{}{}
-\refkeyword{TESR}\options{}{}{}
-\refkeyword{WGAUSS}\options{}{}{NWG}
-\refkeyword{WCUT}\options{}{}{CUT}
-\refkeyword{ZFLEXIBLE CELL}\options{}{}{}
-%
-%
-\subsubsection[\&PIMD ... \&END]{\&PIMD $\ldots$ \&END}
-%
-\options{}{}{}
-\refkeyword{CENTROID DYNAMICS}\options{}{}{}
-\refkeyword{CLASSICAL TEST}\options{}{}{}
-\refkeyword{DEBROGLIE}\options{}{[CENTROID]}{}
-\refkeyword{FACMASS}\options{}{}{}
-\refkeyword{GENERATE REPLICAS}\options{}{}{}
-\refkeyword{INITIALIZATION}\options{}{}{}
-\refkeyword{NORMAL MODES}\options{}{}{}
-\refkeyword{OUTPUT}\options{}{[ALL, GROUPS, PARENT]}{}
-\refkeyword{PRINT LEVEL}\options{}{}{}
-\refkeyword{PROCESSOR GROUPS}\options{}{}{}
-\refkeyword{READ REPLICAS}\options{}{}{}
-\refkeyword{STAGING}\options{}{}{}
-\refkeyword{TROTTER DIMENSION}\options{}{}{}
-%
-%
-\subsubsection[\&PATH ... \&END]{\&PATH $\ldots$ \&END}
-%
-This section contains specific information for Mean Free Energy Path 
-searches\cite{Eijnden06}. However, the space of collective variables in 
-which the search will be performed has to be defined using {\bf restraints} 
-in the \&ATOMS$\ldots$\&END section (see \ref{sec:cnstr}). The initial string 
-in this collective variable space is read in an external file 
-{\em STRING.0}. 
-%{\em string.inp}. 
-This file contains one line per replica, each giving first the replica index and then 
-the list of collective variables values. The basename for directories where each replica 
-is ran should also be specified using the \refkeyword{FILEPATH}, or else the environment 
-variable {\bf CPMD\_FILEPATH}.
-The code writes the files CONSTRAINT.x and METRIC.x during the execution, where x is
-the string number. 
-
-\options{}{}{}
-\refkeyword{REPLICA NUMBER}\options{}{}{}
-\refkeyword{NLOOP}\options{}{}{} 
-\refkeyword{NEQUI}\options{}{}{}
-\refkeyword{NPREVIOUS}\options{}{}{}
-\refkeyword{FACTOR}\options{}{}{}
-\refkeyword{ALPHA}\options{}{}{}
-\refkeyword{OUTPUT}\options{}{[ALL, GROUPS, PARENT]}{}
-\refkeyword{PRINT LEVEL}\options{}{}{}
-\refkeyword{PROCESSOR GROUPS}\options{}{}{}
-%
-%
-\subsubsection[\&PTDDFT ... \&END]{\&PTDDFT $\ldots$ \&END}
-%
-This section contains specific information for Ehrenfest dynamics and the
-spectra calculation computed using the propagation of the perturbed KS orbitals
-(Fourier transform of the induced dipole fluctuation).
-searches\cite{taver_eh,taver1}. 
-
-\options{}{}{}
-\refkeyword{ACCURACY}\options{}{}{}
-\refspekeyword{PROP\_TSTEP}{PROP-TSTEP}\options{}{}{}
-\refspekeyword{EXT\_PULSE}{EXT-PULSE}\options{}{}{}
-\refspekeyword{EXT\_POTENTIAL}{EXT-POTENTIAL}\options{}{}{}
-\refspekeyword{N\_CYCLES}{N-CYCLES}\options{}{}{}
-\refspekeyword{PERT\_TYPE}{PERT-TYPE}\options{}{}{}
-\refspekeyword{PERT\_AMPLI}{PERT-AMPLI}\options{}{}{}
-\refspekeyword{PERT\_DIRECTION}{PERT-DIRECTION}\options{}{}{}
-\refkeyword{RESTART}\options{}{}{}
-\refspekeyword{TD\_POTENTIAL}{TD-POTENTIAL}\options{}{}{}
-\refkeyword{PIPULSE}\options{}{}{}
-%
-\subsubsection[\&ATOMS ... \&END]{\&ATOMS $\ldots$ \&END}
-%
-This section also contains information on the pseudopotentials to be used. See
-section \ref{S_Pseudopotentials} for more details on this.
-%The following \options gives proper indentation, but it is a bad solution
-
-\options{}{}{}
-\refkeyword{ATOMIC CHARGES}\options{}{}{}
-\refkeyword{CHANGE BONDS}\options{}{}{}
-\refkeyword{CONFINEMENT POTENTIAL}\options{}{}{}
-\refkeyword{CONSTRAINTS ... END CONSTRAINTS}\options{}{}{}
-\refkeyword{METADYNAMICS ... END METADYNAMICS}\options{}{}{}
-\refkeyword{DUMMY ATOMS}\options{}{}{}
-\refkeyword{GENERATE COORDINATES}\options{}{}{}
-\refkeyword{ISOTOPE}\options{}{}{}
-\refkeyword{MOVIE TYPE}\options{}{}{}
-\refkeyword{VELOCITIES ... END VELOCITIES}\options{}{}{}
-%
-%
-\subsubsection[\&DFT ... \&END]{\&DFT $\ldots$ \&END}
-%
-\options{}{}{}
-\refkeyword{ACM0}\options{}{}{}
-\refkeyword{ACM1}\options{}{}{}
-\refkeyword{ACM3}\options{}{}{}
-\refkeyword{BECKE BETA}\options{}{}{}
-\refkeyword{EXCHANGE CORRELATION TABLE}\options{}{[NO]}{}
-\refkeyword{FUNCTIONAL}\options{}{}{functionals}
-\refkeyword{HARTREE}\options{}{}{}
-\refkeyword{HARTREE-FOCK}\options{}{}{}
-\refspekeyword{HFX\_BLOCK\_SIZE}{HFX BLOCK SIZE}\options{}{}{}
-\refspekeyword{HFX\_DISTRIBUTION}{HFX DISTRIBUTION}\options{}{[BLOCK\_CYCLIC,DYNAMIC]}{}
-\refkeyword{HFX SCREENING}\options{\{WFC,DIAG,EPS\_INT,RECOMPUTE\_TWO\_INT\_LIST\_EVERY\}}{}{}
-\refkeyword{GC-CUTOFF}\options{}{}{}
-\refkeyword{GRADIENT CORRECTION}\options{}{}{functionals}
-\refkeyword{LDA CORRELATION}\options{}{}{functional}
-\refkeyword{LR KERNEL}\options{}{}{functionals}
-\refkeyword{NEWCODE}\options{}{}{}
-\refkeyword{OLDCODE}\options{}{}{}
-\refkeyword{SLATER}\options{}{[NO]}{}
-\refkeyword{SMOOTH}\options{}{}{}
-\refkeyword{REFUNCT}\options{}{}{functionals}
-%
-%
-\subsubsection[\&PROP ... \&END]{\&PROP $\ldots$ \&END}
-%
-The keyword \refkeyword{PROPERTIES} has to be present in the \&CPMD-section of
-the input-file if this section shall be evaluated.
-%The following \options gives proper indentation, but it is a bad solution
-
-\options{}{}{}
-\refkeyword{CHARGES}\options{}{}{}
-\refkeyword{CONDUCTIVITY}\options{}{}{}
-\refkeyword{CORE SPECTRA}\options{}{}{}
-\refkeyword{CUBECENTER}\options{}{}{}
-\refkeyword{CUBEFILE}\options{\{ORBITALS,DENSITY\}}{[HALFMESH]}{}
-\refkeyword{DIPOLE MOMENT}\options{}{[BERRY,RS]}{}
-\refkeyword{EXCITED DIPOLE}\options{}{}{}
-\refkeyword{LDOS}\options{}{}{}
-\refkeyword{LOCALIZE}\options{}{}{}
-\refkeyword{OPTIMIZE SLATER EXPONENTS}\options{}{}{}
-\refkeyword{LOCAL DIPOLE}\options{}{}{}
-\refkeyword{NOPRINT ORBITALS}\options{}{}{}
-\refkeyword{POLARISABILITY}\options{}{}{}
-\refkeyword{POPULATION ANALYSIS}\options{}{[MULLIKEN, DAVIDSON, n-CENTER]}{}
-\refkeyword{PROJECT WAVEFUNCTION}\options{}{}{}
-\refkeyword{TRANSITION MOMENT}\options{}{}{}
-\refkeyword{n-CENTER CUTOFF}\options{}{}{}
-\refkeyword{AVERAGED POTENTIAL}\options{}{}{}
-%
-%
-\subsubsection[\&RESP ... \&END]{\&RESP $\ldots$ \&END}
-%
-\options{}{}{}
-\refkeyword{CG-ANALYTIC}\options{}{}{}
-\refkeyword{CG-FACTOR}\options{}{}{}
-\refspekeyword{CONVERGENCE}{CONVERGENCE RESP}\options{}{}{}
-\refkeyword{DISCARD}\options{}{[OFF, PARTIAL, TOTAL, LINEAR]}{}
-\refkeyword{EIGENSYSTEM}\options{}{}{}
-\refkeyword{EPR}\options{}{}{options}
-\refkeyword{FUKUI}\options{}{[N=nf, COEFFICIENTS]}{}
-\refspekeyword{HAMILTONIAN CUTOFF}{HAMILTONIAN CUTOFF RESP}\options{}{}{}
-\refkeyword{HARDNESS}\options{}{}{}
-\refkeyword{INTERACTION}\options{}{}{}
-\refkeyword{KEEPREALSPACE}\options{}{}{}
-\refkeyword{KPERT}\options{}{}{options}
-\refkeyword{LANCZOS}\options{}{ [CONTINUE,DETAILS]}{}
-\refkeyword{NMR}\options{}{}{options}
-\refkeyword{NOOPT}\options{}{}{}
-\refkeyword{OACP}\options{}{[DENSITY, REF\_DENSITY, FORCE]}{}
-\refkeyword{PHONON}\options{}{}{}
-\refkeyword{POLAK}\options{}{}{}
-\refkeyword{RAMAN}\options{}{}{}
-\refkeyword{TIGHTPREC}\options{}{}{}
-%
-%
-\subsubsection[\&LINRES ... \&END]{\&LINRES $\ldots$ \&END}
-\reflabel{inputkw:linres}{}
-%
-\options{}{}{}
-\refspekeyword{CONVERGENCE}{CONVERGENCE LINRES}\options{}{}{}
-\refkeyword{DIFF FORMULA}\options{}{}{}
-\refkeyword{HTHRS}\options{}{}{}
-\refspekeyword{MAXSTEP}{MAXSTEP LINRES}\options{}{}{}
-\refkeyword{OPTIMIZER}\options{}{[SD,DIIS,PCG,AUTO]}{}
-\refspekeyword{QS\_LIMIT}{QS-LIMIT}\options{}{}{}
-\refkeyword{STEPLENGTH}\options{}{}{}
-\refkeyword{THAUTO}\options{}{}{}
-\refspekeyword{XC\_ANALYTIC}{XC-ANALYTIC}\options{}{}{}
-\refspekeyword{XC\_DD\_ANALYTIC}{XC-DD-ANALYTIC}\options{}{}{}
-\refspekeyword{XC\_EPS}{XC-EPS}\options{}{}{}
-\refkeyword{ZDIIS}\options{}{}{}
-\refkeyword{GAUGE}\options{\{PARA,GEN,ALL\}}{}{}
-%
-%
-\subsubsection[\&TDDFT ... \&END]{\&TDDFT $\ldots$ \&END}
-\reflabel{inputkw:tddft}{}
-%
-\options{}{}{}
-\refspekeyword{DAVIDSON PARAMETER}{DAVIDSON PARAMETER TDDFT}\options{}{}{}
-\refkeyword{DAVIDSON RDIIS}\options{}{}{}
-\refkeyword{DIAGONALIZER}\options{\{DAVIDSON,NONHERMIT,PCG\}}{[MINIMIZE]}{}
-\refkeyword{FORCE STATE}\options{}{}{}
-\refkeyword{LOCALIZATION}\options{}{}{}
-\refkeyword{MOLECULAR STATES}\options{}{}{}
-\refkeyword{LZ-SHTDDFT}\options{}{}{}
-\refkeyword{LR-TDDFT}\options{}{}{}
-\refkeyword{PCG PARAMETER}\options{}{}{}
-\refkeyword{PROPERTY}\options{\{ STATE \}}{}{}
-\refspekeyword{RANDOMIZE}{RANDOMIZE TDDFT}\options{}{}{}
-\refkeyword{REORDER}\options{}{}{}
-\refkeyword{REORDER LOCAL}\options{}{}{}
-\refkeyword{ROTATION PARAMETER}\options{}{}{}
-\refspekeyword{STATES}{STATES TDDFT}\options{}{[MIXED,SINGLET,TRIPLET]}{}
-\refkeyword{T-SHTDDFT}\options{}{}{}
-\refkeyword{TAMM-DANCOFF}\options{}{[SUBSPACE,OPTIMIZE]}{}
-\refspekeyword{TD\_METHOD\_A}{TD METHOD A}\options{}{[ \em functionals ]}{}%
-%
-\subsubsection[\&HARDNESS ... \&END]{\&HARDNESS $\ldots$ \&END}
-%
-%
-\options{}{}{}
-\refkeyword{DIAGONAL}\options{}{[OFF]}{}
-\refspekeyword{LOCALIZE}{LOCALIZE HARDNESS}\options{}{}{}
-\refkeyword{ORBITALS}\options{}{}{}
-\refkeyword{REFATOM}\options{}{}{}
-%
-%
-\subsubsection[\&CLASSIC ... \&END]{\&CLASSIC $\ldots$ \&END}
-%
-\options{}{}{}
-\refkeyword{FORCE FIELD ... END FORCE FIELD}\options{}{}{}
-\refkeyword{FREEZE QUANTUM}\options{}{}{}
-\refkeyword{FULL TRAJECTORY}\options{}{}{}
-\refkeyword{PRINT COORDINATES}\options{}{}{}
-\refkeyword{PRINT FF}\options{}{}{}
-%
-\subsubsection[\&VDW ... \&END]{\&VDW $\ldots$ \&END}
-%
-\options{}{}{}
-\refkeyword{VDW PARAMETERS}\options{}{}{}
-\refkeyword{VDW-CUTOFF}\options{}{}{}
-\refkeyword{VDW-CELL}\options{}{}{}
-\refkeyword{VDW WANNIER}\options{}{}{}
-%
-\subsubsection[\&QMMM ... \&END]{\&QMMM $\ldots$ \&END}
-%
-\options{}{}{}
-\refkeyword{COORDINATES}\options{}{}{}
-\refkeyword{INPUT}\options{}{}{}
-\refkeyword{TOPOLOGY}\options{}{}{}
-\refspekeyword{ADD\_HYDROGEN}{ADD-HYDROGEN}\options{}{}{}
-\refkeyword{AMBER}\options{}{}{}
-\refkeyword{ARRAYSIZES ... END ARRAYSIZES}\options{}{}{}
-\refkeyword{BOX TOLERANCE}\options{}{}{}
-\refkeyword{BOX WALLS}\options{}{}{}
-\refkeyword{CAPPING}\options{}{}{}
-\refspekeyword{CAP\_HYDROGEN}{CAP-HYDROGEN}\options{}{}{}
-%\refkeyword{CHARGE...}\options{}{}{}
-\refkeyword{ELECTROSTATIC COUPLING}\options{[LONG RANGE]}{}{}
-\refkeyword{ESPWEIGHT}\options{}{}{}
-\refkeyword{EXCLUSION}\options{\{GROMOS,LIST\{NORESP\}\}}{}{}
-\refkeyword{FLEXIBLE WATER}\options{[ALL,BONDTYPE]}{}{}
-%_FM[
-\refkeyword{FORCEMATCH ... END FORCEMATCH}\options{}{}{}
-%_FM[
-\refkeyword{GROMOS}\options{}{}{}
-\refkeyword{HIRSHFELD}\options{[ON,OFF]}{}{}
-\refkeyword{MAXNN}\options{}{}{}
-\refkeyword{NOSPLIT}\options{}{}{}
-\refspekeyword{RCUT\_NN}{RCUT-NN}\options{}{}{}
-\refspekeyword{RCUT\_MIX}{RCUT-MIX}\options{}{}{}
-\refspekeyword{RCUT\_ESP}{RCUT-ESP}\options{}{}{}
-\refkeyword{RESTART TRAJECTORY}\options{[FRAME \{num\},FILE '\{fname\}',REVERSE]}{}{}
-\refkeyword{SAMPLE INTERACTING}\options{[OFF,DCD]}{}{}
-\refkeyword{SPLIT}\options{}{}{}
-\refkeyword{TIMINGS}\options{}{}{}
-\refkeyword{UPDATE LIST}\options{}{}{}
-\refkeyword{VERBOSE}\options{}{}{}
-\refkeyword{WRITE LOCALTEMP}\options{[STEP \{nfi\_lt\}]}{}{}
-%
-\clearpage
-%
-%---------------------------------------------------------------------
-\subsection{Alphabetic List of Keywords}
-{\bf Note~1:} Additional components of CPMD input files that do
-not fit into the following list are explained in the succeeding
-section \ref{further_input}.
-
-{\bf Note~2:} Keywords for the \&QMMM section of the CPMD/Gromos
-QM/MM-Interface code are not listed here but in
-section \ref{sec:qmmm-input}.
-
-\keyword{ACM0}{}{}{}{\&DFT}
-  \desc{Add exact exchange to the specified \refkeyword{FUNCTIONAL} according
-    to the adiabatic connection method 0.~\cite{acm0,adamo2000}
-    This only works for isolated systems
-    and should only be used if an excessive amount of CPU time is available.}
-
-\keyword{ACM1}{}{}{}{\&DFT}
-  \desc{Add exact exchange to the specified \refkeyword{FUNCTIONAL} according
-    to the adiabatic connection method 1.~\cite{adamo2000,acm1}
-    The parameter is read from the next
-    line. This only works for isolated systems and should only be used if an
-    excessive amount of CPU time is available.}
-
-\keyword{ACM3}{}{}{}{\&DFT}
-  \desc{Add exact exchange to the specified \refkeyword{FUNCTIONAL} according
-    to the adiabatic connection method 3.~\cite{adamo2000,acm3}
-    The three needed parameters are read
-    from the next line. This only works for isolated systems and should only be
-    used if an excessive amount of CPU time is available.}
-
-\keyword{ACCEPTOR}{}{[HDASINGLE,WMULT]}{}{\&SYSTEM}
-  \desc{Set the \refkeyword{CDFT} acceptor atoms. Parameter NACCR must be 
-    specified next to the keyword. NACCR $\in [1,2,...,N]$ is the number of acceptor 
-    Atoms ($N$ being the total number of atoms). The indices of NACCR atoms 
-    separated by whitespaces are read from the next line.\\
-    {\bf HDASINGLE} \defaultvalue{off} if set together with CDFT HDA, CPMD 
-    performs a constrained HDA calculation with only an ACCEPTOR group weight 
-    but different constraint values $N_\text{c}$.
-    {\bf WMULT} \defaultvalue{off} if set together with CDFT HDA, CPMD 
-    performs a constrained HDA calculation with two different an ACCEPTOR group
-    weights for the two states.\\
-    {\bf HDASINGLE} and {\bf WMULT} are mutually exclusive.}
-   
-\keyword{ACCURACY}{}{}{}{\&PTDDFT}
-  \desc{Specifies the accuracy to be reached in the Cayley propagation scheme
-   used in Ehrenfest type of dynamics and spectra calculation.}
-
-\keyword{ALEXANDER MIXING}{}{}{}{\&CPMD}
-  \desc{Mixing used during optimization of geometry or molecular dynamics.
-    Parameter read in the next line.\\
-%
-    \textbf{Default} value is \defaultvalue{0.9}}
-
-\keyword{ALPHA}{}{}{}{\&PATH}
-  \desc{Smoothing parameter for iterating the string (see \cite{Eijnden06}).\\
-    \textbf{Default} value is \defaultvalue{0.2}}
-
-
-\keyword{ALLTOALL}{\{SINGLE,DOUBLE\}}{}{}{\&CPMD}
-  \desc{Perform the matrix transpose (AllToAll communication) in the
-        3D FFT using single/double precision numbers. Default is
-        to use double precision numbers.}
-
-\keyword{ANDERSON MIXING}{}{$N=n$}{}{\&CPMD}
-  \desc{Anderson mixing for the electronic density during self-consistent
-    iterations. In the next line the parameter (between 0 and 1) for the
-    Anderson mixing is read.\\
-%
-    \textbf{Default} is \defaultvalue{0.2}.\\
-%
-    With the additional option $N=n$ a mixing parameter can be specified for
-    different threshold densities. $n$ different thresholds can be set. The
-    program reads $n$ lines, each with a threshold density and an Anderson
-    mixing parameter.}
-
-\keyword{ANGSTROM}{}{}{}{\&SYSTEM}
-  \desc{The atomic coordinates and the supercell parameters and several
-    other parameters are read in {\AA}ngs\-troms.\\
-%
-    {\bf Default} is {\bf atomic units} which are always used
-    internally.
-    Not supported for \refkeyword{QMMM} calculations.
-}
-
-\keyword{ANNEALING}{\{IONS,ELECTRONS,CELL\}}{}{}{\&CPMD}
-  \desc{Scale the ionic, electronic, or cell velocities every
-    time step. The scaling factor is read from the next line.}
-
-\keyword{ATOMIC CHARGES}{}{}{}{\&ATOMS}
-  \desc{Changes the default charge (0) of the atoms for the initial guess to
-    the values read from the next line. One value per atomic species has to be given.}
-
-\keyword{AVERAGED POTENTIAL}{}{}{}{\&PROP}
-  \desc{ Calculate averaged electrostatic potential in spheres of radius Rcut
-around the atomic positions.  \\
-Parameter Rcut is read in from next line.}
-
-\keyword{BECKE BETA}{}{}{}{\&DFT}
-  \desc{Change the $\beta$ parameter in Becke's exchange functional~\cite{Becke88} to the
-    value given on the next line.}
-
-\keyword{BENCHMARK}{}{}{}{\&CPMD}
-  \desc{This keyword is used to control some special features related to
-    benchmarks. If you want to know more, have a look in the source code.}
-
-\keyword{BERENDSEN}{\{IONS,ELECTRONS,CELL\}}{}{}{\&CPMD}
-  \desc{Use a simple Berendsen-type thermostat\cite{Berendsen84} 
-    to control the respective temperature of ions, electrons, or cell.
-    The target temperature and time constant $\tau$ (in a.u.)
-    are read from the next line. 
-
-    These thermostats are a gentler alternative to the 
-    \refkeyword{TEMPCONTROL} mechanism to thermalize a system.
-    For production runs, please use the corresponding \refkeyword{NOSE}
-    or \refkeyword{LANGEVIN} thermostats, as the Berendsen scheme does 
-    not represent any defined statistical mechanical ensemble.
-  }
-
-\keyword{BFGS}{}{}{}{\&CPMD}
-  \desc{Use a quasi-Newton method for optimization of the ionic
-    positions. The approximated Hessian is updated using the
-    Broyden-Fletcher-Goldfarb-Shano procedure~\cite{Fletcher80}.}
-
-\keyword{BLOCKSIZE STATES}{}{}{}{\&CPMD}
-  \desc{Parameter read in from next line.\\
-    {\sl NSTBLK} \\
-    Defines the minimal number of states used per processor in the
-    distributed linear algebra calculations.\\
-    {\bf Default} is to equally distribute states over all processors.}
-
-\keyword{BOGOLIUBOV CORRECTION}{}{[OFF]}{}{\&CPMD}
-  \desc{Computes the Bogoliubov correction for the energy
-    of the Trotter approximation or not.\\
-%
-    {\bf Default} is {\bf no Bogoliubov correction}.\\
-%
-    The keyword has to appear after \refkeyword{FREE ENERGY FUNCTIONAL}.}
-
-\keyword{BOX WALLS}{}{}{}{\&CPMD}
-  \desc{The thickness parameter for soft, reflecting QM-box walls
-    is read from the next line. This keyword allows to reverse the
-    momentum of the particles (${\bf p}_I \rightarrow -{\bf p}_I$)
-    when they reach the walls of the simulation supercell in the
-    case in which no periodic boundary conditions are applied.
-    Specifically, in the unidimensional surface-like case, molecules
-    departing from the surface are reflected back along the direction
-    orthogonal to the surface, whereas in the bidimensional polymer-like
-    case, they are reflected back in the two dimensons orthogonal to
-    the "polymer" axis. Warning: This procedure, although keeping your
-    particles inside the cell, affect the momentum conservation. \\
-    This feature is {\bf disabled by default}}
-
-\keyword{BROYDEN MIXING}{}{}{}{\&CPMD}
-  \desc{Parameters read in from next line.\\
-    {\sl BROYMIX, ECUTBROY, W02BROY, NFRBROY, IBRESET, KERMIX} \\
-    These mean:\\
-    \hfill\smallskip
-    {\sl BROYMIX}: \hfill\begin{minipage}[t]{10cm}
-        Initial mixing, e.g. $0.1$; \textbf{default} value is
-        \defaultvalue{0.5}
-        \end{minipage}
-
-    {\sl ECUTBROY:} \hfill\begin{minipage}[t]{10cm}
-        Cutoff for Broyden mixing. \defaultvalue{DUAL*ECUT} is the best choice
-        and the \textbf{default}
-        \end{minipage}
-
-    {\sl W02BROY:} \hfill\begin{minipage}[t]{10cm}
-        $w_0^2$ parameter of Johnson~\cite{Johnson88}. \textbf{Default}
-        \defaultvalue{0.01}
-        \end{minipage}
-
-    {\sl NFRBROY:} \hfill\begin{minipage}[t]{10cm}
-        Number of Anderson mixing steps done before Broyden mixing.
-        \textbf{Default} is \defaultvalue{0}
-        \end{minipage}
-
-    {\sl IBRESET:} \hfill\begin{minipage}[t]{10cm}
-        Number of Broyden vectors. $5$ is usually a good value and the default.
-        \end{minipage}
-
-    {\sl KERMIX:} \hfill\begin{minipage}[t]{10cm}
-        Kerker mixing according to the original deinition of Ref.~\cite{Kerker}.
-        By default the mixing parameter is set to 0.
-        \end{minipage}\\
-
-    You can also specify some parameters with the following syntax:\\
-        \textbf{[BROYMIX=}\textsl{BROYMIX}\textbf{]}
-        \textbf{[ECUTBROY=}\textsl{ECUTBROY}\textbf{]}\\
-        \textbf{[W02BROY=}\textsl{W02BROY}\textbf{]}
-        \textbf{[NFRBROY=}\textsl{NFRBROY}\textbf{]}\\
-        \textbf{[IBRESET=}\textsl{IBRESET}\textbf{]}\\
-        \textbf{[KERMIX=}\textsl{KERMIX}\textbf{]}\\
-    Finally, you can use the keyword {\bf DEFAULT} to use the default values.}
-
-\keyword{CAYLEY}{}{}{}{\&CPMD}
-  \desc{Used to propagate the Kohn-Sham orbitals in \refkeyword{MOLECULAR DYNAMICS} EH
-        and \refkeyword{PROPAGATION SPECTRA}. At present is the only propagation scheme 
-        availabe.}
-
-\keyword{CDFT}{}{[NEWTON, DEKKER],[SPIN, ALL, PCGFI, RESWF, NOCCOR, HDA[AUTO, PHIOUT, PROJECT]]}{}{\&CPMD}
-  \desc{The main switch for constrained DFT. Parameters $N_\text{c}$, $V_\text{init}$, 
-        and MAXSTEP are read from the next line.\\
-        {\bf NEWTON}, {\bf DEKKER} (\defaultvalue{off}) are switches to enable either the 
-        Newton or the Dekker optimisation scheme for the constraint. If neither of those 
-        are set a simple gradient scheme is used.\\
-        {\bf SPIN} (\defaultvalue{off}) if activated the constraint will act on the spin 
-        density instead of the charge density. This may help against excessive spin contamination.\\
-        {\bf ALL} (\defaultvalue{off}) activates dual spin and charge constraint, all inputs for 
-        $N_\text{c}$ and $V_\text{init}$ have to be given twice (first for charge then for spin)\\
-        {\bf PCGFI} (\defaultvalue{off}) instructs CPMD to do PCG for the first V optimisation cycle
-        regardles of the choice of optimiser.\\
-        {\bf RESWF} (\defaultvalue{off}) if activated this switch re-initialises the wavefunction 
-        after each $V$ optimisation step. This is useful if the wavefunction convergence between 
-        the optimisation steps is slow. Usage in conjunction with \refkeyword{INITIALIZE WAVEFUNCTION}
-        RANDOM may help.\\
-        {\bf NOCCOR} (\defaultvalue{off}) if activated this switch turns off cutoff correction for 
-        the forces.\\
-        {\bf HDA} (\defaultvalue{off}) if activated this switch turns on the calculation of the 
-        transition matrix element between the constrained states given by $N_\text{c}$ and 
-        $\hat{N}_\text{c}$ which is then read from the second line. For this keyword to take 
-        effect the \refkeyword{OPTIMIZE WAVEFUNCTION} option has to be activated.\\
-        Sub-options of {\bf HDA}\\
-        {\bf AUTO} (\defaultvalue{off}) if activated this switch lets CPMD choose the constraint 
-        values for the transition matrix calculation. $N_\text{c}$ is chosen from the initial 
-        charge distribution and $\hat{N}_\text{c}=-N_\text{c}$. It might be a good idea to use 
-        \refkeyword{INITIALIZE WAVEFUNCTION} ATOMS and \refkeyword{ATOMIC CHARGES} (\&ATOM section) 
-        so that CPMD initialises the wavefunction with the desired pseudo wavefunction.\\
-        {\bf PHIOUT} (\defaultvalue{off}) if activated this switch tells CPMD to write out the 
-        overlap matrices $\Phi_\text{AA},\Phi_\text{BB},\Phi_\text{AB},$ and $\Phi_\text{BA}$ 
-        to the file PHI\_MAT.\\
-        {\bf PROJECT} (\defaultvalue{off}) if activated this switch lets CPMD read in two reference 
-        states from RESTART.REF1 and RESTART.REF2 after the actual HDA calculation in order to project 
-        the two constrained states on them and thus calculate the diabatic transition matrix element 
-        in an orthogonalised ``dressed'' basis.\\
-        If CDFT is activated the program writes the current $V$ value to CDFT\_RESTART everytime the 
-        RESTART file is written.}
-
-
-\keyword{CELL}{\{ABSOLUTE, DEGREE, VECTORS\}}{}{}{\&SYSTEM}
-  \desc{The parameters specifying the super cell are read from the next
-    line. Six numbers in the following order have to be provided: $a$, $b/a$,
-    $c/a$, $\cos \alpha$, $\cos \beta$, $\cos \gamma$. For cubic phases, $a$ is
-    the lattice parameter. CPMD will check those values, unless you turn off
-    the test via \refkeyword{CHECK SYMMETRY}.
-    With the keyword {\bf ABSOLUTE}, you give $a$, $b$ and $c$. With the
-    keyword {\bf DEGREE}, you provide $\alpha$, $\beta$ and $\gamma$ in degrees
-    instead of their cosine. With the keyword {\bf VECTORS}, the lattice
-    vectors $a1$, $a2$, $a3$ are read from the next line instead of the 6
-    numbers. In this case the {\bf SYMMETRY} keyword is not used.}
-
-\keyword{CENTER MOLECULE}{}{[OFF]}{}{\&CPMD}
-  \desc{The center of mass is moved/not moved to the center of the
-    computational box in a calculation with the cluster option. This is only
-    done when the coordinates are read from the input file.}
-
-\keyword{CENTROID DYNAMICS}{}{}{}{\&PIMD}
-  \desc{Adiabatic centroid molecular dynamics,
-    see Ref.~\cite{Cao93,Martyna96,aicmd} for
-    theory and details of our implementation, which yields
-    quasiclassical dynamics of the nuclear centroids at a specified
-    temperature of the non--centroid modes.
-    This keyword makes only sense if used in conjunction with
-    the normal mode propagator via the keyword
-    NORMAL MODES {\em and} FACSTAGE~$>1.0$ {\em and} WMASS~$=1.0$.
-    The centroid adiabaticity control parameter FACSTAGE, which makes the
-    non-centroid modes artificially fast in order to sample adiabatically
-    the quantum fluctuations, has to be chosen carefully;
-    note that FACSTAGE~$= 1/\gamma$ as
-    introduced in Ref.~\cite{aicmd} in eq.~(2.51).}
-
-\keyword{CG-ANALYTIC}{}{}{}{\&RESP}
-  \desc{The number of steps for which the step length in the conjugate
-  gradient optimization is calculated assuming a quadratic functional
-  E(2) (quadratic in the linear response vectors). No accuracy impact,
-  pure convergence speed tuning.\\ \textbf{Default} value is
-  \defaultvalue{3} for NMR and \defaultvalue{99} otherwise.}
-
-\keyword{CG-FACTOR}{}{}{}{\&RESP}
-  \desc{The analytic length calculation of the conjugate-gradient step
-  lengthes yields in general a result that is slightly too large. This
-  factor is used to correct for that deficiency. No accuracy impact,
-  pure convergence speed tuning.\\ \textbf{Default} is
-  \defaultvalue{0.8}.}
-
-\keyword{CHANGE BONDS}{}{}{}{\&ATOMS}
-  \desc{The buildup of the empirical Hessian can be affected.\\
-    You can either add or delete bonds. The number of changed bonds is read
-    from the next line. This line is followed by the description of the bonds.
-    The format is \\
-      {\sl \{ ATOM1 \ \ ATOM2 \ \ FLAG\} }. \hfill \\
-      {\sl ATOM1} and {\sl ATOM2} are the numbers of the atoms involved in the
-          bond.
-      A {\sl FLAG} of $-1$ causes a bond to be deleted and
-      a {\sl FLAG} of $1$ a bond to be added. \hfill\\
-      Example: \\
-         {\tt
-         \begin{tabular}{ccc}
-         \multicolumn{3}{l}{\bf CHANGE BONDS}\\
-         2 &   &         \\
-         1 & 2 & +1      \\
-         6 & 8 & -1
-         \end{tabular}
-         }
-      }
-
-\keyword{CHARGES}{}{}{}{\&PROP}
-  \desc{Calculate atomic charges. Charges are calculated according to the
-    method of Hirshfeld~\cite{Hirshfeld77} and charges derived from the
-    electrostatic potential~\cite{Cox84}.}
-
-\keyword{CHARGE}{}{}{}{\&SYSTEM}
-  \desc{The total charge of the system is read from the next line.\\
-    \textbf{Default} is \defaultvalue{0}.}
-
-\keyword{CHECK MEMORY}{}{}{}{\&CPMD}
-  \desc{Check sanity of all dynamically allocated arrays whenever a change in
-    the allocation is done. By default memory is checked only at break points.}
-
-\keyword{CHECK SYMMETRY}{[OFF]}{}{}{\&SYSTEM}
-  \desc{The precision with which the conformance of the \refkeyword{CELL}
-    parameters are checked against the (supercell) \refkeyword{SYMMETRY}
-    is read from the next line. With older versions of CPMD, redundant
-    variables could be set to arbitrary values; now \textbf{all} values have
-    to conform. If you want the old behavior back, you can turn
-    the check off by adding the keyword {\bf OFF} or by providing a
-    negative precision. \textbf{Default} value is: \defaultvalue{1.0e-4}}
-
-\keyword{CLASSICAL CELL}{}{[ABSOLUTE, DEGREE]}{}{\&SYSTEM}
-  \desc{Not documented.}
-
-\keyword{CLASSICAL TEST}{}{}{}{\&PIMD}
-  \desc{Test option to reduce the path integral branch to the classical code for
-    the special case $P=1$ in order to allow for a one-to-one comparison
-    to a run using the standard branch of CPMD.
-    It works only with primitive propagator, i.e.\ not
-    together with NORMAL MODES, STAGING and/or \refkeyword{DEBROGLIE} CENTROID.}
-
-\keyword{CLASSTRESS}{}{}{}{\&CPMD}
-  \desc{Not documented.}
-
-\keyword{CLUSTER}{}{}{}{\&SYSTEM}
-  \desc{Isolated system such as a molecule or a cluster. Same effect as
-  \refkeyword{SYMMETRY} 0, but allows a non-orthorhombic cell. Only rarely
-  useful.}
-
-\keyword{CMASS}{}{}{}{\&CPMD}
-  \desc{The fictitious mass of the cell in atomic units is read from the next
-    line. \\
-    \textbf{Default} value is \defaultvalue{200}}
-
-\keyword{COMBINE SYSTEMS}{}{[REFLECT,NONORTH,SAB]}{}{\&CPMD}
-  \desc{Read in two wavefunctions from RESTART.R1 and RESTART.R2 and combine them into 
-    RESTART.1 which can then be used in an FODFT calculations. The option NONORTH disables
-    orthogonalisation of the combined WF's. Parameters NTOT1, NTOT2, NSUP1, NSUP2 are read
-    from the next line.\\
-    NTOT1/NTOT2 total number of electrons in state 1/2 (mandatory).\\
-    NSUP1/NSUP2 number of alpha electrons in state 1/2 (only LSD).\\
-    If the option REFLECT is given a fifth parameter (CM\_DIR) is read and the WF given 
-    in RESTART.R2 will be either mirrored through the centre of the box (CM\_DIR=0), 
-    mirrored through the central yz-plane of the box (CM\_DIR=1) or if CM\_DIR=4 
-    mirrored through the central yz-plane and translated in x direction by CM\_DR 
-    (sixth parameter to be read).\\
-    If the option SAB is set, write out the overlap matrix element between orbitals 
-    K and L. Parameters K and L are read from the next line.\\
-    After combining the wavefunctions CPMD will exit. For this option to work the RESTART 
-    option and \refkeyword{OPTIMIZE WAVEFUNCTION} have to be activated.}
-
-\keyword{COMPRESS}{}{[WRITEnn]}{}{\&CPMD}
-  \desc{Write the wavefunctions with nn bytes precision to the restart file. \\
-    Possible choices are \texttt{WRITE32}, \texttt{WRITE16}, \texttt{WRITE8}
-    and \texttt{WRITEAO}. \\
-    \texttt{WRITE32} corresponds to the compress option in older versions.
-    \texttt{WRITEAO} stores the wavefunction as a projection on atomic basis
-    sets. The atomic basis set can be specified in the section \&BASIS \ldots
-    \&END. If this input section is missing a default basis from Slater type
-    orbitals is constructed. See section~\ref{input:basis} for more details.}
-
-\keyword{CONDUCTIVITY}{}{}{}{\&PROP}
-  \desc{Computes the optical conductivity according to the
-     Kubo-Greenwod formula
-     \begin{equation*}
-     \sigma(\omega) =
-     \frac{2 \pi e^2}{3m^2 V_{\rm cell}} \frac{1}{\omega }
-     \sum_{i,j} (f_i-f_j)
-     |\langle \psi _i| \hat{\bf p} |\psi _j \rangle |^2
-     \delta(\epsilon _i -\epsilon_j - \hbar \omega)
-    \label{condu}
-    \end{equation*}
-   where $\psi _i$ are the Kohn-Sham eigenstates, $\epsilon _i$ their
-    corresponding eigenvalues, $f_i$ the occupation number and the
-    difference $f_i-f_j$ takes care of the fermionic occupancy.
-    This calculation is executed when the keyword PROPERTIES is
-    used in the section \&CPMD ... \&END. In the section \&PROP ... \&END
-    the keyword CONDUCTIVITY must be present and the interval
-    interval $\Delta \omega$ for the calculation of the spectrum
-    is read from the next line. Note that, since this is a "PROPERTIES"
-    calculation, {\it you must have previously computed the electronic structure
-    of your system and have a consistent \refkeyword{RESTART} file ready to use}.
-    Further keyword: \texttt{STEP=0.14}, where (e.g.) 0.14 is the bin
-    width in eV of the $\sigma(\omega)$ histogram if you want it
-    to be different from $\Delta \omega$. A file MATRIX.DAT
-    is written in your working directory, where all the non-zero transition
-    amplitudes and related informations are reported
-    (see the header of MATRIX.DAT). An example of application is given in
-    Refs.~\cite{solve,solve2}.}
-
-\keyword{CONFINEMENT POTENTIAL}{}{}{}{\&ATOMS}
-  \desc{The use of this label activates a spherical gaussian confinement 
-    potential in the calculation of the form factor of pseudopotentials.
-    In the next line(s) two parameters for each atomic species must
-    be supplied: the amplitude $\alpha$ and the cut off radius $r_c$.
-    The gaussian spherical amplitude is computed as 
-    $A=\pi ^{3/2}r_c^3\cdot \alpha$ and the gaussian confinement
-    potential reads
-    \begin{equation*}
-    V({\bf G}) = \sum_{\bf G} A \cdot |{\bf G}|\cdot e^{-G^2r_c^2/4}
-    \label{pconf}
-    \end{equation*}
-    being {\bf G} the G-vectors, although in practice the loop runs only 
-    on the G-shells $G=|{\bf G}|$.}
-
-\keyword{CONJUGATE GRADIENTS}{}{[ELECTRONS, IONS, NOPRECONDITIONING]}{}{\&CPMD}
-  \desc{For the electrons, the keyword is equivalent to \refkeyword{PCG}. The
-    \texttt{NOPRECONDITIONING} parameter only applies for electrons. For the
-    ions the conjugate gradients scheme is used to relax the atomic positions.}
-
-\keyword{CONSTANT CUTOFF}{}{}{}{\&SYSTEM}
-  \desc{Apply a cutoff function to the kinetic energy term~\cite{bernasconi95}
-    in order to simulate
-    constant cutoff dynamics. The parameters $A$, $\sigma$ and $E_o$ are read
-    from the next line (all quantities have to be given in Rydbergs).
-    $$
-      G^2 \to G^2 + A \left[ 1 + \mbox{erf}
-      \left( {\frac{1}{2} G^2 -  \frac{E_o}{\sigma}} \right) \right]
-    $$
-    }
-
-\keyword{CONSTRAINTS ... END CONSTRAINTS}{}{}{}{\&ATOMS}
-  \desc{With this option you can specify several constraints and
-   restraints on the atoms. (see section~\ref{sec:cnstr} for more
-    information on the available options and the input format).}
-
-\keyword{CONVERGENCE}{}{[ADAPT, ENERGY, CALFOR, RELAX, INITIAL]}{}{\&CPMD}
-  \desc{The adaptive convergence criteria for the wavefunction during a
-    geometry optimization are specified. For more informations,
-    see~\cite{LSCAL}. The ratio {\sl TOLAD} between the smallest maximum
-    component of the nuclear gradient reached so far and the maximum allowed
-    component of the electronic {\bf gradient} is specified with {\bf
-    CONVERGENCE ADAPT}. This criterion is switched off once the value {\sl
-    TOLOG} given with {\bf CONVERGENCE ORBITALS} is reached. By default, the
-    adaptive gradient criterion is not active. A reasonable value for the
-    parameter {\sl TOLAD} is 0.02.\\
-%
-    If the parameter {\sl TOLENE} is given with {\bf CONVERGENCE ENERGY}, in
-    addition to the gradient criterion for the wavefunction, the energy change
-    between two wavefunction optimization cycles must be smaller than the
-    energy change of the last accepted geometry change multiplied by {\sl
-    TOLENE} for the wavefunction to be considered converged. By default, the
-    adaptive energy criterion is not active. It is particularly useful for {\bf
-    transition state search} with P-RFO, where the trust radius is based on the
-    quality of energy prediction. A reasonable value for {\sl TOLENE} is
-    0.05.\\
-%
-    To save CPU time, the gradient on the ions is only calculated if the
-    wavefunction is almost converged. The parameter {\sl TOLFOR} given with
-    {\bf CONVERGENCE CALFOR} is the ratio between the convergence criteria for
-    the wavefunction and the criteria whether the gradient on the ions is to be
-    calculated. \textbf{Default} value for {\sl TOLFOR} is
-    \defaultvalue{3.0}.\\
-%
-    If the wavefunction is very slowly converging during a geometry
-    optimization, a small nuclear displacement can help. The parameter {\sl
-    NSTCNV} is given with {\bf CONVERGENCE RELAX}. Every {\sl NSTCNV}
-    wavefunction optimization cycles, the convergence criteria for the
-    wavefunction are relaxed by a factor of two. A geometry optimization step
-    resets the criteria to the unrelaxed values. By default, the criteria for
-    wavefunction convergence are never relaxed.\\
-%
-    When starting a geometry optimization from an unconverged wavefunction, the
-    nuclear gradient and therefore the adaptive tolerance of the electronic
-    gradient is not known. To avoid the {\bf full convergence} criterion to be
-    applied at the beginning, a convergence criterion for the wavefunction of
-    the initial geometry can be supplied with {\bf CONVERGENCE INITIAL}.
-    By default, the initial convergence criterion is equal to the full
-    convergence criterion.}
-
-\spekeyword{CONVERGENCE}{}{[ORBITALS, GEOMETRY, CELL]}{}{\&CPMD}{CONVERGENCE 2}
-  \desc{The convergence criteria for optimization runs is specified. \\
-%
-    The maximum value for the biggest element of the gradient of the
-    wavefunction ({\bf ORBITALS}), of the ions ({\bf GEOMETRY}), or the cell
-    ({\bf CELL}) is read from the next line. \\
-%
-    \textbf{Default} values are \defaultvalue{10$^{-5}$} for the wavefunction,
-    \defaultvalue{5$\times$10$^{-4}$} for the ions and \defaultvalue{1.0} for
-    the cell. For diagonalization schemes the first value is the biggest
-    variation of a density component. \textbf{Defaults} are
-    \defaultvalue{10$^{-3}$} and \defaultvalue{10$^{-3}$}.}
-
-\spekeyword{CONVERGENCE}{CONSTRAINT}{}{}{\&CPMD}{CONVERGENCE 3}
-  \desc{
-    Set constraint convergence parameters. Parameters VCCON and VCCONU are read from the next line:\\
-    VCCON $\in \mathbb{R}_+$ is the maximally allowed total deviation of
-    the constraint from the desired value $\text{N}_\text{c}$.\\
-    VCCONU $\in \mathbb{R}_+$ is the upper bound for the deviation in MD runs,
-    excess of which triggers a new optimisation of $V$.\\
-    \textbf{Defaults} are
-    \defaultvalue{10$^{-5}$} and \defaultvalue{VCCON}.}
-    
-\spekeyword{CONVERGENCE}{}{}{}{\&LINRES}{CONVERGENCE LINRES}
-  \desc{Convergence criterion for linear response calculations.\\
-%
-    \textbf{Default} value is \defaultvalue{10$^{-5}$}.}
-
-\spekeyword{CONVERGENCE}{}{}{}{\&RESP}{CONVERGENCE RESP}
-  \desc{
-    Convergence criterion on the gradient $\delta E/\delta \psi^*$
-%
-    \textbf{Default} value is \defaultvalue{10$^{-5}$}.}
-
-\keyword{CORE SPECTRA}{}{}{}{\&PROP}
-  \desc{Computes the X-ray adsorption spectrum and related transition
-    matrix elements according to Ref.~\cite{xray}.
-    This calculation is executed when the keyword PROPERTIES is
-    used in the section \&CPMD ... \&END. In the section \&PROP ... \&END
-    the keyword CORE SPECTRA must be present and the core atom
-    number (e.g. 10 if it is the 10$th$ atom in your list)
-    and core level energy (in au) are read from the
-    next line, while in the following line the $n$ and $l$ quantum
-    numbers of the selected core level, along with the exponential
-    factor $a$ of the STO orbital for the core level must be provided.
-    In the case of $1s$ states, the core orbital is reconstructed as
-    \begin{equation*}
-     \psi _{1s}(r) = 2 a^{\frac{3}{2}} r \cdot \exp (-a\cdot r)
-    \label{1s}
-    \end{equation*}
-    and it is this $a$ value in au that must be supplied in input.
-    As a general rule, first-row elements in the neutral case have
-    the following $a$ values:
-    B (4.64), C (5.63), N (6.62), O (7.62). For an excited
-    atom these values would be of course a bit larger; e.g. for
-    O it is 7.74453, i.e. 1.6 \% larger.
-    Since this is a "PROPERTIES" calculation,
-    {\it you must have previously computed the electronic structure
-    of your system and have a consistent \refkeyword{RESTART} file ready to use}.
-    A file XRAYSPEC.DAT is written in your working directory,
-    containing all the square transition amplitudes and related informations,
-    part of which are also written in the standard output. Waring: in order
-    to use this keyword you need special pseudopotentials. These are
-    provided, at least for some elements, in the PP library of CPMD and
-    are named as *\_HOLE.psp}
-
-\keyword{COUPLINGS}{\{FD=$\epsilon$,PROD=$\epsilon$\}}{[NAT]}{}{\&SYSTEM}
-  \desc{Calculate non-adiabatic couplings~\cite{nonadiabatic} using finite
-    differences (FD and PROD are two different finite-difference
-    approximations). The displacement $\epsilon$ is expected in atomic units.
-    If NAT=$n$ is given, the coupling vector acting on only a subset of $n$
-    atoms is calculated. In this case, a line containing $n$ atom sequence
-    numbers is expected.
-    See \refkeyword{COUPLINGS NSURF}.}
-
-\keyword{COUPLINGS LINRES}{\{BRUTE FORCE,NVECT=$n$\}}{[THR,TOL]}{}{\&SYSTEM}
-  \desc{Calculate non-adiabatic couplings~\cite{nonadiabatic} using
-    linear-response theory. With BRUTE FORCE, the linear response to the
-    nuclear displacements along all Cartesian coordinates is calculated.
-    With NVECT=$n$, at most $n$ cycles of the iterative scheme in
-    \cite{nonadiabatic} are performed. However, the iterative calculation is
-    also stopped earlier if its contribution to the non-adiabatic coupling
-    vector is smaller a given tolerance (TOL=$C_{\mathrm{tol}}$).
-    In the case of the iterative scheme, also the option THR can be given,
-    followed by three lines each containing a pair of a threshold contribution
-    to the non-adiabatic coupling vector and a tolerance for the
-    linear-response wavefunction (see \cite{nonadiabatic}).
-    Do not forget to include a \&LINRES section in the input, even if the
-    defaults are used.
-    See \refkeyword{COUPLINGS NSURF}.}
-
-\keyword{COUPLINGS NSURF}{}{}{}{\&SYSTEM}
-  \desc{Required for non-adiabatic couplings: the Kohn-Sham states involved in
-    the transition. For the moment, only one pair of states makes sense,
-    NSURF=1. On the following line, the orbital numbers of the two Kohn-Sham
-    states and a weight of 1.0 are expected. For singlet-singlet transitions,
-    the ROKS-based Slater transition-state density
-    (\refkeyword{LOW SPIN EXCITATION LSETS}) should be used. For
-    doublet-doublet transitions, the local spin-density approximation
-    (\refkeyword{LSD}) with the occupation numbers (\refkeyword{OCCUPATION},
-    \refkeyword{NSUP}, \refkeyword{STATES}) of the corresponding Slater
-    transition-state density should be used.}
-
-\spekeyword{CP\_GROUPS}{}{}{}{\&CPMD}{CP GROUPS}
- \desc{ Set the number of groups to be used in the calculation.
-   Default is 1 group. The number of groups is
-   read from the next line and shall be a
-   divisor of the number of nodes in a parallel run.}
-
-\keyword{CUBECENTER}{}{}{}{\&PROP}
-  \desc{Sets the center of the cubefiles produced by the
-  \refkeyword{CUBEFILE} flag. The next line has to contain
-   the coordinates of the center in Bohr or Angstrom, depending
-   on whether the \refkeyword{ANGSTROM} keyword was given.
-   \textbf{Default} is the geometric center of the system.}
-
-\keyword{CUBEFILE}{ORBITALS,DENSITY}{HALFMESH}{}{\&PROP}
-  \desc{Plots the requested objects in .CUBE file format. If ORBITALS
-  are demanded, the total number as well as the indices have to be
-  given on the next and second next line. HALFMESH reduces the number
-  of grid points per direction by 2, thus reducing the file size by a factor of 8.}
-
-\keyword{CUTOFF}{}{[SPHERICAL,NOSPHERICAL]}{}{\&SYSTEM}
-  \desc{The {\bf cutoff} for the plane wave basis in {\bf Rydberg} is
-      read from the next line.
-      The keyword {\bf SPHERICAL} is used with k points in order to have
-      $|g + k|^2 < E_{cut}$ instead of $|g|^2 < E_{cut}$.
-      This is the default.}
-
-\keyword{CZONES}{}{[SET]}{}{\&CPMD}
-  \desc{Activates convergence zones for the wavefunction during the 
-      \refkeyword{CDFT} constraint minimisation. If SET is set the 
-      parameters CZONE1, CZONE2, and CZONE3 are read from the next 
-      line and CZLIMIT1 and CZLIMIT2 from the line after.\\
-      CZONE1 \defaultvalue{$10^{-3}$},CZONE2 \defaultvalue{$10^{-4}$},CZONE3 \defaultvalue{$10^{-5}$}
-      $\in \mathbb{R}_+$ are the orbital convergences in zones 1-3, respectively.\\
-      CZLIMIT1 \defaultvalue{0.3}, CZLIMIT2 \defaultvalue{0.1} $\in \mathbb{R}_+$ define
-      the boundaries between zone 1-2 and 2-3, respectively.}
-      
-\keyword{DAMPING}{\{IONS,ELECTRONS,CELL\}}{}{}{\&CPMD}
-  \desc{Add a damping factor $f_{damp}(x) = - \gamma \cdot v(x)$ to 
-    the ionic, electronic, or cell forces in every time step. The 
-    scaling factor $\gamma$ is read from the next line. Useful 
-    values depend on the employed masses are generally in the 
-    range $5.0 \to 50.0$.
-
-    Damping can be used as a more efficient alternative to 
-    \refkeyword{ANNEALING} for wavefunction, geometry or cell 
-    optimization (and particularly combinations thereof) of 
-    systems where the faster methods 
-    (e.g. \refkeyword{ODIIS}, \refkeyword{PCG}, \refkeyword{LBFGS}, 
-    \refkeyword{GDIIS}) fail to converge or may converge to the 
-    wrong state. 
-  }
-
-\keyword{DAVIDSON DIAGONALIZATION}{}{}{}{\&CPMD}
-  \desc{Use Davidson diagonalization scheme.\cite{davidson75}}
-
-\keyword{DAVIDSON PARAMETER}{}{}{}{\&CPMD}
-  \desc{This keyword controls the Davidson diagonalization routine used to
-    determine the Kohn-Sham energies. \\
-%
-    The maximum number of additional vectors to construct the Davidson matrix,
-    the convergence criterion and the maximum number of steps are read from the
-    next line.\\
-%
-    \textbf{Defaults} are \defaultvalue{10$^{-5}$} and the same number as
-    states to be optimized. If the system has 20 occupied states and you ask
-    for 5 unoccupied states, the default number of additional vectors is 25. By
-    using less than 25 some memory can be saved but convergence might be
-    somewhat slower.}
-
-\spekeyword{DAVIDSON PARAMETER}{}{}{}{\&TDDFT}{DAVIDSON PARAMETER TDDFT}
-  \desc{The maximum number of Davidson iterations, the convergence criteria for
-    the eigenvectors and the maximal size of the Davidson subspace are set. The
-    three parameters {\sl ndavmax, epstdav, ndavspace} are read from the next
-    line.\\
-%
-    \textbf{Default} values are \defaultvalue{100}, \defaultvalue{10$^{-10}$}
-    and \defaultvalue{10}.}
-
-\keyword{DAVIDSON RDIIS}{}{}{}{\&TDDFT}
-  \desc{This keyword controls the residual DIIS method for TDDFT diagonalization.
-        This method is used at the end of a DAVIDSON diagonalization for
-        roots that are not yet converged. The first number gives the maxium
-        iterations, the second the maximum allowed restarts, and the third
-        the maximum residual allowed when the method is invoked.\\
-%
-    \textbf{Default} values are \defaultvalue{20}, \defaultvalue{3}
-    and \defaultvalue{$10^{-3}$}.}
-
-\keyword{DEBROGLIE}{}{[CENTROID]}{}{\&PIMD}
-  \desc{An initial configuration assuming quantum free particle behavior is
-    generated for each individual atom according to its physical mass at the
-    temperature given in Kelvin on the following input line.
-%
-    Using DEBROGLIE each nuclear position obtained from the \&ATOMS
-    \ldots\ \&END section serves as the starting point for a Gaussian
-    L\'evy walk of length $P$ in three dimensions, see e.g.\
-    Ref.~\cite{Fosdick66}.
-%
-    Using DEBROGLIE CENTROID each nuclear position obtained from the \&ATOMS
-    \ldots\ \&END section serves as the centroid (center of geometry) for
-    obtaining the centroid (center of geometry) for obtaining the $P$ normal
-    modes in three dimensions, see e.g.\ Ref.~\cite{Tuckerman96}.
-%
-    This option does only specify the generation of the initial configuration
-    if INITIALIZATION and GENERATE REPLICAS are active.
-%
-    Default is DEBROGLIE CENTROID and 500~Kelvin.}
-
-\keyword{DEBUG CODE}{}{}{}{\&CPMD}
-  \desc{Very verbose output concerning subroutine calls for debugging purpose.}
-
-\keyword{DEBUG FILEOPEN}{}{}{}{\&CPMD}
-  \desc{Very verbose output concerning opening files for debugging purpose.}
-
-\keyword{DEBUG FORCES}{}{}{}{\&CPMD}
-  \desc{Very verbose output concerning the calculation of each contribution
-        to the forces for debugging purpose.}
-
-\keyword{DEBUG MEMORY}{}{}{}{\&CPMD}
-  \desc{Very verbose output concerning memory for debugging purpose.}
-
-\keyword{DEBUG NOACC}{}{}{}{\&CPMD}
-  \desc{Do not read/write accumulator information from/to the 
-        \refkeyword{RESTART} file.
-        This avoids putting timing information to the restart and makes
-        restart files identical for otherwise identical runs.}
-
-\keyword{DENSITY CUTOFF}{}{[NUMBER]}{}{\&SYSTEM}
-  \desc{Set the plane wave energy cutoff for the density. The value is read
-    from the next line. The density cutoff is usally automatically determined 
-    from the wavefunction \refkeyword{CUTOFF} via the \refkeyword{DUAL} factor.\\
-    With the additional flag {\bf NUMBER} the number of plane waves can be specified
-    directly. This is useful to calculate bulk modulus or properties depending on 
-    the volume. The given energy cutoff has to be bigger than the one to have 
-    the required plane wave density number.}
-
-\keyword{DIAGONALIZER}{\{DAVIDSON,NONHERMIT,PCG\}}{[MINIMIZE]}{}{\&TDDFT}
-  \desc{Specify the iterative diagonalizer to be used.\\
-%
-    \textbf{Defaults} are {\sl DAVIDSON} for the Tamm--Dancoff method, {\sl
-    NONHERMIT} (a non-hermitian Davidson method) for TDDFT LR and {\sl PCG}
-    (Conjugate gradients) for the optimized subspace method. The additional
-    keyword {\sl MINIMIZE} applies to the PCG method only. It forces a line
-    minimization with quadratic search.\\
-%
-    \textbf{Default} is \defaultvalue{not to use line minimization}.}
-
-\keyword{DIAGONAL}{}{[OFF]}{}{\&HARDNESS}
-  \desc{Not documented}
-
-\keyword{DIFF FORMULA}{}{}{}{\&LINRES}
-  \desc{Number of points used in finite difference formula for second
-    derivatives of exchange--correlation functionals. Default is two point
-    central differences.}
-
-\keyword{DIIS MIXING}{}{}{}{\&CPMD}
-  \desc{Use the direct inversion iterative scheme to mix density.\\
-%
-    Read in the next line the number of previous densities (NRDIIS) for the
-    mixing (however not useful).}
-
-\spekeyword{DIIS MIXING}{}{[$N=n$]}{}{\&CPMD}{DIIS MIXING N=n}
-  \desc{Like DIIS MIXING, but number of previous densities for the
-    mixing can be specified as a function of the density.\\
-%
-    $n$ different thresholds for the density can be set. The program reads $n$
-    lines with a threshold density and a NRDIIS number (number of previous
-    densities for the mixing). Numbers NRDIIS have to increase. If the NRDIIS
-    is equal to 0, Anderson mixing is used. Very efficient is to use Anderson
-    mixing and afterwards DIIS mixing.}
-
-\keyword{DIPOLE DYNAMICS}{\{SAMPLE,WANNIER\}}{}{}{\&CPMD}
-  \desc{Calculate the dipole moment~\cite{vdb_berry,resta} every {\sl NSTEP} iteration in MD.\\
-%
-    {\sl NSTEP} is read from the next line if the keyword SAMPLE is present.\\
-%
-    {\bf Default} is {\bf every} time step.\\
-%
-    The keyword {\bf Wannier} allows the calculation of optimally localized
-    Wannier functions\cite{Marzari97,PSil99,berghold}. The procedure used is
-    equivalent (for single k-point) to Boys localization.
-
-    The produced output is IONS+CENTERS.xyz, IONS+CENTERS,
-    DIPOLE, WANNIER\_CENTER and WANNIER\_DOS. The localization procedure is
-    controlled by the following keywords.}
-
-\keyword{DIPOLE MOMENT}{}{[BERRY, RS]}{}{\&PROP}
-  \desc{Calculate the dipole moment.\\
-%
-    Without the additional keywords {\bf BERRY} or {\bf RS}
-    this is only implemented for simple cubic and fcc supercells.
-    The keyword {\bf RS} requests the use of the real-space algorithm.
-    The keyword {\bf BERRY} requests the use of the Berry phase algorithm.\\
-%    
-    {\bf Default} is to use the real-space algorithm.}
-
-\keyword{DISCARD}{}{[OFF, PARTIAL, TOTAL, LINEAR]}{}{\&RESP}
-  \desc{Request to discard trivial modes in vibrational analysis from linear response (both
-\refkeyword{PHONON} and \refkeyword{LANCZOS}).\\
-  
-  {\bf OFF} = argument for performing no projection.\\
-  {\bf PARTIAL} = argument for projecting out only translations (this is the default).\\
-  {\bf TOTAL} = argument for projecting both rotations and translations.\\
-  {\bf LINEAR} = argument for projecting rotations around the $C - \infty$ axis in a linear molecule (not implemented yet).}
-
-\keyword{DISTRIBUTED LINALG}{\{ON, OFF\}}{}{}{\&CPMD}
-  \desc{Perform linear algebra calculations using distributed memory algorithms.
-        Setting this option ON will also enable (distributed) initialization from atomic wavefunctions
-        using a parallel Lanczos algorithm \cite{distrib.lanczos.07}. Note that distributed initialization
-        is not available with {\bf KPOINTS} calculations. In this case, initialization from atomic wavefunctions
-        will involve replicated calculations.
-
-        When setting {\bf LINALG ON} the keyword  \refkeyword{BLOCKSIZE STATES} becomes relevant (see entry). The number of
-         \refkeyword{BLOCKSIZE STATES} must be an {\bf exact divisor} of the number of  \refkeyword{STATES}.}
-
-\keyword{DISTRIBUTE FNL}{}{}{}{\&CPMD}
-  \desc{The array \texttt{FNL} is distributed in parallel runs.}
-
-\keyword{DONOR}{}{}{}{\&SYSTEM}
-  \desc{Set the \refkeyword{CDFT} donor atoms. Parameter NACCR must be 
-    specified next to the keyword. NDON $\in \mathbb{R}_+$ is the number of Donor 
-    Atoms ($N$ being the total number of atoms).  If NDON$>0$ the indices of NDON atoms 
-    separated by whitespaces are read from the next line else only use an
-    Acceptor group in the CDFT weight.}
-
-\keyword{DUAL}{}{}{}{\&SYSTEM}
-  \desc{The ratio between the wavefunction energy \refkeyword{CUTOFF} 
-    and the \refkeyword{DENSITY CUTOFF} is read from the next line. \\
-%
-    {\bf Default} is {\bf 4}.\\
-%
-    There is little need to change this parameter, except when
-    using ultra-soft pseudopotentials, where the wavefunction
-    cutoff is very low and the corresponding density cutoff
-    is too low to represent the augmentation charges accurately.
-    In order to maintain good energy conservation and have
-    good convergens of wavefunctions and related parameters,
-    {\bf DUAL} needs to be increased to values of 6--10. \\
-    Warning: You can have some trouble if you use the {\bf DUAL} 
-    option with the symmetrization of the electronic density.}
-
-\keyword{DUMMY ATOMS}{}{}{}{\&ATOMS}
-  \desc{The definition of dummy atoms follows this keyword.\\
-      Three different kinds of dummy atoms are implemented.
-      Type 1 is fixed in space, type 2 lies at the arithmetic
-      mean, type 3 at the center of mass of the coordinates 
-      of real atoms. \\
-% For types 2, 3 and 4 you can also have a
-%      negative weight (NOTE: works only for restraints).\\
-      The first line contains the total number of dummy atoms.
-      The following lines start with the type label {\bf TYPE1, TYPE2, TYPE3, TYPE4}.\\
-      For type 1 dummy atoms the label is followed by the Cartesian
-      coordinates. \\
-      For type 2 and type 3 dummy atoms the first number
-      specifies the total number of atoms involved in the
-      definition of the dummy atom. Then the number of these atoms
-      has to be specified on the same line. 
-      A negative number of atoms stands for all atoms. 
-      For type 4, the dummy atom is defined as a weigthed average
-      of coordinates of real atoms with user-supplied weights. This
-      feature is useful e.~g. in constrained dynamics, because
-      allows to modify positions and weights of dummy atoms according 
-      to some relevant quantity such as forces on selected atoms.
-% A negative atom index means that a negative weight is assigned 
-% to this atom (works only with restraints) \\
-      Example: \\
-      
-      {\tt
-      \begin{tabular}{llll}
-      \multicolumn{4}{l}{\bf DUMMY ATOMS }\\
-      3           &     &     &          \\
-      {\bf TYPE1} & 0.0 & 0.0 & 0.0      \\
-      {\bf TYPE2} & 2   & 1   & 4        \\
-      {\bf TYPE3} & -1
-      \end{tabular}
-      }\\
-      
-      Note: Indices of dummy atoms always start with total-number-of-atoms plus 1. 
-      In the case of a Gromos-QM/MM interface simulations with dummy hydrogen atoms 
-      for capping, it is total-number-of-atoms plus number-of-dummy-hydrogens plus 1 }
-
-\keyword{EIGENSYSTEM}{}{}{}{\&RESP}
-  \desc{Not documented.}
-  
-\keyword{ELECTRONIC SPECTRA}{}{}{}{\&CPMD}
-  \desc{Perform a TDDFT calculation~\cite{tddft_all,tddft_pw}
-      to determine the electronic spectra. See below under
-      \referto{sec:ElectronicSpectra}{Electronic Spectra} and
-      under the other keywords for the input sections
-      \referto{inputkw:linres}{\&LINRES} and
-      \referto{inputkw:tddft}{\&TDDFT} for further options.}
-
-\keyword{ELECTROSTATIC POTENTIAL}{}{[SAMPLE=nrhoout]}{}{\&CPMD}
-  \desc{Store the electrostatic potential on file. The resulting file
-  is written in platform specific binary format. You can use the
-  cpmd2cube tool to convert it into a Gaussian cube file for 
-  visualization. Note that this flag automatically activates
-  the \refkeyword{RHOOUT} flag as well.
-
-  With the optional keyword {\bf SAMPLE} the file will be written
-  every {\em nrhoout} steps during an MD trajectory. The corresponding
-  time step number will be appended to the filename.
-}
-
-\keyword{ELF}{}{[PARAMETER]}{}{\&CPMD}
-  \desc{Store the total valence density and the valence electron localization
-      function ELF~\cite{Becke90,silsav,marx-savin-97,homeofelf} on files.
-      The default
-      smoothing parameters for ELF can be changed optionally
-      when specifying in addition the PARAMETER keyword.
-      Then the two parameters ``elfcut'' and
-      ``elfeps'' are read from the next line.
-      The particular form of ELF that is implemented is defined
-      in the header of the subroutine elf.F.
-      
-      Note 1: it is a {\em very} good idea to increase
-      the planewave cutoff and then specify
-      ``elfcut''~$=0.0$ and ``elfeps''~$=0.0$
-      if you want to obtain a smooth ELF for a given nuclear configuration.
-      In the case of a spin--polarized (i.e. spin unrestricted)
-      DFT calculation (see keyword \refkeyword{LSD}) in addition
-      the spin--polarized average of ELF as well as the
-      separate $\alpha$-- and $\beta$--orbital parts are written to the files
-      LSD\_ELF, ELF\_ALPHA and ELF\_BETA, respectively;
-      see Ref.~\cite{Kohut96} for definitions and further infos.
-      
-      Note 2: ELF does not make much sense when using Vanderbilt's
-      ultra-soft pseudopotentials!}
-
-\keyword{EMASS}{}{}{}{\&CPMD}
-  \desc{The fictitious electron mass in atomic units is
-      read from the next line. \\
-      {\bf Default} is {\bf 400 a.u.}.}
-
-\keyword{ENERGY PROFILE}{}{}{}{\&SYSTEM}
-  \desc{Perform an energy profile calculation at the end of a
-       wavefunction optimization using the ROKS or ROSS methods.}
-
-\keyword{ENERGYBANDS}{}{}{}{\&CPMD}
-  \desc{Write the band energies (eigenvalues) for k points in the file
-      ENERGYBANDS. }
-
-\keyword{EPR}{}{}{options, see response\_p.inc}{\&RESP}
-  \desc{Calculate the EPR $g$ tensor for the system. This routine
-  accepts most, if not all, of the options available in the NMR
-  routine (RESTART, NOSMOOTH, NOVIRTUAL, PSI0, RHO0, OVERLAP and
-  FULL). Most important new options are: \\
-  {\bf FULL SMART}: does a calculation with improved accuracy.
-  A threshold value (between 0 and 1) must be present on the next line.
-  The higher the threshold value, the lower the computational cost, but this
-  will also reduce the accuracy (a bit). Typically, a value of 0.05
-  should be fine.\\
-  {\bf OWNOPT}: for the calculation of the $g$ tensor, an effective
-  potential is needed. By default, the EPR routine uses the local potential
-  ($V_{LOC} = V_{PP,LOC} + V_{HARTREE} + V_{XC}$).
-  This works well with Goedecker pseudopotentials, but rather poor with
-  Troullier-Martins pseudopotentials. When using this option, the following
-  potential is used instead:
-      $$
-      V_{EFF} = -\frac{Z}{r}\mathrm{erf}(r/r_c) + V_{HARTREE} + V_{XC}
-      $$
-  and $r_c$ (greater than 0) is read on the next line.\\
-  {\bf HYP}: calculates the hyperfine tensors. See epr\_hyp.F for details.\\
-
-  Contact Reinout.Declerck@UGent.be should you require further information.}
-
-\keyword{EXCHANGE CORRELATION TABLE}{}{[NO]}{}{\&DFT}
-  \desc{Specifies the range and the  granularity of the lookup table
-      for the local exchange-correlation energy and potential.
-      The number of table entries and the maximum
-      density have to be given on the next line. \\
-      Note that this keyword is only relevant when using
-      \refkeyword{OLDCODE} and
-      even then it is set to \textbf{NO} be default.
-      Previous default values were 30000 and 2.0.}
-
-\keyword{EXCITED DIPOLE}{}{}{}{\&PROP}
-  \desc{Calculate the difference of dipole moments
-      between the ground state density and a density generated by
-      differently occupied Kohn-Sham orbitals. \\
-      On the next line
-      the number of dipole moments to calculate and the total number
-      orbitals has to be given. On the following lines the occupation
-      of the states for each calculation has to be given. By default
-      the dipoles are calculated by the method used for the
-      {\bf DIPOLE MOMENT} option and the same restrictions apply.
-      If the {\bf LOCAL DIPOLE} option is specified the dipole
-      moment differences are calculated within the same boxes.}
-
-\keyword{EXTERNAL POTENTIAL}{\{ADD\}}{}{}{\&CPMD}
-  \desc{Read an external potential from file. With ADD specified, its effects
-    is added to the forces acting on the ions.}
-
-\spekeyword{EXT\_PULSE}{}{}{}{\&PTDDFT}{EXT-PULSE}
-  \desc{A Dirac type pulse is applied to the KS orbitals before propagation.
-This keyword is used with the principal keyword \refkeyword{PROPAGATION SPECTRA}. The intensity
-of the perturbing field is readi from the next line.}
-
-\spekeyword{EXT\_POTENTIAL}{}{}{}{\&PTDDFT}{EXT-POTENTIAL}
-  \desc{An external potential is applied to the KS orbitals before propagation.
-This keyword is used with the principal keyword {\bf{MOLECULAR DYNAMICS EH}} or \refkeyword{PROPAGATION SPECTRA}. 
-The type of the perturbation is specified with the keyword {\bf{PERT\_TYPE}} (in \&PTDDFT) and its intensity
-with {\bf{PERT\_AMPLI}} (in \&PTDDFT).}
-
-\keyword{EXTERNAL FIELD}{}{}{}{\&SYSTEM}
-  \desc{Applies an external electric field to the system using the Berry phase. The electric field vector in AU is read from the next line.}
-
-\keyword{EXTPOT}{}{}{}{\&TDDFT}
-  \desc{Non adiabatic (nonadiabatic, non-adiabatic) Tully's trajectory surface hopping dynamics using TDDFT energies and forces,
-        coupled with an external field~\cite{tavernelli2010}.
-        To be used together with the keywords \refkeyword{MOLECULAR DYNAMICS} BO,
-        \refkeyword{TDDFT} in the \&CPMD section, and \refkeyword{T-SHTDDFT} in the \&TDDFT section.
-        Do NOT use the keyword \refkeyword{T-SHTDDFT} together with the keyword
-        \refkeyword{SURFACE HOPPING} in \&CPMD, which invokes the SH scheme based on \refkeyword{ROKS}~\cite{surfhop}
-        (see \refkeyword{SURFACE HOPPING}).\\
-        This keyword follow the same principle as described for the keyword \refkeyword{T-SHTDDFT}, except that, 
-        in the present dynamics, the trajectory starts on the ground state and is coupled with an external field
-        through the equations of motion for the amplitudes of Tully's trajectory surface hopping.
-        According to the evolution of the amplitudes of the different excited states, the running trajectory can
-        jump on an excited state. From there, deactivation through nonradiative processes is possible, within the normal
-        trajectory surface hopping scheme.\\
-        Parameter \textit{aampl}, \textit{adir}, \textit{afreq}, and \textit{apara1} are read from the next line.
-        The amplitude of the vector potential is provided in \textit{aampl} and its polarization is given in \textit{adir} (1 = x-polarized,
-        2 = y-polarized, 3 = z-polarized, 4 = all components). The keyword \textit{afreq} gives the frequency of the field and \textit{apara1} is a
-        free parameter for a specific user-specified pulse.\\
-        Important points: the applied electromagnetic field needs to be hard coded in the subroutine sh\_tddft.F, in the subroutine SH\_EXTPOT.
-        The vector potential is used for the coupling with the amplitudes equations. Be careful to use a time step small enough for a correct
-         description of the pulse. The pulse is printed in the file SH\_EXTPT.dat (step, A(t), E(t)).
-       }
-
-\keyword{EXTRAPOLATE WFN}{\{STORE\}}{}{}{\&CPMD}
-  \desc{Read the number of wavefunctions to retain from the next line. \\
-    These wavefunctions are used to extrapolate the initial guess wavefunction in
-    Born-Oppenheimer MD. This can help to speed up BO-MD runs significantly by
-    reducing the number of wavefunction optimization steps needed through
-    two effects: the initial guess wavefunction is much improved and also
-    you do not need to converge as tightly to conserve energy. BO-MD without 
-    needs CONVERGENCE ORBITALS to be set to 1.0e-7 or smaller to maintain 
-    good energy conservation.\\
-    With the additional keyword {\bf STORE} the wavefunction history is also
-    written to restart files. See \refkeyword{RESTART} for how to read it back.
-    }
-    
-\keyword{EXTRAPOLATE CONSTRAINT}{}{}{}{\&CPMD}
-  \desc{In a CDFT MD run extrapolate the next value for $V$ using a Lagrange polynomial.
-    The order $k$ of the polynomial is read from the next line. { \bf Default} is \defaultvalue{k=5}, but
-    it pays off to use the orderfinder.py python script on the ENERGIES file of
-    a former run to estimate the optimal extrapolation order $k_\text{opt}$.}
-    
-\keyword{FACMASS}{}{}{}{\&PIMD}
-  \desc{Obtain the fictitious nuclear masses $M_I^\prime$
-        within path integral molecular
-        dynamics from the real physical atomic masses $M_I$
-        (as tabulated in the DATA ATWT / \ldots /  statement in atoms.F)
-        by {\em multiplying} them with the dimensionless factor WMASS
-        that is read from the following line;
-        if the NORMAL MODES or STAGING propagator is used
-        obtain $M_I^{\prime (s)}= \mbox{WMASS} \cdot M_I^{(s)}$
-        for {\em all} replicas $s=1, \dots , P$;
-        see e.g. Ref.~\cite{aicmd} eq.~(2.37) for nomenclature. \\
-        \textbf{Default} value of WMASS is \defaultvalue{1.0}}
-
-\keyword{FACTOR}{}{}{}{\&PATH}
-  \desc{Step for propagating string (see \cite{Eijnden06}).\\
-    \textbf{Default} value is \defaultvalue{1.0}}
-
-\keyword{FFTW WISDOM}{}{[ON,OFF]}{}{\&CPMD}
-  \desc{ Controls the use of the ``wisdom'' facility when using 
-    FFTW or compatible libraries. When enabled, CPMD will switch 
-    to using the ``measure'' mode, which enables searching for 
-    additional runtime optimizations of the FFT. The resulting 
-    parameters will be written to a file called {\sl FFTW\_WISDOM} and 
-    re-read on subsequent runs. The parameters in the file are 
-    machine specific and when moving a job to a different machine, 
-    the file should be deleted. 
-
-    The use of fftw wisdom incurs additional overhead and thus may
-    lead to slower execution. It is recommended to stick with the 
-    default settings unless you know what you are doing.
-}
-
-\keyword{FILE FUSION}{}{}{}{\&CPMD}
-  \desc{ Reads in two separate \refkeyword{RESTART} files for ground state and 
-      \refkeyword{ROKS} excited state and writes them into a single restart file.\\
-       Required to start \refkeyword{SURFACE HOPPING} calculations.}
-
-\keyword{FILEPATH}{}{}{}{\&CPMD}
-  \desc{The path to the files written by CPMD (RESTART.x,
-      MOVIE, ENERGIES, DENSITY.x etc.) is read from the next line.
-      This overwrites the value given in the environment variable
-      {\bf CPMD\_FILEPATH}.
-      {\bf Default} is the {\bf current directory}.}
-
-\keyword{FINITE DIFFERENCES}{}{}{}{\&CPMD}
-  \desc{The step length in a finite difference
-      run for vibrational frequencies
-      ({VIBRATIONAL ANALYSIS} keywords)
-      is read from the next line.\\
-      With the keywords {\bf COORD=}{\sl coord\_fdiff(1..3)}
-      and {\bf RADIUS=}{\sl radius} put in the same line as
-      the step length, you can specify a sphere in order to
-      calculate the finite differences only for the atoms inside it.
-      The sphere is centered on the position {\sl coord\_fdiff(1..3)}
-      with a radius {\sl radius} (useful for a point defect).\\
-
-      \textbf{NOTE:} The the step length for the finite difference
-      is \textbf{always} in Bohr (default is 1.0d-2 a.u.).
-      The (optional) coordinates of the center and the radius are
-      read in either Angstrom or Bohr, depending on whether the
-      \refkeyword{ANGSTROM} keyword is specified or not.
-  }
-
-\keyword{FIXRHO UPWFN}{}{[VECT LOOP WFTOL]}{}{\&CPMD}
-  \desc{Wavefunctions optimization with the method of direct inversion
-      of the iterative subspace (DIIS), performed without updating the
-      charge density at each step.
-      When the orbital energy gradients are below the given
-      tolerance or when the maximum number of iterations is reached,
-      the KS energies and the
-      occupation numbers are calculated, the density is updated,
-      and a new wavefunction optimization is started.
-      The variations of the density coefficients are used as
-      convergence criterium. The default electron temperature is
-      1000 K and 4 unoccupied states are added.
-      Implemented also for k-points.
-      Only one sub-option is allowed per line and the respective parameter
-      is read from the next line. The parameters mean:\\
-      \hfill\smallskip{\sl VECT}:
-                       \hfill\begin{minipage}[t]{10cm}
-                       The number of DIIS vectors is read from the next line.
-                       (ODIIS with 4 vectors is the default).
-                       \end{minipage}\hfill
-
-      {\sl LOOP:} \hfill\begin{minipage}[t]{10cm}
-                       the minimum and maximum number of DIIS iterations
-                       per each wfn optimization is read from the following
-                       line. Default values are 4 and 20.
-                      \end{minipage}\hfill
-
-      {\sl WFTOL:} \hfill\begin{minipage}[t]{10cm}
-                       The convergence tolerance for the wfn optimization
-                       during the ODIIS is read from the following line.
-                       The default value is $10^{-7}$. The program
-                       adjusts this criterion automatically, depending
-                       on the convergence status of the density.
-                       As the density improves (when the density updates
-                       become smaller), also the
-                       wavefunction convergence criterion
-                       is set to its final value.
-                      \end{minipage}\hfill
-      }
-
-\keyword{FORCE FIELD ... END FORCE FIELD}{}{}{}{\&CLASSIC}
-  \desc{}
-  
-%_FM[  
-\keyword{FORCEMATCH}{}{}{}{\&CPMD}
-  \desc{Activates the QM/MM force matching procedure. This keywords requires the presence 
-  of a \&QMMM ... \&END section with a correspoding \refkeyword{FORCEMATCH ... END FORCEMATCH} block. See sections~\ref{sec:qmmm} and~\ref{sec:forcematch-desc} for more details.} 
-%_FM]
-
-\keyword{FORCE STATE}{}{}{}{\&TDDFT}
-  \desc{The state for which the forces are calculated is read from the
-       next line. Default is for state 1.}
-
-\keyword{FREE ENERGY FUNCTIONAL}{}{}{}{\&CPMD}
-  \desc{Calculates the electronic free energy using
-      free energy density functional~\cite{Alavi94,PSil,mbaops}
-      from DFT at finite temperature.\\
-      This option needs additional keywords (free energy keywords).\\
-      By {\bf default} we use {\bf Lanczos diagonalization} with
-      {\bf Trotter factorization} and {\bf Bogoliubov correction}.
-      If the number of states is not specified,
-      use $N_{electrons}/2+4$.}
-
-\keyword{FREEZE QUANTUM}{}{}{}{\&CLASSIC}
-  \desc{Freeze the quantum atoms and performs a classical MD on the
-        others (in QMMM mode only !).}
-
-\keyword{FULL TRAJECTORY}{}{}{}{\&CLASSIC}
-  \desc{Not documented}
-
-\keyword{FUNCTIONAL}{}{}{functionals}{\&DFT}
-  \desc{Single keyword for setting up XC-functionals.\\
-      Available functionals are NONE, SONLY, LDA (in PADE form),
-      \goodbreak BONLY, BP, BLYP, XLYP, GGA (=PW91), PBE, PBES, REVPBE,
-      \goodbreak HCTH, OPTX, OLYP, TPSS, PBE0, B1LYP, B3LYP, X3LYP,PBES,
-      \goodbreak HSE06}
-
-\keyword{FUKUI}{}{[N=nf]}{}{\&RESP}
-  \desc{Calculates the response to a change of occupation number of 
-    chosen orbitals. The indices of these orbitals are read from the 
-    following nf lines ({\bf default nf=1}). The orbitals themselves are 
-    not read from any \refkeyword{RESTART} file but from WAVEFUNCTION.* 
-    files generated with \refkeyword{RHOOUT} in the \&CPMD section; 
-    to recall this the orbital numbers have to be negative, just like 
-    for the \refkeyword{RHOOUT} keyword.\\
-     
-    A weight can be associated with each orbital if given just after 
-    the orbital number, on the same line. It corresponds to saying how 
-    many electrons are put in or taken from the orbital. For example;}
-\begin{verbatim}
-   FUKUI N=2
-   -i 1.0
-   -j -1.0
-\end{verbatim}
-  \desc{corresponds to the response to taking one electron from orbital i 
-    and put it in orbital j.}
-
-\keyword{GAUGE}{\{PARA,GEN,ALL\}}{}{}{\&LINRES}
-  \desc{Gauge of the linear-response wavefunctions. Default is the
-      parallel-transport gauge (PARA) for closed-shell calculations and
-      a sensible combination of the parallel-transport gauge and the
-      full-rotation gauge (GEN) for all other cases. The full-rotation gauge
-      can be enforced for all states by selecting ALL. See \cite{lsets}.}
-
-\keyword{GC-CUTOFF}{}{}{}{\&DFT}
-  \desc{On the next line the density cutoff for the calculation of
-      the gradient correction has to be specified. The default value
-      is $10^{-8}$. Experience showed that for a small
-      \refkeyword{CUTOFF} value (e.g. when using Vanderbilt
-      pseudopotentials) a bigger values have to be used.
-      A reasonable value for a 25~ryd cutoff calculation is $5 \cdot 10^{-6}$.\\
-      {\bf Warning}: for the HCTH functional, since it includes
-      both the $xc$ part and the gradient correction in a unique
-      functional, a GC-CUTOFF too high (e.g. $\geq 5 \cdot 10^{-5}$)
-      could result in not including any $xc$ part with uncontrolled
-      related consequences.}
-
-\keyword{GDIIS}{}{}{}{\&CPMD}
-  \desc{Use the method of direct inversion in the
-      iterative subspace combined with a quasi-Newton method
-      (using BFGS) for optimization of
-      the ionic positions~\cite{Csaszar84}.%\cite{Fischer}\\
-      The number of DIIS vectors is read from the next line.\\
-      GDIIS with {\bf 5 vectors} is the {\bf default} method in
-      optimization runs.}
-
-\keyword{GENERATE COORDINATES}{}{}{}{\&ATOMS}
-  \desc{The number of generator atoms for
-      each species are read from the next line. \\
-      These atoms
-      are used together with the point group information
-      to generate all other atomic positions. The input still
-      has to have entries for all atoms but their coordinates
-      are overwritten. Also the total number of atoms per species
-      has to be correct.}
-
-\keyword{GENERATE REPLICAS}{}{}{}{\&PIMD}
-  \desc{Generate quantum free particle replicas
-        from scratch given a classical input
-        configuration according to the keyword \refkeyword{DEBROGLIE} 
-        specification.
-        %
-        This is the default if \refkeyword{INITIALIZATION} is active.}
-
-\keyword{GRADIENT CORRECTION}{}{}{[functionals]}{\&DFT}
-  \desc{Individual components of gradient corrected functionals can be
-    selected. Rarely needed anymore, use the \refkeyword{FUNCTIONAL}
-    keyword instead.\\
-
-      Functionals implemented are for the
-      exchange energy:\\
-      {\bf BECKE88}~\cite{Becke88}, {\bf GGAX}~\cite{Perdew92}
-      {\bf PBEX}~\cite{Perdew96}, {\bf REVPBEX}~\cite{Zhang98},
-      \goodbreak{\bf HCTH}~\cite{Handy98}, {\bf OPTX}~\cite{Optx},{\bf PBESX}~\cite{Perdew07} \\
-      and for the correlation part:\\
-      {\bf PERDEW86}~\cite{Perdew86}, {\bf LYP}~\cite{Lee88},
-      {\bf GGAC}~\cite{Perdew92}, {\bf PBEC} \cite{Perdew96},
-      {\bf REVPBEC} \cite{Zhang98}, {\bf HCTH} \cite{Handy98}
-      {\bf OLYP}~\cite{Optx},{\bf PBESC}~\cite{Perdew07}. \\
-      Note that for HCTH, exchange and correlation are treated as
-      a unique functional.\\
-      The keywords {\bf EXCHANGE} and {\bf CORRELATION}
-      can be used for the default functionals (currently BECKE88
-      and PERDEW86). If no functionals are specified the default
-      functionals for exchange and correlation are used.}
-
-\keyword{GSHELL}{}{}{}{\&CPMD}
-  \desc{Write a file {\bf GSHELL} with the information
-        on the plane waves for further use in S(q) calculations.}
-
-\keyword{HAMILTONIAN CUTOFF}{}{}{}{\&CPMD}
-  \desc{The lower cutoff for the diagonal
-      approximation to the Kohn-Sham matrix~\cite{Tuckerman94} is read from the
-      next line.\\
-      {\bf Default} is {\bf 0.5} atomic units.\\
-      For variable cell dynamics only the kinetic energy as
-      calculated for the reference cell is used.}
-
-\spekeyword{HAMILTONIAN CUTOFF}{}{}{}{\&RESP}{HAMILTONIAN CUTOFF RESP}
-  \desc{
-   The value where the preconditioner (the approximate
-   Greens function $(V_{kin}+V_{coul}-\epsilon_{KS})^{-1})$ is truncated.
-   HTHRS can also be used. Default value is 0.5.
-   }
-
-\keyword{HARDNESS}{}{}{}{\&RESP}
-  \desc{Not documented.}
-
-\keyword{HARMONIC REFERENCE SYSTEM}{}{[OFF]}{}{\&CPMD}
-  \desc{Switches harmonic reference system integration~\cite{Tuckerman94} on/off. \\
-      The number of shells included in the
-      analytic integration is controlled with the keyword
-      \refkeyword{HAMILTONIAN CUTOFF}. \\
-      By {\bf default} this option is switched {\bf off}.}
-
-\keyword{HARTREE-FOCK}{}{}{}{\&DFT}
-  \desc{Do a Hartree--Fock calculation. This only works correctly for
-       isolated systems. It should be used with care, it needs enormous
-       amounts of CPU time.}
-
-\keyword{HARTREE}{}{}{}{\&DFT}
-  \desc{Do a Hartree calculation. Only of use for testing purposes.}
-
-\keyword{HESSCORE}{}{}{}{\&CPMD}
-  \desc{Calculates the partial Hessian after relaxation of the enviroment,
-       equivalent to {\sl NSMAXP=0} ({\bf PRFO NSMAXP}).}
-
-\keyword{HESSIAN}{}{[DISCO,SCHLEGEL,UNIT,PARTIAL]}{}{\&CPMD}
-  \desc{The initial approximate {\bf Hessian}
-      for a {\bf geometry optimization}
-      is constructed using empirical rules with the DISCO~\cite{Fischer92}
-      or Schlegel's~\cite{Schlegel84} parametrization
-      or simply a unit matrix is used. \\
-      If the option {\bf PARTIAL} is used the initial approximate Hessian
-      for a geometry optimization
-      is constructed from a block matrix formed
-      of the parametrized Hessian and the partial Hessian (of the reaction
-      core). If the reaction core spans the entire system, its Hessian is simply
-      copied.  The keywords \refkeyword{RESTART} PHESS are required.}
-
-\spekeyword{HFX\_BLOCK\_SIZE}{}{}{}{\&DFT}{HFX BLOCK SIZE}
- \desc{Set the block size for the HFX calculations. This keyword is active only when no thresholdings of the integrals is used.
-   Default is 2. The block size is read from the next line.
-}
-
-\keyword{HFX CUTOFF}{}{}{}{\&SYSTEM}
- \desc{
- Set an additional cutoff for wavefunctionand density to be used in the calculation
- of exact exchange. Cutoffs for wavefunctions and densities are read from the next
- line in Rydberg units. Defaults are the same cutoffs as for the normal calculation.
- Only lower cutoffs than the defaults can be specified.
- }
-
-\spekeyword{HFX\_DISTRIBUTION}{}{}{}{\&DFT}{HFX DISTRIBUTION}
- \desc{Set the block distribution for the parallel HFX calculations. This keyword is active only when no thresholdings of the integrals is used.
-   Default is BLOCK\_CYCLIC. The distribution is read from the next line.
-}
-
-\keyword{HFX SCREENING}{\{WFC,DIAG,EPS\_INT,RECOMPUTE\_TWO\_INT\_LIST\_EVERY\}}{}{}{\&DFT}
-  \desc{Read value from the next line. \\
-        Perform the calculation of exact exchange using Wannier functions.
-        Orbital pairs are screened according to the distance of the Wannier
-        centers {\sl WFC}, the value of the integrals {\sl EPS\_INT}, or only the diagonal terms
-        are included ({\sl DIAG}). {\sl RECOMPUTE\_TWO\_INT\_LIST\_EVERY} 
-        allows to set how often the integral list is recomputed. }
-
-\keyword{HTHRS}{}{}{}{\&LINRES}
- \desc{
- Threshold for Hessian in preconditioner for linear response optimizations.
- Default is 0.5.
- }
-
-\keyword{IMPLICIT NEWTON RAPHSON}%
-        {\{PREC, CONTINUE, VERBOSE, ALTERNATIVE, STEP\}}{[N=nreg]}{}{\&CPMD}
-  \desc{Not documented.}
-
-\keyword{INITIALIZATION}{}{}{}{\&PIMD}
-  \desc{Provide an initial configuration for all replicas as specified either
-    by \refkeyword{GENERATE REPLICAS} or by \refkeyword{READ REPLICAS}.
-%
-    This option is automatically activated if \refkeyword{RESTART} COORDINATES is not
-    specified.
-%
-    It is defaulted to GENERATE REPLICAS together with \refkeyword{DEBROGLIE} CENTROID and a
-    temperature of 500~Kelvin.}
-
-\keyword{INITIALIZE WAVEFUNCTION}{}{[RANDOM, ATOMS]}{[PRIMITIVE]}{\&CPMD}
-  \desc{The initial guess for wavefunction optimization are either random
-    functions or functions derived from the atomic pseudo-wavefunctions.\\
-    For INITIALIZE WAVEFUNCTION ATOMS PRIMITIVE, CPMD will use
-    the occupation information given in the \&BASIS section in order to construct a
-    minimum spin multiplicity (i.e. doublet or singlet) initial wavefunction from the
-    pseudo atomic orbitals. This option may be helpful to avoid excessive spin contamination
-    in CDFT calculations (together with an already good initial guess for $V$) as it allows
-    a strict initial localisation of excess spins on any atom species.
-
-%
-    {\bf Default} is to use the {\bf atomic pseudo-wavefunctions}.}
-    
-\keyword{INTERACTION}{}{}{}{\&RESP}
-  \desc{Not documented.}
-
-\keyword{INTERFACE}{\{EGO,GMX\}}{\{[MULLIKEN, LOWDIN, ESP, HIRSHFELD],PCGFIRST\}}{}{\&CPMD}
-  \desc{Use CPMD together with a classical molecular dynamics code.
-    CPMD and the classical MD code are run simultaneously and
-    communicate via a file based protocol. See the file egointer.F
-    for more details.
-    This needs a specially adapted version of the respective classical MD code.
-    So far, there is an interface\cite{egoqmmm,gmxqmmm} to the MD programs
-    ego\cite{ego1,ego2} and Gromacs\cite{gmx3}.
-
-    When using the suboption PCGFIRST the code will use
-    \refkeyword{PCG}~MINIMIZE on the very first wavefunction
-    optimization and then switch back to DIIS.
-}
-
-\keyword{INTFILE}{[READ,WRITE,FILENAME]}{}{}{\&CPMD}
-  \desc{This keyword means {\it Interface File} and allows to select a 
-   special file name in the reading and writing stages.
-   The file name (max 40 characters) must be supplied in the next line.} 
-
-\keyword{ISOLATED MOLECULE}{}{}{}{\&CPMD}
-  \desc{Calculate the ionic temperature assuming that the system consists of an
-    isolated molecule or cluster.\\
-%
-    Note:
-%
-    This keyword affects exclusively the determination of the number of
-    dynamical degrees of freedom.
-%
-    This keyword does \textbf{not} activate the 'cluster option'
-    \refkeyword{SYMMETRY} 0, but it is activated if SYMMETRY 0 is
-    used \textbf{unless} the keyword \refkeyword{QMMM} is set as well.
-%
-    It allows studying an isolated molecule or cluster within periodic boundary
-    conditions.}
-
-\keyword{ISOTOPE}{}{}{}{\&ATOMS}
-  \desc{Changes the default masses of the atoms. \\
-%
-    This keyword has to be followed by {\sl NSP} lines (number of atom types).
-    In each line the new mass (in a.m.u.) of the respective species has to be specified (in
-    order of their definition).}
-
-\keyword{ISOTROPIC CELL}{}{}{}{\&SYSTEM}
-  \desc{Specifies a constraint on the super cell in constant pressure
-    dynamics or geometry optimization.
-    The shape of the cell is held fixed, only the volume changes.}
-
-\keyword{KEEPREALSPACE}{}{}{}{\&RESP}
-  \desc{Like the standard CPMD option, this keeps the C0 ground state
-    wavefunctions in the direct space representation during the calculation.
-    Can save a lot of time, but is incredibly memory intensive.}
-
-\keyword{KOHN-SHAM ENERGIES}{}{[OFF,NOWAVEFUNCTION]}{}{\&CPMD}
-  \desc{Calculation of the Kohn-Sham energies and the corresponding 
-        orbitals~\cite{KS}. \\
-%
-    The number of empty states that have to be calculated in addition to the
-    occupied states is read from the next line. \\
-%
-    The Kohn-Sham orbitals are stored on the file {\bf RESTART.x} except if the
-    keyword {\bf NOWAVEFUNCTION} is used. In this case, the program does not
-    allocate memory for wavefunctions for all k points. It computes eigenvalues
-    k point per k point losing information about wavefunctions. This keyword is
-    used for band structure calculation to compute the eigenvalues for many k
-    points.\\
-%
-    \textbf{Default} is not to calculate Kohn-Sham energies
-    (\defaultvalue{OFF}). \\
-%
-    {\bf Warning:} The usage of this keyword needs special care (especially
-    restarts).}
-
-\keyword{KSHAM}{}{[MATRIX,ROUT,STATE]}{}{\&CPMD}
-  \desc{Write out the Kohn-Sham Hamiltonian Matrix in the orbital basis given
-  in the RESTART file to KS\_HAM. For this option to work the \refkeyword{RESTART} option and
-  \refkeyword{OPTIMIZE WAVEFUNCTION} have to be activated. This option is useful for fragment
-  orbital DFT (FODFT) calculations. Orbitals for the output of the FO-DFT matrix element can
-  be given with the option {\bf STATE}, then indics of the two orbitals are read from the next
-  line. {\bf ROUT} controls printing of involved orbitals.\\ {\bf MATRIX} instructs CPMD to read
-  a transformation matrix from the file LOWDIN\_A to transform the KS-Hamiltonian to the
-  non-orthogonal orbital basis}.
-    
-\keyword{KPERT}{}{[MONKHORSTPACK,SCALE]}{}{\&RESP}
-\label{sec:kpert}
-  \desc{Calculation of total energy and electronic density of states with
-    an arbitraty number of k-points (at almost no additional
-    computational effort).  The method is based on a
-    ${\bf k}\cdot {\bf p}-$like approximation developed in the framework
-    of the density functional perturbation theory \cite{mimp}.
-    For a sampling of the BZ determined by the Monkhorst-Pack algorithm,
-    the option {\bf MONKHORSTPACK}
-    has to be specified, followed by the
-    dimension of the mesh along the 3 reciprocal space axis
-    $(NK_{1} , NK_{2} , NK_{3})$.
-    If omitted, the individual absolute coordinates of the k-points have
-    to be given one by one in the following lines.
-    The  \refkeyword{SCALE} option allows to specify them in units of
-    the reciprocal cell vectors.
-
-    The line after {\bf KPERT} has to contain the
-    the total number of k-points $(NKPTS)$, which have then to be given by
-    their coordinates and the associated weights $(RK,WK)$
-    in the format: \\
-    $NKPTS$ \\
-    $RK_{x1} \; RK_{y1} \; RK_{z1} \; WK_{1}$ \\
-    $\dots$\\
-    $RK_{x NKPTS} \; RK_{y NKPTS} \; RK_{z NKPTS} \; WK_{NKPTS}$. \\
-    Three response wavefunctions are calculated, corresponding to
-    the three independent orientations of the
-    k basis vectors in reciprocal space.
-    Therefore, 3 independent optimization loops are started ($x,y$ and $z$),
-    and the 3 sets of wfns are stored (you need 4 times the
-    memory required for a standard wavefunction optimization).
-    The second order correction to the $\Gamma$-point total energy
-    is calculated for the requested k-point mesh.
-
-    Further options are (each in a new line of the input file ):
-    \begin{description}
-    \item[WRITE\_C1]
-     the 3 sets of response wfns are stored in three separate restart files.
-    \item[HAMILTONIAN] the k-dependent Hamiltonian is constructed via
-     the second order perturbation theory approximation, and the
-    corresponding KS energies are calculated. Due to technical reasons, for
-    each k-point $2*NSTATE$ KS energies are calculated, however only
-    those corresponding to occupied orbitals are reliable.
-    \item[READ\_C1] the response wfns are read from RESTART.P\_\{xyz\}.
-    \item[BUILD\_C00] the set of k-dependent wfns (first order correction)
-    is calculated from the
-    unperturbed $\Gamma$-point wfns together with the
-    response orbitals.
-    They are then written in a standard \refkeyword{RESTART} file. 
-    From this restart file one can perform a calculation of the 
-    Hamiltonian matrix for each kpoint and calculate the KS energies 
-    (use {\bf LANCZOS DIAGO} in \&CPMD and the {\bf KPOINT} option {\bf ONLYDIAG} in \&SYSTEM.
-    The k-point mesh must be the same used in the linear response
-     calculation. set also {\bf NOSPHERICAL CUTOFF} in \&SYSTEM).
-    \item[NORESTART] no RESTART file is written.
-    \end{description}
-    }
-
-\keyword{KPOINTS}{}{}{options}{\&SYSTEM}
-  \desc{With no option, read in the next line with the number of k-points and for
-    each k-point, read the components in the Cartesian coordinates
-    (units~$2\pi/a$) and the weight.}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%
-% special input
-%%%%%%%%%%%%%%%%%%%%%%%%%
-    \begin{description}
-
-    \item[MONKHORST-PACK]
-      Read in the next line three numbers for the Monkhorst-Pack mesh. The
-        program calculates then the special k-points. With the keyword {\bf
-        SHIFT=kx ky kz} in the same line, you can precise the constant vector
-        shift.
-
-    \item[SYMMETRIZED]
-      Symmetrized special k-points mesh (useful if you use a constant vector
-        shift).
-
-    \item[FULL]
-      Construct full Monkhorst-Pack mesh with only inversion symmetry. Useful
-        for molecular dynamics simulation The keywords {\bf SYMMETRIZED FULL}
-        preserves all symmetry of Bravais lattice so there is no need to
-        symmetrize density and forces.
-    \item[SCALED]
-      You can give k-points in reciprocal space coordinates.
-    \item[BANDS]
-      This option is to calculate the band structure.\\
-%
-      For each line you have to specify the number of k-points for the band,
-        the initial and the final k-point.
-%
-        To finish the input, put:\\
-          0  0. 0. 0.  0. 0. 0.
-    \item[BLOCK=n {[OPTIONS]}]
-      The block option, specifies the number of k-points in the memory. The
-        program uses a swap file to store the wavefunctions only by default.
-        With the following options, you can change this behaviour:
-    \begin{description}
-      \item[ALL]
-        Three swap files are used to store wavefunctions and others arrays
-          related to k-points. Swap files are in the current directory or the
-          temporary directory given by environment variable TMPDIR. The use of
-          memory is smaller than with the above option.
-
-      \item[CALCULATED]
-        One swap file is used to store only wavefunctions. The other arrays
-          related to k-points are calculated each time if needed.
-
-      \item[NOSWAP]
-
-        The wavefunctions are not swapped. This is useful to
-          calculate eigenvalues for each k point with few memory used.\\
-%
-        {\bf Warning:} The wavefunctions calculated are irrelevant. You have to
-          specify explicitly some other options to use it:\\
-          MAXSTEP 1 and \\ STORE OFF WAVEFUNCTIONS DENSITY POTENTIAL.
-      \end{description}
-    \end{description}
-%%%%%%%%%%%%%%%%%%%%%%%%%
-% end of special input
-%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\keyword{LANCZOS DIAGONALIZATION}{\{ALL\}}{}{}{\&CPMD}
-  \desc{Use {\bf Lanczos diagonalization} scheme. \\
-    \textbf{Default} with \textbf{free energy functional}.}
-                
-\spekeyword{LANCZOS DIAGONALIZATION}{\{OPT,RESET=n\}}{}{}{\&CPMD}{LANCZOS DIAGONALIZATION OPT}
-  \desc{Use {\bf Lanczos diagonalization} scheme after (OPT) or periodically
-    during (RESET=n) direct wavefunction optimization using \refkeyword{ODIIS}.
-    The number n specifies the number of DIIS resets (ODIIS NO\_RESET=nreset)
-    due to poor progress until the wavefunction is diagonalized. This can be
-    helpful if the wavefunction is converging very slowly.}
-
-\keyword{LANCZOS PARAMETER}{[N=n]}{[ALL]}{}{\&CPMD}
-  \desc{Give four parameters for Lanczos diagonalization in the
-      next line:
-      \begin{itemize}
-      \item Maximal number of Lanczos iterations (50 is enough),
-      \item Maximal number for the Krylov sub-space (8 best value),
-      \item Blocking dimension ( $\leq NSTATE$, best in range 20-100)
-            If you put a negative or zero number, this parameter is
-            fixed by the program in function of the number of states
-            ($(n+1)/(int(n/100+1))$).
-      \item Tolerance for the accuracy of wavefunctions\\
-            ($10^{-8}$ otherwise $10^{-12}$ with Trotter approximation)
-      \end{itemize}
-      If n is specified, read $n-1$ lines after the first one,
-      containing a threshold density and a tolerance.
-      See the hints section \ref{hints:lanczos} for more information.}
-
-\keyword{LANCZOS}{}{ [CONTINUE,DETAILS]}{}{\&RESP}
-  \desc{
-   lanczos\_dim  iterations   conv\_threshold
-   lanczos\_dim= dimension of the vibrational d.o.f.
-   iterations = no. of iterations desired for this run
-   conv\_threshold = threshold for convergence on eigenvectors
-   CONTINUE = argument for continuing Lanczos diagonalization
-              from a previous run
-              (reads file LANCZOS\_CONTINUE)
-   DETAILS  = argument for verbosity. prints a lot of stuff
-   }
-
-\keyword{LANGEVIN}{\{WHITE, CPMD, OPTIMAL, SMART, CUSTOM\}}{[MOVECM]}{[W0, NS]}{\&CPMD}
-  \desc{Use a (generalized) Langevin equation to thermostat the simulation\cite{Ceriotti10}. 
-   By default, the component of the noise parallel to the center of mass velocity is 
-     removed at each step of the thermostat. Removal can be disabled by the option {\sl MOVECM}.
-    \\\smallskip
-    {\sl CUSTOM:} \hfill\begin{minipage}[t]{10cm}
-                  The {\bf number of additional momenta} of the generalized Langevin equation
-                  {\sl NS} is read from the next line. The drift matrix 
-                  (dimension $(NS+1)\times(NS+1)$) is read from the file \texttt{GLE-A},
-                  which must be in the same directory in which the program is run. 
-                  Optionally, the static covariance for the GLE dynamics can be provided
-                  in the file \texttt{GLE-C}, so as to generate {\bf non-canonical sampling}. 
-                  A library of GLE parameters can be downloaded from 
-                  \htref{http://gle4md.berlios.de/}{http://gle4md.berlios.de/}
-                      \end{minipage}
-   \smallskip\\ A few {\bf presets} are provided, and are activated by the keywords:\\
-    {\sl WHITE:} \hfill\begin{minipage}[t]{10cm}
-                  A simple {\bf white-noise} Langevin dynamics is used. The optimally-sampled
-                  frequency {\sl W0} (in cm$^{-1}$) is read from the next line. Note that use of 
-                  {\sl LANGEVIN WHITE} in conjunction with {\sl MOLECULAR DYNAMICS CPMD} 
-                  will most likely cause a large drift of the electronic temperature.
-                      \end{minipage}
-    {\sl OPTIMAL:} \hfill\begin{minipage}[t]{10cm}
-                  An {\bf optimal-sampling} generalized Langevin dynamics is used. 
-                  The frequencies in the range from $10^{-4}${\sl W0} up to {\sl W0}
-                  will be sampled efficiently. Note that use of 
-                  {\sl LANGEVIN OPTIMAL} in conjunction with {\sl MOLECULAR DYNAMICS CPMD} 
-                  will cause a large drift of the electronic temperature.
-                  This option is suggested for use in Born-Oppenheimer MD.
-                      \end{minipage}
-    {\sl CPMD:} \hfill\begin{minipage}[t]{10cm}
-                  A generalized Langevin dynamics is used which is designed to 
-                  work in conjunction with Car-Parrinello MD. 
-                  The highest ionic frequency {\sl W0} (in cm$^{-1}$) is read from the 
-                  next line. Ionic frequencies down to $10^{-4}${\sl W0} will be sampled 
-                  efficiently, but not as much as for the {\sl OPTIMAL} keyword. 
-                      \end{minipage}
-                      
-    {\sl SMART:} \hfill\begin{minipage}[t]{10cm}
-                  A generalized Langevin dynamics that aims to be as efficient as possible
-                  on the slowest time scale accessible to a typical ab initio simulation. 
-                  In practice, vibrations with a time scale which is about 10000 time steps
-                  will be sampled optimally, and faster modes will be sampled as efficiently
-                  as possible without disturbing slower modes. 
-                  The highest ionic frequency {\sl W0} (in cm$^{-1}$) is read from the 
-                  next line. Will be about 50\%{} more efficient than {\sl OPTIMAL} for slow
-                  modes, but less efficient for fast vibrations. Use only with Born-Oppenheimer
-                  dynamics.
-                      \end{minipage}                      
-  }
-
-\keyword{LBFGS}{}{[NREM, NTRUST, NRESTT, TRUSTR]}{}{\&CPMD}
-  \desc{Use the limited-memory BFGS method (L-BFGS) for linear scaling
-      {\bf optimization} of the {\bf ionic positions}. For more informations,
-      see~\cite{LSCAL}. The information about the Hessian for the quasi-Newton
-      method employed is derived from the history of the
-      optimization~\cite{LSCAL,Liu89}.\\
-      Only one sub-option is allowed per line and the respective parameter
-      is read from the next line. The parameters mean:\\
-      \hfill\smallskip {\sl NREM}:
-                       \hfill\begin{minipage}[t]{10cm}
-                       {\bf Number} of {\bf ionic gradients} and
-                       {\bf displacements remembered} to approximate the Hessian.
-                       The default is either 40 or the number of ionic
-                       degrees of freedom, whichever is smaller.
-                       Values greater the number of degrees of freedom are not
-                       advisable.
-                       \end{minipage}
-      {\sl NTRUST:} \hfill\begin{minipage}[t]{10cm}
-                       {\sl NTRUST=1} switches from a trust radius algorithm
-                       to a {\bf line search} algorithm.
-                       The default value of 0 ({\bf trust radius}) is
-                       recommended.
-                      \end{minipage}
-      {\sl NRESTT:} \hfill\begin{minipage}[t]{10cm}
-                       {\sl NRESTT$>$0} demands a {\bf periodic reset} of the
-                       optimizer every {\sl NRESTT} steps.
-                       Default is 0 (no periodic reset).
-                       This option makes only sense if the ionic gradient is
-                       not accurate.
-                      \end{minipage}
-      {\sl TRUSTR:} \hfill\begin{minipage}[t]{10cm}
-                       Maximum and initial {\bf trust radius}.
-                       Default is 0.5 atomic units.
-                      \end{minipage}\\
-      It can be useful to combine these keywords with the keywords
-      \refkeyword{PRFO}, \refkeyword{CONVERGENCE} ADAPT, 
-      \refkeyword{RESTART} LSSTAT, \refkeyword{PRINT} LSCAL ON and others.}
-
-\keyword{LDA CORRELATION}{}{}{[functional]}{\&DFT}
-  \desc{The LDA correlation functional is specified. \\
-      Possible functionals are {\bf NO}
-      (no correlation functional),
-      {\bf PZ}~\cite{Perdew81}, \penalty 1000 {\bf VWN}~\cite{Vosko80},
-      {\bf LYP}~\cite{Lee88} and {\bf PW}~\cite{Perdew91}. \\
-      Default is the {\bf PZ}, the Perdew and Zunger fit to the data of
-      Ceperley and Alder~\cite{Ceperley80}.}
-
-\keyword{LDOS}{}{}{}{\&PROP}
-  \desc{
- Calculate the layer projected density of states.
- The number of layers is read from the next line.\\
-
- To use the LDOS keyword, the user must first have
- performed a wavefunction optimization and then
- restart with with the \refkeyword{PROPERTIES} and
- \refkeyword{LANCZOS DIAGONALIZATION} keywords in the
- \&CPMD section (and LDOS in the \&PROP section).\\
-
-\textbf{Warning:} If you use special k-points for a special structure
- you need to symmetrize charge density for which you must
-specify the \refkeyword{POINT GROUP}.
-}
-
-\keyword{LINEAR RESPONSE}{}{}{}{\&CPMD}
-  \desc{A perturbation theory calculation is done, according to the
-        (required) further input in the \&RESP section. In the latter,
-        one of the possible perturbation types (PHONONS, LANCZOS,
-        RAMAN, FUKUI, KPERT, NMR, EPR, see section \ref{sec:resp-section})
-        can be chosen, accompanied by further options.}
-
-\keyword{LOCAL DIPOLE}{}{}{}{\&PROP}
-  \desc{Calculate $numloc$ local dipole moments. \\
-      $numloc$ is read
-      from the next line followed by two numloc lines with the format:
-      \\  $xmin$ $ymin$ $zmin$
-      \\  $xmax$ $ymax$ $zmax$
-      }
-
-\keyword{LOCALIZATION}{}{}{}{\&TDDFT}
-  \desc{Use localized orbitals in the TDDFT calculation. Default
-       is to use canonical orbitals.}
-
-\spekeyword{LOCALIZE}{}{}{}{\&HARDNESS}{LOCALIZE HARDNESS}
-  \desc{Use localized orbitals in an orbital hardness calculation}
-
-\keyword{LOCALIZE}{}{}{}{\&PROP}
-  \desc{Localize the molecular orbitals \cite{Hutter94b} as defined through
-      the atomic basis set. \\
-      The same localization transformation is
-      then applied also to the wavefunctions in the plane wave basis.
-      These wavefunction can be printed with the keyword {\bf RHOOUT}
-      specified in the section \&CPMD section.}
-
-\keyword{LR KERNEL}{}{}{functional}{\&DFT}
-  \desc{Use another functional for the linear response kernel.}
-
-\keyword{LR-TDDFT}{}{}{}{\&TDDFT}
-  \desc{Use full linear response version of TDDFT. Default is to use
-        \refkeyword{TAMM-DANCOFF} approximation.}
-
-\keyword{LSD}{}{}{}{\&CPMD}
-  \desc{Use the local spin density approximation.\\
-      {\bf Warning:} Not all functionals are implemented for this
-      option.}
-
-\keyword{LOCAL SPIN DENSITY}{}{}{}{\&CPMD}
-  \desc{Use the local spin density approximation.\\
-      {\bf Warning:} Not all functionals are implemented for this
-      option.}
-
-\keyword{LOW SPIN EXCITATION}{}{[ROKS,ROSS,ROOTHAAN,CAS22]}{}{\&SYSTEM}
-  \desc{Use the low spin excited state functional~\cite{Frank98}. 
-For ROKS calculations, see also the \refkeyword{ROKS} keyword in the \&CPMD-section.}
-
-\keyword{LOW SPIN EXCITATION LSETS}{}{}{}{\&SYSTEM}
-  \desc{Slater transition-state density with restricted open-shell Kohn-Sham
-  (low spin excited state). Currently works only with ROKS but not with ROSS,
-  ROOTHAAN, or CAS22. See Ref.~\cite{lsets}.}
-
-\keyword{LSE PARAMETERS}{}{}{}{\&SYSTEM}
-  \desc{Determines the energy expression used in LSE calculations. The two 
-    parameters LSEA and LSEB are read from the next line.\\
-    \[E = \mbox{LSEA} \cdot E(Mixed) + \mbox{LSEB} \cdot E(Triplet)\]\\
-    The default (LSEA $= 2$ and LSEB $= 1$) corresponds to singlet symmetry. 
-    For the lowest triplet state, the \refkeyword{LSE PARAMETERS} must be set 
-    to 0 and 1 (zero times mixed state plus triplet). See ref \cite{Frank98} 
-    for a description of the method.}
-
-\keyword{LZ-SHTDDFT}{}{}{}{\&TDDFT}
-  \desc{Non adiabatic (nonadiabatic, non-adiabatic) trajectory surface hopping 
-        scheme based on Landau-Zener transition probabilities. 
-        Excited state dynamics is performed on TDDFT potential energy surfaces.
-        To be used together with the keywords \refkeyword{MOLECULAR DYNAMICS} BO
-        and \refkeyword{TDDFT} in the \&CPMD section (see section~\ref{sec:TDDFTdynamics}).
-        Do NOT use this keyword together with 
-        \refkeyword{SURFACE HOPPING} in \&CPMD, which invokes the surface hopping scheme based on
-        \refkeyword{ROKS} (see \refkeyword{SURFACE HOPPING}).
-        See also the related approach beased on Tully's hopping probabilities~\refkeyword{T-SHTDDFT}.}
-
-\keyword{MAXRUNTIME}{}{}{}{\&CPMD}
-  \desc{The maximum RUN TIME (ELAPSED TIME) in seconds to be used is read from the 
-        next line. The calculation will stop after the given amount of time.\\
-      {\bf Default} is no limit.}
-
-\keyword{MAXITER}{}{}{}{\&CPMD}
-  \desc{The maximum number of iteration steps for the
-      self-consistency of wavefunctions. Recommended use instead
-      of \refkeyword{MAXSTEP} for pure wavefunction optimisation.
-      The value is read from the next line. \\
-      {\bf Default} is {\bf 10000} steps.}
-
-\keyword{MAXSTEP}{}{}{}{\&CPMD}
-  \desc{The maximum number of steps for geometry optimization
-      or molecular dynamics to be performed. In the case of pure
-      wavefunction optimisation, this keyword may be used instead
-      of \refkeyword{MAXITER}. The value is read from the next line. \\
-      {\bf Default} is {\bf 10000} steps.}
-
-\spekeyword{MAXSTEP}{}{}{}{\&LINRES}{MAXSTEP LINRES}
- \desc{
- Maximum number of optimization steps for linear response optimizations.
- Default is 1000.
- }
-
-\keyword{MEMORY}{\{SMALL, BIG\}}{}{}{\&CPMD}
-  \desc{Using {\bf BIG}, the structure factors for the density cutoff
-      are only calculated once and stored for reuse. \\
-      This option allows for considerable time savings in connection
-      with Vanderbilt pseudopotentials.\\
-      {\bf Default} is ({\bf SMALL}) to {\bf recalculate} them
-      whenever needed.}
-
-\keyword{MESH}{}{}{}{\&SYSTEM}
-  \desc{The number of {\bf real space mesh} points in $x-$, $y-$ and
-      $z-$direction is read from the next line. \\
-      If the values provided
-      by the user are not compatible with the plane-wave cutoff or the
-      requirements of the FFT routines the program chooses the next
-      bigger valid numbers. \\
-      {\bf Default} are the {\bf minimal values} compatible
-      with the energy cutoff and the {\bf FFT} requirements.}
-
-\keyword{METADYNAMICS ... END METADYNAMICS}{}{}{}{\&ATOMS}
-  \desc{Initiate Metadynamics (see section~\ref{sec:meta} for more
-    information on the available options and the input format).}
-
-\keyword{MIRROR}{}{}{}{\&CPMD}
-  \desc{Write the input file to the output.}
-
-\keyword{MIXDIIS}{}{}{}{\&CPMD}
-  \desc{Not documented}
-
-\keyword{MIXSD}{}{}{}{\&CPMD}
-  \desc{Not documented}
-
-\keyword{MODIFIED GOEDECKER}{}{[PARAMETERS]}{}{\&CPMD}
-  \desc{To be used in combination with \refkeyword{LOW SPIN EXCITATION}~\textbf{ROKS}. \\
-  Calculation of the off-diagonal Kohn-Sham matrix elements $F_{AB}$ and
-  $F_{BA}$ (with A, B: ROKS-SOMOs) is performed according to a modified
-  Goedecker-Umrigar scheme
-( $F_{AB} := (1-\lambda _{AB})F_{AB} + \lambda _{AB} F_{BA}$ and
-  $F_{BA} := (1-\lambda _{BA})F_{BA} + \lambda _{BA} F_{AB}$ ).
- Default values are $\lambda _{AB}=-0.5$ and $\lambda _{BA}=0.5$.
- see Ref.~\cite{GrimmJCP2003}.\\
-
-  With the optional keyword \textbf{PARAMETERS}: $\lambda _{AB}$ and $\lambda _{BA}$
-  are read from the next line. Can be used to avoid unphysical rotation of the SOMOs.
-  Always check the orbitals!\\
-  
-  See also \ref{hints:roks}.
-   }
-
-\keyword{MOLECULAR DYNAMICS}{}{[CP, BO, ET, PT, CLASSICAL, FILE [XYZ, NSKIP=N, NSAMPLE=M]]}{}{\&CPMD}
-  \desc{Perform a molecular dynamics (MD) run.
-      {\bf CP} stands for a Car-Parrinello type MD.
-      With the option {\bf BO} a Born-Oppenheimer MD is performed
-      where the wavefunction is reconverged after each MD-step. 
-      {\bf EH} specifies Ehrenfest type dynamics according to which the Kohn-Sham
-      orbitals are propagated in time (real electronic dynamics coupled to the nuclear dynamics). 
-      In this case the time step has to be decreased accordingly due to the small mass of the
-      electrons (typical values between 0.01 and 0.1 au). If you use EH dynamics and additional input
-      section {\&PTDDFT} need to be specified. You need to start the dynamics with well converged
-      KS orbitals from the RESTART file (before starting the EH dynamics do an optimization of the
-      wavefunction with a convergence of {1.D-8} or {1.D-9}, if possibe. An additional file
-      called "wavefunctions" is produced, which containes the complex KS orbitals needed for
-      the restart of the EH dynamics (see restart options in {\&PTDDFT}). Typical (minimal) input
-      \&CPMD and \&PTDDFT sections to be used with EH dynmiacs\\
-      \&CPMD \\
-        MOLECULAR DYNAMICS EH \\
-        RESTART WAVEFUNCTION COORDINATES LATEST \\
-        CAYLEY \\
-        RUNGE-KUTTA \\
-        TIMESTEP \\ 
-        0.01 \\
-        MAXSTEP \\ 
-        10000 \\
-     \&END \\
-     \&PTDDFT \\
-       ACCURACY \\ 
-       1.0D-8 \\ 
-       RESTART \\ 
-       2 \\
-     \&END \\
-      The keywords CAYLEY and RUNGE-KUTTA specifies the algorithms used for the propagation of the KS
-      orbitals (are the default and recommended options).\\
-      {\bf CLASSICAL }
-      means that a MD that includes classical atoms is performed.
-
-      If {\bf FILE} is set, then the trajectory is reread from a file instead of being calculated. This
-      is useful for performing analysis on a previous trajectory. Can be used in conjonction with the 
-      standard MD options like DIPOLE DYNAMICS and WANNIER; some other features like LINEAR RESPONSE are 
-      also enabled. The trajectory is read from a file named TRAJSAVED (usually a copy of a previous TRAJECTORY file), 
-      or TRAJSAVED.xyz if {\bf XYZ} is set. {\bf NSKIP} and {\bf NSAMPLE} control the selection of 
-      frames read: the frame read at step ISTEP is NSKIP+ISTEP*NSAMPLE.
-
-      {\bf Default} is {\bf CP}.}
-
-\keyword{MOLECULAR STATES}{}{}{}{\&TDDFT}
-  \desc{Calculate and group Kohn--Sham orbitals into
-        molecular states for a TDDFT calculation.}
-
-\keyword{MOVERHO}{}{}{}{\&CPMD}
-  \desc{Mixing used during optimization of geometry or molecular dynamics.
-      Use atomic or pseudowavefunctions to project wavefunctions
-      in order to calculate the new ones with movement of atoms.
-      Read in the next line the parameter (typically 0.2). }
-
-\keyword{MOVIE TYPE}{}{}{}{\&ATOMS}
-  \desc{Assign special movie atom types to the species.\\
-      The types are read from the next line. Values from 0 to 5
-      were allowed in the original MOVIE format.}
-
-\keyword{MOVIE}{}{[OFF, SAMPLE]}{}{\&CPMD}
-  \desc{Write the atomic coordinates without
-      applying periodic boundary conditions in MOVIE
-      format every {\sl IMOVIE} time steps on file {\em MOVIE}.
-      {\sl  IMOVIE} is read from the next line. \\
-      {\bf Default} is {\bf not} to
-      write a movie file.}
-
-\keyword{MULTIPLICITY}{}{}{}{\&SYSTEM}
-  \desc{This keyword only applies to LSD calculations.\\
-      The multiplicity (2$S$+1) is read from the next line.\\
-      {\bf Default} is the {\bf smallest possible} multiplicity.}
-
-\spekeyword{N\_CYCLES}{}{}{}{\&PTDDFT}{N-CYCLES}
-  \desc{Defines the number of cycles (time steps) used in the propagation
-        of the perturbed KS orbitals in a \refkeyword{PROPAGATION SPECTRA} calculation.
-        The number of cycles is read from the next line.}
-
-\keyword{NEQUI}{}{}{}{\&PATH}
-  \desc{Number of equilibration steps discarded to calculate the mean force.}
-
-\keyword{NEWCODE}{}{}{}{\&DFT}%
-  \desc{Switch to select one out of two versions of
-      code to calculate exchange-correlation functionals. \\
-      NEWCODE is the default, but not all functionals are available with
-      NEWCODE, if you select one of these, \refkeyword{OLDCODE} is used automatically.
-      NEWCODE is highly recommended for all new projects and
-      especially for vector computers, also some of the newer
-      functionality is untested or non-functional with OLDCODE.
-      }
-
-\keyword{NLOOP}{}{}{}{\&PATH}
-  \desc{Maximum number of string searches for Mean Free Energy Path searches.}
-
-\keyword{NMR}{}{}{options, see response\_p.inc}{\&RESP}
-  \desc{Calculate the NMR chemical shielding tensors for the
-  system. Most important option: FULL, does a calculation with
-  improved accuracy for periodic systems but takes a lot of
-  time. Isolated systems: Use OVERLAP and 0.1 (on next line) for the
-  same effect. \textit{Be careful for non-hydrogen nuclei.} The
-  shielding is calculated without contribution from the core
-  electrons. Contact sebastia@mpip-mainz.mpg.de for further details.}
-
-
-\keyword{NOGEOCHECK}{}{}{}{\&CPMD}
-  \desc{Default is to check all atomic distances and stop the program
-        if the smallest disctance is below 0.5 Bohr. This keyword requests
-        not to perform the check.}
-
-\keyword{NONORTHOGONAL ORBITALS}{}{[OFF]}{}{\&CPMD}
-  \desc{Use the norm constraint
-      method~\cite{HutterIP} for molecular dynamics or non\-orthogonal
-      orbitals in an optimization run.\\
-      On the next line the limit of the off diagonal elements of the
-      overlap matrix is defined.
-      {\bf Warning:} Adding or deleting this option during a MD run
-      needs special care.}
-
-\keyword{NOOPT}{}{}{}{\&RESP}
-  \desc{
-   Do not perform a ground state wfn optimization. Be sure
-   the restarted wfn is at the BO-surface.
-   }
-
-\keyword{NOPRINT ORBITALS}{}{}{}{\&PROP}
-  \desc{Do not print the wavefunctions in the atomic basis set.}
-
-\keyword{NORMAL MODES}{}{}{}{\&PIMD}
-  \desc{Use the normal mode representation~\cite{Tuckerman96}
-        of the path integral propagator. It is possible to impose a
-        mass disparity between centroid and non--centroid coordinates by
-        dividing the fictitious masses of only the {\em non}--centroid
-        $s=2, \dots ,P$ replicas by
-        the adiabaticity control factor FACSTAGE. This dimensionless
-        factor {\em must always} be specified in the following line.
-        Note: the eigen--{\em frequencies} of the $s>1$ replicas are changed
-        by only $\sqrt{\mbox{FACSTAGE}}$, see Ref.~\cite{Martyna96}(b).
-        Using FACSTAGE~$\not= 1.0$ makes only sense in conjunction
-        with CENTROID DYNAMICS where WMASS=1.0 has to be used as well.}
-
-\keyword{NOSE PARAMETERS}{}{}{}{\&CPMD}
-  \desc{The {\bf parameters} controlling the {\bf Nos\'e
-      thermostats}~\cite{Nose84,Hoover85} are read in the following order 
-      from the next line:\\
-      The {\bf length} of the Nos\'e-Hoover chain for the {\bf ions},\\
-      the {\bf length} of the Nos\'e-Hoover chain for the {\bf electrons},\\
-      the {\bf length} of the Nos\'e-Hoover chain for the {\bf cell
-      parameters}.\\
-      (The respective {\bf default} values are {\bf 4}.)\\
-      The {\bf multiplication factor} (NEDOF0, a real number) for the number of
-      {\bf electronic} degrees of freedom.
-      The used degrees of freedom (NEDOF) are defined as $NEDOF=NEDOF0*X$
-      If NEDOF0 is a negative number X is the true number of DOFs, if
-      it's a positive number, X is the number of electronic states
-      ({\bf default} for NEDOF0 is {\bf 6}).
-      \\
-      The order of the {\bf Suzuki/Yoshida integrator}
-      ({\bf default} is {\bf 7}, choices are 3, 5, 7, 9, 15, 25, 125 and 625),\\
-      and the {\bf decomposition ratio} of the time step
-      ({\bf default} is {\bf 1}).\\
-      If this keyword is omitted, the defaults are used. \\
-      {\bf If the keyword is used \underline{all} parameters have to be
-      specified.}}
-
-\keyword{NOSE}{\{IONS, ELECTRONS, CELL\}}{[ULTRA,MASSIVE,CAFES,LOCAL]}{}{[T0]}{\&CPMD}
-  \desc{{\bf Nos\'e-Hoover chains}~\cite{Nose84,Hoover85} for the {\bf
-      ions}, {\bf electrons}, or {\bf cell parameters} are used.\\
-      The {\bf target temperature} in Kelvin and
-      the {\bf thermostat frequency}
-      in $cm^{-1}$, respectively the {\bf fictitious kinetic
-      energy} in atomic units and the {\bf thermostat frequency}
-      in $cm^{-1}$ are read from the next line.
-      Two files NOSE\_ENERGY and NOSE\_TRAJEC are written at each step containing 
-      the Nos\'e-Hoover kinetic, potential and total energies along the dynamics
-      (NOSE\_ENERGY) and the Nos\'e-Hoover variables and their velocities (NOSE\_TRAJEC); 
-      these are useful in a wealth of post-processing calculations such as, e.~g. 
-      heat transfer problems\cite{heat1,heat2}.
-      For the ionic case the additional
-      keyword {\bf ULTRA} selects a thermostat for each species,
-      the keyword {\bf MASSIVE} selects a thermostat for each degree of
-      freedom, and the keyword {\bf CAFES} can be used to give different
-      temperatures to different groups of atoms\cite{cafes02}.
-      The syntax in the {\bf CAFES} case is:\\[2ex]
-      \texttt{NOSE IONS CAFES}\\
-      ~~~~\textsl{ncafesgrp}\\
-      ~~\textsl{cpnumber\_a\_1}~~\textsl{cpnumber\_a\_2}~~Temperature Frequency\\
-      \dots\\
-      ~~\textsl{cpnumber\_n\_1}~~\textsl{cpnumber\_n\_2}~~Temperature Frequency\\[2ex]
-      There are \textsl{ncafesgrp} groups, specified by giving their
-      first CPMD atom number (\textsl{cpnumber\_X\_1}) and last CPMD atom
-      number (\textsl{cpnumber\_X\_2}). In the case of hybrid QM/MM
-      simulations, you have to consult the QMMM\_ORDER file to find those
-      numbers. The temperature and frequency can be different for each
-      group. All atoms of the system have to be in a CAFES group.
-      A new file, \texttt{CAFES} is created containing the temperature
-      of each group (cols. 2 \dots \textsl{ncafesgrp+1}) and the energy
-      of the Nose-Hoover chains of that group (last columns).\\
-      Using CAFES with different temperatures only makes sense if the
-      different groups are decoupled from each other by increasing the
-      masses of the involved atoms. The
-      mass can be specified in the topology / or with the \refkeyword{ISOTOPE}
-      keyword. However, you can only change the mass of a complete CPMD
-      species at a time. Hence, the topology and/or the input should be
-      such that atoms of different CAFES group are in different species.\\
-      {\bf NOTE:} CAFES is currently not restartable.\\[2ex]
-      The keyword {\bf LOCAL} collects groups of atoms to seperate
-      thermostats, each having its own Nos\'e-Hoover chain. Specify
-      the local thermostats as follows:\\[1ex]
-      \begin{tabular}{lll}
-        \multicolumn{3}{l}{\tt NOSE IONS LOCAL}\\
-        \multicolumn{3}{l}{$n_l$ \em (number of local thermostats)}\\
-        \em temperature 1 & \em frequency 1&\\
-        \vdots\\
-        \em temperature $n_l$ & \em frequency $n_l$ &\\[1ex]
-       \multicolumn{3}{l}{$n_r$ \em (number of atom ranges)}\\ 
-        \em thermostat number & \em start atom & \em end atom\\
-        \vdots &\em ($n_r$ entries)&\\
-      \end{tabular}
-
-      The parser for the atom ranges uses either the CPMD ordering or
-      the GROMOS ordering in case of classical or QM/MM runs. Multiple
-      ranges may be specified for the same thermostat. Atoms belonging
-      to the same CPMD constraint or the same solvent molecule in
-      QM/MM runs must belong to the same local thermostat.
-      
-      If {\bf T0} option is present, the initial temperature for the
-      Nos{\'e}-Hoover chains are read soon after the thermostat frequencies in the same line (also for the
-      LOCAL thermostat). By default it is same as the target temperature of the thermostat. 
-      Note: This is not implemented for the CAFES thermostat.}
-
-\keyword{NPREVIOUS}{}{}{}{\&PATH}
-  \desc{String index to restart from. Note that this is just for numbering files, the initial path in collective variables for the search is always {\em string.inp}.}
-
-\keyword{OACP}{}{[DENSITY, REF\_DENSITY, FORCE]}{}{\&RESP}
-  \desc{Not documented.}
-  
-\keyword{OCCUPATION}{}{[FIXED]}{}{\&SYSTEM}
-  \desc{The occupation numbers are read from the next line.\\
-      This keyword must be preceeded by  \refkeyword{STATES}.
-      The FIXED option fixes the occupation numbers for the
-      diagonalization scheme, otherwise this option is meaningless.}
-
-\keyword{ODIIS}{}{[NOPRECONDITIONING,NO\_RESET=nreset]}{}{\&CPMD}
-  \desc{Use the method of {\bf direct inversion} in the iterative
-      subspace for {\bf optimization} of
-      the {\bf wavefunction}~\cite{Hutter94a}.\\
-      The number of DIIS vectors is read from the next line. \\
-      (ODIIS with {\bf 10 vectors} is the {\bf default} method in
-      optimization runs.)\\
-      The preconditioning is controlled by the keyword
-      \refkeyword{HAMILTONIAN CUTOFF}.
-      Optionally preconditioning can be disabled.\\
-      By default, the number of wavefunction optimization cycles until DIIS is
-      {\bf reset} on poor progress, is the number of DIIS vectors. With
-      {\bf ODIIS NO\_RESET}, this number can be changed, or DIIS resets can
-      be {\bf disabled} altogether with a value of -1.}
-
-\keyword{OLDCODE}{}{}{}{\&DFT}
-   \desc{see \refkeyword{NEWCODE}}
-
-\keyword{OPTIMIZE GEOMETRY}{[XYZ, SAMPLE]}{}{}{\&CPMD}
-  \desc{This option causes the program to optimize the geometry of the 
-      system through a sequence of wavefunction optimizations and position
-      updates. The additional keyword XYZ requests writing the ``trajectory''
-      of the geometry additionally in xmol/xyz-format in a file {\em GEO\_OPT.xyz}. 
-      If the keyword SAMPLE is given, {\em NGXYZ} is read from the next line, and
-      then only every {\em NGXTZ} step is written to the xmol/xyz file.
-      The {\bf default} is to write every step ({\em NGXYZ} = $1$).\\
-      By default the a BFGS/DIIS algorithm is used (see \refkeyword{GDIIS})
-      to updated the ionic positions. Other options are: \refkeyword{LBFGS},
-      \refkeyword{PRFO}, and \refkeLMAXyword{STEEPEST DESCENT} IONS. See 
-      \refkeyword{OPTIMIZE WAVEFUNCTION} for details on the corresponding 
-      options for wavefunction optimizations.
-    }
-
-\keyword{OPTIMIZE SLATER EXPONENTS}{}{}{}{\&PROP}
-  \desc{Not documented}
-
-\keyword{OPTIMIZE WAVEFUNCTION}{}{}{}{\&CPMD}
-  \desc{Request a single point energy calculation through a wavefunction 
-      optimization. The resulting total energy is printed (for more output
-      options see, e.g.,: \refkeyword{PRINT}, \refkeyword{RHOOUT}, 
-      \refkeyword{ELF}) and a \refkeyword{RESTART} file is written. 
-      This restart file is a prerequisite for many other subsequent calculation
-      types in CPMD, e.g. \refkeyword{MOLECULAR DYNAMICS} CP or \refkeyword{PROPERTIES}.
-      By default a DIIS optimizer is used (see \refkeyword{ODIIS}), but other
-      options are: \refkeyword{PCG} (optionally with MINIMIZE), 
-      \refkeyword{LANCZOS DIAGONALIZATION}, \refkeyword{DAVIDSON DIAGONALIZATION},
-      and \refkeyword{STEEPEST DESCENT} ELECTRONS.}
-
-\keyword{OPTIMIZER}{}{[SD,DIIS,PCG,AUTO]}{}{\&LINRES}
- \desc{
- Optimizer to be used for linear response equations. Default is ``AUTO''
- which will first use PCG, then switch to DIIS and finally switch to
- DIIS with full storage and state dependent preconditioner.
- \refkeyword{THAUTO} sets the two tolerances for when to do the switch.
- }
-
-\keyword{ORBITAL HARDNESS}{}{[LR,FD]}{}{\&CPMD}
-  \desc{Perform an orbital hardness calculation. See section \&Hardness
-       for further input options.}
-
-\keyword{ORBITALS}{}{}{}{\&HARDNESS}
-  \desc{Specify the number of orbitals to be used in a hardness calculation on the next line.}
-
-\keyword{ORTHOGONALIZATION}{\{LOWDIN, GRAM-SCHMIDT\}}{[MATRIX]}{}{\&CPMD}
-  \desc{Orthogonalization in optimization runs is done either by
-      a L\"owdin (symmetric) or Gram-Schmidt procedure.\\
-      {\bf Default} is Gram-Schmidt except for parallel runs where L\"owdin
-      orthogonalization is used with the conjugate-gradient scheme.\\
-      With the additional keyword {\bf MATRIX} the L\"owdin transformation matrix 
-      is written to a file named LOWDIN\_A.}
-
-\keyword{OUTPUT}{}{[ALL, GROUPS, PARENT]}{}{\&PIMD}
-  \desc{Output files for each processor, processor group, or only
-        grandparent.
-        %
-        Default is PARENT to standard output file (Note:
-        some information such as messages for correct reading~/ writing of
-        restart files is lost);
-        GROUPS and ALL write to the files OUTPUT\_$n$ where $n$ is
-        the group and bead number, respectively.}
-
- \spekeyword{OUTPUT}{}{[ALL, GROUPS, PARENT]}{}{\&PATH}{OUTPUT PATH}
-   \desc{Idem as above, here for Mean Free Energy Path runs.}
-
-
-\spekeyword{PARA\_BUFF\_SIZE}{}{}{}{\&CPMD}{PARA BUFF SIZE}
-\desc{ Set the buffer size for parallel operation (sum, ...).
-   Default is 2**16. The size is read from the next line.
-}
-
-\spekeyword{PARA\_STACK\_BUFF\_SIZE}{}{}{}{\&CPMD}{PARA STACK BUFF SIZE}
-\desc{ Set the stack buffer size for parallel operation (sum, ...).
-   Default is 2**8. The size is read from the next line.
-}
-
-\spekeyword{PARA\_USE\_MPI\_IN\_PLACE}{}{}{}{\&CPMD}{PARA USE MPI IN PLACE}
-\desc{ Use MPI\_IN\_PLACE for parallel operation (sum, ...).
-   Default is FALSE.
-}
-
-
-\keyword{PARRINELLO-RAHMAN}{\{NPT,SHOCK\}}{}{}{\&CPMD}
-  \desc{To be used together with \refkeyword{MOLECULAR DYNAMICS}.\\
-      A {\bf variable cell MD} with
-      the {\bf Parrinello-Rahman Lagrangian}
-      is performed~\cite{parrah,parrah2}. 
-      With the additional keyword a {\bf constant NPT
-      MD} using the method of Martyna, Tobias,
-      and Klein~\cite{Martyna94}. \\
-      If this keyword is used together with other run options
-      like OPTIMIZE WAVEFUNCTIONS, calculations with different reference
-      cells can be performed.\\
-      With the additional keywork { \bf SHOCK} } a MD simulation using the multiscale
-      shock method \cite{shock} is performed.
-
-\keyword{PATH INTEGRAL}{}{}{}{\&CPMD}
-  \desc{Perform a {\bf path integral molecular dynamics}
-      calculation~\cite{Marx94,Marx96}.\\
-      This keyword requires further input in
-      the section \&PIMD ... \&END.}
-
-\keyword{PATH MINIMIZATION}{}{}{}{\&CPMD}
-  \desc{Perform a {\bf mean free energy path}
-      search~\cite{Eijnden06}.\\
-      This keyword requires further input in
-      the section \&PATH ... \&END.}
-
-\keyword{PATH SAMPLING}{}{}{}{\&CPMD}
-  \desc{Use CPMD together with a reaction path sampling~\cite{tps} program.
-      This needs special software.
-      Note: this keyword has {\em nothing} to do with path integral
-      MD as activated by the keyword PATH INTEGRAL and as specified in the
-      section \&PIMD ... \&END.}
-
-\keyword{PCG PARAMETER}{}{}{}{\&TDDFT}
-  \desc{The parameters for the PCG diagonalization are read from the
-       next line. If {\sl MINIMIZE} was used in the \refkeyword{DIAGONALIZER}
-       then the total number of steps (default 100) and the convergence
-       criteria (default $10^{-8}$) are read from the next line.
-       Without minimization in addition the step length (default 0.5) has also
-       to be given.}
-
-\keyword{PCG}{}{[MINIMIZE,NOPRECONDITIONING]}{}{\&CPMD}
-  \desc{Use the method of {\bf preconditioned conjugate gradients} for
-      {\bf optimization} of the {\bf wavefunction}.\\
-      The fixed step length is controlled by the keywords
-      \refkeyword{TIMESTEP ELECTRONS} and \refkeyword{EMASS}.\\
-      If the additional option {\bf MINIMIZE} is chosen, then additionally
-      line searches are performed to improve the preconditioning.\\
-      The preconditioning is controlled by the keyword
-      \refkeyword{HAMILTONIAN CUTOFF}.
-      Optionally preconditioning can be disabled.}
-
- \spekeyword{PERT\_TYPE}{}{}{}{\&PTDDFT}{PERT-TYPE}
-  \desc{The type of the static perturbation used with \refkeyword{MOLECULAR DYNAMICS} EH
-or \refkeyword{PROPAGATION SPECTRA} is read from the next line. 1: Dirac pulse, 2: Heaviside step
-function (constant value after $t=0$).}
-
- \spekeyword{PERT\_AMPLI}{}{}{}{\&PTDDFT}{PERT-AMPLI}
-  \desc{The amplitude of the perturbation used with \refkeyword{MOLECULAR DYNAMICS} EH
-or \refkeyword{PROPAGATION SPECTRA} is read from the next line. }
-
- \spekeyword{PERT\_DIRECTION}{}{}{}{\&PTDDFT}{PERT-DIRECTION}
-   \desc{Use with MOLECULAR DYNAMICS EH or PROPAGATION SPACTRA to specify the
-direction (x=1,y=2,z=3) of the perturbing field. The direction code (1,2,3) is
-read from the next line.}
-
-\keyword{PHONON}{}{}{}{\&RESP}
-  \desc{Calculate the harmonic frequencies from perturbation theory.}
-
-\keyword{PIPULSE}{}{}{}{\&PTDDFT}
-  \desc{Specifies a time dependent pi-pulse to be used with MOLECULAR DYNAMICS EH.
-        Use PIPULSE together with TD\_POTENTIAL. The pulse strength is read from the
-        next line (see subroutine gaugepot\_laser in td\_util.F for further details).}
-
-\keyword{POINT GROUP}{}{[MOLECULE], [AUTO], [DELTA=delta]}{}{\&SYSTEM}
-  \desc{The point group symmetry of
-      the system can be specified in the next line.
-      With the keyword {\sl AUTO} in the next line,
-      the space group is determined automatically.
-      This affects the calculation
-      of nuclear forces and ionic positions.
-      The electronic density and nuclear forces are symmetrized
-      in function of point group symmetry.
-      The group number is read from the next line.\\
-      Crystal symmetry groups:}
-\begin{verbatim}
-               1  1 (c1)     9   3m (c3v)   17 4/mmm (d4h)   25  222 (d2)
-               2 <1>(ci)    10  <3>m(d3d)   18   6   (c6)    26  mm2 (c2v)
-               3  2 (c2)    11   4  (c4)    19  <6>  (c3h)   27  mmm (d2h)
-               4  m (c1h)   12  <4> (s4)    20   6/m (c6h)   28  23  (t)
-               5 2/m(c2h)   13  4/m (c4h)   21   622 (d6)    29  m3  (th)
-               6  3 (c3)    14  422 (d4)    22   6mm (c6v)   30  432 (o)
-               7 <3>(c3i)   15  4mm (c4v)   23  <6>m2(d3h)   31 <4>3m(td)
-               8 32 (d3)    16 <4>2m(d2d)   24  6/mmm(d6h)   32  m3m (oh)
-\end{verbatim}
-\desc{You can specify the point group by its name using
-      the keyword {\sl NAME=} followed by the name of the point group
-      (one of both notations).\hfill\\
-      For molecular point groups the additional keyword {\sl MO\-LECULE}
-      has to be specified. The Sch\"onflies symbol of the group
-      is read in the following format from the next line:  \\
-      {\em Group symbol; order of principle axis}  \smallskip \\
-      Possible group symbols are any Sch\"onflies symbol with the
-      axis number replaced by $n$ (e.g. DNH). For molecular
-      point groups a special orientation is assumed. The principle
-      axis is along $z$ and vertical symmetry planes are orthogonal
-      to $x$.\\
-      {\sl DELTA=} specifies the required accuracy (default=$10^{-6}$).\\
-      With the keyword {\bf AUTO}, the point group is
-      determined automatically.}
-
-
-\keyword{POISSON SOLVER}{ \{HOCKNEY, TUCKERMAN, MORTENSEN\}}{[PARAMETER]}{}{\&SYSTEM}
-  \desc{This keyword determines the method for the solution of the
-      Poisson equation for isolated systems. Either Hockney's
-      method~\cite{Hockney70} or Martyna and Tuckerman's
-      method~\cite{Martyna99} is used. The smoothing parameter (for Hockney's
-      method) or $L \times \alpha$ for Tuckerman's method can be read from the
-      next line using the {\bf PARAMETER} keyword.
-
-      For more information about the usage of this parameter see also
-      section \ref{hints:symm0}.}
-
-\keyword{POLAK}{}{}{}{\&RESP}
-  \desc{
-   Uses the Polak-Ribiere formula for the conjugate
-   gradient algorithm. Can be safer in the convergence.
-   }
-
-\keyword{POLARISABILITY}{}{}{}{\&PROP}
-  \desc{Computes the polarisability of a system, intended as dipole
-        moment per unit volume.}
-
-\keyword{POLYMER}{}{}{}{\&SYSTEM}
-  \desc{Assume {\bf periodic boundary} condition in {\bf $x$-direction}.\\
-%       You also need to set the 'cluster option' (i.e. \refkeyword{SYMMETRY} 0).
-  }
-
-\keyword{POPULATION ANALYSIS}{}{[MULLIKEN, DAVIDSON],[n-CENTER]}{}{\&PROP}
-  \desc{The type of population analysis that is performed with the
-      projected wavefunctions. \\
-      L\"owdin charges are given with both
-      options. For the Davidson analysis~\cite{Davidson67} the maximum
-      complexity can be specified with the keyword {\bf n-CENTER}.\\
-      Default for n is 2, terms up to 4 are programmed. For the
-      Davidson option one has to specify the number of atomic orbitals
-      that are used in the analysis. For each species one has to give
-      this number in a separate line.
-      An input example for a water molecule is given in the hints
-      section \ref{hints:pop}.}
-
-\keyword{PRESSURE}{}{}{}{\&SYSTEM}
-  \desc{The {\bf external pressure} on the system is read from
-      the next line (in {\bf kbar}).}
-
-\keyword{PRFO}{}{[MODE, MDLOCK, TRUSTP, OMIN, PRJHES, DISPLACEMENT, HESSTYPE]}{}{\&CPMD}
-  \desc{Use the partitioned rational function optimizer (P-RFO) with a quasi-Newton
-      method  for {\bf optimization} of the {\bf ionic positions}. For more
-      informations, see~\cite{LSCAL}. The approximated Hessian is updated
-      using the Powell method~\cite{Powell71}.
-      This method is used to find {\bf transition states} by
-      {\bf following eigenmodes} of the approximated
-      Hessian~\cite{Banerjee85,LSCAL}.\\
-      Only one suboption is allowed per line and the respective parameter
-      is read from the next line. The suboption {\bf PRJHES} does not take any
-      parameter. If it is present, the translational and rotational modes are
-      removed from the Hessian. This is only meaningful for conventional (not
-      microiterative) transition state search. The parameters mean:\\
-      \hfill\smallskip {\sl MODE}:
-                       \hfill\begin{minipage}[t]{9.6cm}
-                       Number of the initial Hessian {\bf eigenmode} to be
-                       followed. Default is 1 (lowest eigenvalue).
-                       \end{minipage}\\
-      {\sl MDLOCK:} \hfill\begin{minipage}[t]{9.6cm}
-                       {\sl MDLOCK=1} switches from a mode following algorithm
-                       to a {\bf fixed eigenvector} to be maximized.
-                       The default value of 0 ({\bf mode following}) is
-                       recommended.
-                      \end{minipage}\\
-      {\sl TRUSTP:} \hfill\begin{minipage}[t]{9.6cm}
-                       Maximum and initial {\bf trust radius}.
-                       Default is 0.2 atomic units.
-                                      \end{minipage}\\
-      {\sl OMIN:} \hfill\begin{minipage}[t]{9.6cm}
-                       This parameter is the minimum {\bf overlap} between the
-                       maximized mode of the previous step and the most
-                       overlapping eigenvector of the current Hessian.
-                       The trust radius is reduced until this requirement is
-                       fulfilled. The default is 0.5.
-                      \end{minipage}\\
-      {\sl DISPLACEMENT:} \hfill\begin{minipage}[t]{9.6cm}
-                       Finite-difference {\bf displacement} for initial partial
-                       Hessian. The default is 0.02.
-                      \end{minipage}\\
-      {\sl HESSTYPE:} \hfill\begin{minipage}[t]{9.6cm}
-                      {\bf Type} of initial partial Hessian.
-                      0: Finite-difference.
-                      1: Taken from the full Hessian assuming a block-diagonal
-                      form. See keyword \refkeyword{HESSIAN}.
-                      The default is 0.
-                      \end{minipage}\\
-      It can be useful to combine these keywords with the keywords
-      \refkeyword{CONVERGENCE} ENERGY, \refkeyword{RESTART} LSSTAT, 
-      \refkeyword{RESTART} PHESS, \refkeyword{PRFO} NSVIB,
-      \refkeyword{PRINT} LSCAL ON and others.}
-
-\spekeyword{PRFO}{}{[NVAR, CORE, TOLENV, NSMAXP]}{}{\&CPMD}{PRFO NVAR}
-  \desc{If any of these suboptions is present, the {\bf microiterative transition
-      state search} scheme for {\bf optimization} of the {\bf ionic positions}
-      is used. For more informations, see~\cite{LSCAL}.
-      A combination of the {\bf L-BFGS} and {\bf P-RFO} methods is employed for
-      linear scaling search for transition states~\cite{LSCAL,Turner99}.
-      Before each P-RFO step in the reaction core towards the transition
-      state, the {\bf environment} is fully {\bf relaxed} using L-BFGS.\\
-      Only one suboption is allowed per line.
-      The {\bf reaction core} can be selected using the {\bf NVAR} or
-      {\bf CORE=ncore} suboptions. The value in the line after {\bf PRFO NVAR}
-      sets the number of ionic {\bf degrees of freedom} in the reaction core.
-      The {\sl ncore} values following the line {\bf PRFO CORE=ncore} select
-      the {\bf member atoms} of the reaction core.
-      If unspecified, the {\sl NVAR/3} first atoms form the reaction core.
-      The parameters read with the two remaining suboptions are:\\
-      \hfill\smallskip {\sl TOLENV}:
-                       \hfill\begin{minipage}[t]{10cm}
-                       {\bf Convergence criterion} for the maximum component of
-                       the gradient acting on the ions of the {\bf environment}
-                       until a P-RFO step within the reaction core is performed.
-                       Default is one third of the convergence criterion for
-                       the gradient of the ions ({\bf CONVERGENCE GEOMETRY}).
-                       \end{minipage}
-      {\sl NSMAXP:} \hfill\begin{minipage}[t]{10cm}
-                       Maximum number of P-RFO {\bf steps} to be performed in the
-                       reaction core. The keyword {\bf HESSCORE} corresponds
-                       to {\bf PRFO NSMAXP} with {\sl NSMAXP=0}.
-                      \end{minipage}
-      It can be useful to combine these keywords with the keywords
-      \refkeyword{LBFGS}, \refkeyword{CONVERGENCE} ADAPT, 
-      \refkeyword{CONVERGENCE} ENERGY, \refkeyword{RESTART} LSSTAT,
-      \refkeyword{RESTART} PHESS, \refkeyword{PRFO NSVIB}, 
-      \refkeyword{PRINT} LSCAL ON, the other suboptions of PRFO,
-      and others.}
-
-\keyword{PRFO NSVIB}{}{}{}{\&CPMD}
-  \desc{Perform a {\bf vibrational analysis} every NSVIB P-RFO steps {\bf on the
-      fly}.
-      This option only works with the P-RFO and microiterative transition state
-      search algorithms. In case of microiterative TS search, only the reaction
-      core is analyzed.}
-
-\keyword{PRINT COORDINATES}{}{}{}{\&CLASSIC}
-  \desc{Not documented}
-
-\keyword{PRINT ENERGY}{ \{ON, OFF\}} {[EKIN, ELECTROSTATIC,
-       ESR, ESELF, EFREE, EBAND, ENTROPY, EPSEU, EHEP,
-       EHEE, EHII, ENL, EXC, VXC, EGC, EBOGO]}{}{\&CPMD}
-  \desc{Display or not information about energies.}
-
-\keyword{PRINT FF}{}{}{}{\&CLASSIC}
-  \desc{Not documented}
-
-\keyword{PRINT LEVEL}{}{}{}{\&PIMD}
-  \desc{The detail of printing information is read as an integer number
-        from the next line.
-        %
-        Currently there is only minimal output
-        for $<5$ and maximal output for $\geq 5$.}
-
-\spekeyword{PRINT LEVEL}{}{}{}{\&PATH}{PRINT PATH}
-  \desc{Idem as above, here for Mean Free Energy Path searches.}
-
-\keyword{PRINT}{\{ON,OFF\}}{[INFO, EIGENVALUES, COORDINATES, LSCAL, FORCES, WANNIER]}{}{\&CPMD}
-  \desc{A {\bf detailed output} is printed every {\sl IPRINT} iterations.
-      Either only different contribution to the energy or
-      in addition the atomic coordinates and the forces are printed.
-      {\sl IPRINT} is read from the next line if the keywords {\bf ON}
-      or {\bf OFF} are not specified. \\
-      {\bf Default} is {\bf only energies} after the first step and
-      at the end of the run. OFF switches the output off.}
-
-\keyword{PRNGSEED}{}{}{}{\&CPMD}
-  \desc{The seed for the random number generator is read as an integer number
-        from the next line.}
-
-\keyword{PROCESSOR GROUPS}{}{}{}{\&PIMD}
-  \desc{%
-        This is only needed for {\em fine}--tuning load balancing in case of
-        path integral runs {\em iff} two level parallelization is used.
-        The default optimizes the combined load balancing
-        of the parallelization over replicas and g--vectors.
-        The default load distribution is usually optimal.
-        Separate the total number of processors into
-        a certain number of processor groups that is read from the
-        following line; only 2$^N$ = 2, 4, 8, 16, $\dots$ groups
-        are allowed and the maximum number of groups is
-        the number of replicas.
-        Every processor group is headed by one PARENT and has
-        several CHILDREN
-        that work together on a single replica at one time; the processor
-        groups work sequentially on replicas if there is more
-        than one
-        replica assigned to one processor group.
-        %
-        Note: if the resulting number of processor groups is much smaller than
-        the number of replicas (which occurs in ``odd'' cases)
-        specifying the number of
-        processor groups to be equal to the number of replicas might be
-        more efficient.
-        %
-        This keyword is only active in parallel mode.}
-
-\spekeyword{PROCESSOR GROUPS}{}{}{}{\&PATH}{PROCESSOR GROUPS PATH}
-  \desc{%
-       Idem as above, here for mean free energy path search.}
-
-\keyword{PROJECT WAVEFUNCTION}{}{}{}{\&PROP}
-  \desc{The wavefunctions are projected on atomic orbitals. \\
-      The projected wavefunctions are then used
-      to calculate atomic populations and bond orders.
-     The atomic orbitals to project on are taken from the
-    \&BASIS section. If there is no \&BASIS section in the input
-    a minimal Slater basis is used. See section~\ref{input:basis}
-    for more details.
-     }
-
-\keyword{PROJECT}{}{[NONE, DIAGONAL, FULL]}{}{\&CPMD}
-  \desc{This keyword is controlling
-      the calculation of the constraint force in optimization runs.}
-
-\spekeyword{PROP\_TSTEP}{}{}{}{\&PTDDFT}{PROP-TSTEP}
-  \desc{Propagation timestep used in Ehrenfest dynamics. It is used in the
-spectra calculation ({\bf PROPAGATION SPECTRA} ) to specify the time step
-for the propagation of the KS orbitals.}
-
-\keyword{PROPAGATION SPECTRA}{}{}{}{\&CPMD}
-  \desc{Calculates the electronic absorption spectra using the
-        TDDFT propagation of the Kohn-Sham orbitals. Use the section
-        \&PTDDFT to define the parameters. Use this principal keyword 
-        always with CAYLEY (in \&CPMD). The program produces a file 
-        "dipole.dat" with the time series of the variation of the dipole
-        in x, y, and z directions. After Fourier transform of this file 
-        one gets the desired absorption spectra.\\
-        Typical (minimal) input file (for the sections \&CPMD and \&PTDDFT)
-        \&CPMD \\
-          PROPAGATION SPECTRA
-          RESTART WAVEFUNCTION COORDINATES LATEST
-          CAYLEY
-        \&END \\
-        \&PTDDFT \\ 
-         ACCURACY \\
-         1.0D-8 \\
-         N\_CYCLES \\ 
-         100000 \\
-         PROP\_TSTEP \\
-         0.01 \\ 
-         EXT\_PULSE \\ 
-         1.D-5 \\ 
-         PERT\_DIRECTION \\ 
-         1 \\
-         RESTART \\
-         2 \\
-       \&END \\
-       The time step is specified by setting \refkeyword{PROP-TSTEP}. The
-       total number of iteration is controlled by \refkeyword{N-CYCLES}.}
-
-\keyword{PROPERTIES}{}{}{}{\&CPMD}
-  \desc{Calculate some properties.\\
-      This keyword requires
-      further input in the section \&PROP \dots \&END.}
-
-\keyword{PROPERTY}{ \{ STATE \}}{}{}{\&TDDFT}
-  \desc{Calculate properties of excited states at the end of an
-        \refkeyword{ELECTRONIC SPECTRA} calculations. default is to calculate
-        properties for all states. Adding the keyword {\bf STATE} allows
-        to restrict the calculation to only one state. The number of the
-        state is read from the next line.}
-
-\keyword{QMMM}{}{[QMMMEASY]}{}{\&CPMD}
-\desc{Activate the hybrid QM/MM code. This keyword requires
-      further input in the section \&QMMM \dots \&END.
-
-      The QM driver is the standard CPMD.
-      An interface program ({\bf MM\_Interface}) and a classic force field
-      (Gromos\cite{gromos96}/Amber\cite{amber7}-like) are needed to run the
-      code in hybdrid mode\cite{qmmm02,qmmm03,qmmm04,qmmm05,qmmm06}. 
-      This code requires a {\it special licence} and
-      is {\bf not} included in the standard CPMD code.
-% FIXME: AK 2005/07/10
-% we should put a contact address or web page here.
-      (see section~\ref{sec:qmmm} for more
-      information on the available options and the input format).}
-
-\spekeyword{QS\_LIMIT}{}{}{}{\&LINRES}{QS-LIMIT}
- \desc{
- Tolerance above which we use quadratic search algorithm in linear response calculations.
- }
-
-\keyword{QUENCH}{}{[IONS, ELECTRONS, CELL, BO]}{}{\&CPMD}
-  \desc{The {\bf velocities} of the {\bf ions}, {\bf wavefunctions} or
-      the {\bf cell} are set to zero at the beginning of a run.\\
-      With the option {\bf BO} the wavefunctions are converged
-      at the beginning of the MD run.}
-
-\keyword{RAMAN}{}{}{}{\&RESP}
-  \desc{Calculate the polarizability (also in periodic systems) as
-  well as Born-charges and dipole moment.}
-
-\keyword{RANDOMIZE}{}{[COORDINATES, WAVEFUNCTION, DENSITY, CELL]}{}{\&CPMD}
-  \desc{The {\bf ionic positions} or the {\bf wavefunction} or the
-      {\bf cell parameters} are {\bf randomly displaced} at the
-      beginning of a run.\\
-      The maximal amplitude of the displacement is read from the
-      next line.}
-
-\spekeyword{RANDOMIZE}{}{}{}{\&TDDFT}{RANDOMIZE TDDFT}
-  \desc{Randomize the initial vectors for the diagonalization in a TDDFT
-       calculation. The amplitude is read from the next line. Default is not
-       to randomize the vectors.}
-
-\keyword{RATTLE}{}{}{}{\&CPMD}
-  \desc{This option can be used to set
-      the maximum number of iterations and the tolerance for the
-      {\bf iterative orthogonalization}. These two numbers are read from
-      the next line. \\
-      {\bf Defaults} are 30 and $10^{-6}$.}
-
-\keyword{READ REPLICAS}{}{}{}{\&PIMD}
-  \desc{Read all $P$ replicas from a file with a name to be specified
-        in the following line, for the input format see subroutine
-        rreadf.F.}
-
-\keyword{REAL SPACE WFN KEEP}{}{[SIZE]}{}{\&CPMD}
-  \desc{The real space wavefunctions are kept in memory for later reuse.
-      This minimizes the number of Fourier transforms and can result in
-      a significant speedup at the expense of a larger memory use.
-      With the option {\bf SIZE} the maximum available memory for the
-      storage of wavefunctions is read from the next line (in MBytes).
-      The program stores as many wavefunctions as possible within the
-      given memory allocation.}
-
-\keyword{REFATOM}{}{}{}{\&HARDNESS}
-  \desc{Specify the reference atom to be used in a hardness calculation on the next line.
-       This option is to be used together with the \refkeyword{ORBITALS} and
-       \refkeyword{LOCALIZE}.}
-
-\keyword{REFERENCE CELL}{}{[ABSOLUTE, DEGREE, VECTORS]}{}{\&SYSTEM}
-  \desc{This cell is used to calculate the Miller indices in a
-      constant pressure simulation.
-      This keyword is only active together with the
-      option {\bf PARRINELLO-RAHMAN}.\\
-      The parameters specifying the reference (super) cell are
-      read from the next line. \\
-      Six numbers in the following order
-      have to be provided: $a$, $b/a$, $c/a$, $\cos \alpha$,
-      $\cos \beta$, $\cos \gamma$.\\
-      The keywords {\bf ABSOLUTE} and {\bf DEGREE } are
-      described in {\bf CELL} option.}
-
-\keyword{REFUNCT}{}{}{functionals}{\&DFT}
-  \desc{Use a special reference functional in a calculation.
-        This option is not active.}
-
-\keyword{REORDER LOCAL}{}{}{}{\&TDDFT}
-  \desc{Reorder the localized states according to a distance criteria.
-       The number of reference atoms is read from the next line.
-       On the following line the position of the reference atoms
-       within the set of all atoms has to be given.
-       The keyword \refkeyword{LOCALIZE} is automatically set.
-       The minimum distance of the center of charge of each
-       state to the reference atoms is calculated and the states
-       are ordered with respect to decreasing distance.
-       Together with the {\sl SUBSPACE} option in
-       a \refkeyword{TAMM-DANCOFF} calculation this can be used
-       to select specific states for a calculation.}
-
-\keyword{REORDER}{}{}{}{\&TDDFT}
-  \desc{Reorder the canonical Kohn--Sham orbitals prior to a TDDFT calculation.
-       The number of states to be reordered is read from the next line.
-       On the following line the final rank of each states has to be given.
-       The first number given corresponds to the HOMO, the next to the HOMO - 1
-       and so on. All states down to the last one changed have to be specified,
-       no holes are allowed.
-       This keyword can be used together with the {\sl SUBSPACE} option in
-       a \refkeyword{TAMM-DANCOFF} calculation to select arbitrary states.
-       Default is to use the ordering of states according to the Kohn--Sham
-       eigenvalues.}
-
-\keyword{REPLICA NUMBER}{}{}{}{\&PATH}
-  \desc{Number of replicas along the string.}
-
-\keyword{RESCALE OLD VELOCITIES}{}{}{}{\&CPMD}
-  \desc{Rescale {\bf ionic} velocities after \refkeyword{RESTART} to the 
-    temperature specified by either \refkeyword{TEMPERATURE}, 
-    \refkeyword{TEMPCONTROL} {\bf IONS}, or \refkeyword{NOSE} {\bf IONS}.
-    Useful if the type of ionic thermostatting is changed,
-    (do not use RESTART NOSEP in this case). \\
-    Note only for path integral runs: the scaling is only applied
-    to the first (centroid) replica.}
-
-\keyword{RESTART}{}{}{[{\it OPTIONS}]}{\&CPMD}
-  \desc{This keyword controls what data is read (at the beginning)
-      from the file RESTART.x.\\
-      {\bf Warning:} You can only read data that has been previously
-      written into the RESTART-file.\\
-      A list of different {\it OPTIONS}\ can be specified.
-      List of valid options:}
-%%%%%%%%%%%%%%%%%%%
-% special input
-%%%%%%%%%%%%%%%%%%%
-      \begin{description}
-         \item[WAVEFUNCTION]
-               Read old {\bf wavefunction} from restart file.
-         \item[OCCUPATION]
-               Read old {\bf occupation numbers} (useful for free energy
-               functional.
-         \item[COORDINATES]
-               Read old {\bf coordinates} from restart file.
-         \item[VELOCITIES]
-               Read old {\bf ionic, wavefunction and (cell) velocities}
-               from restart file.
-         \item[CELL]
-               Read old {\bf cell parameters} from restart file.
-         \item[GEOFILE]
-               Read old {\bf ionic positions and velocities} from
-               file {\bf GEOMETRY}. This file is updated
-               every time step. It has higher priority than
-               the COORDINATES option.
-         \item[ACCUMULATORS]
-               Read old {\bf accumulator values}, for example the time step number, from restart file.
-         \item[HESSIAN]
-               Read old {\bf approximate Hessian} from file {\em HESSIAN}.
-         \item[NOSEE]
-               Restart {\bf Nos\'e thermostats} for {\bf electrons} with
-               values stored on restart file.
-         \item[NOSEP]
-               Restart {\bf Nos\'e thermostats} for {\bf ions} with
-               values stored on \\ restart file.
-         \item[NOSEC]
-               Restart {\bf Nos\'e thermostats} for {\bf cell}
-               parameters with values stored on restart file.
-         \item[LATEST]
-               Restart from the {\bf latest restart} file as indicated
-               in file {\em LATEST}.
-         \item[PHESS]
-               Read partial Hessian (Hessian of the reaction core) for
-               {\bf transition state search} or {\bf vibrational analysis}
-               from restart file.
-               Useful with the keywords \refkeyword{PRFO} or
-               \refkeyword{HESSIAN} [DISCO,SCHLEGEL,UNIT] PARTIAL.
-         \item[LSSTAT]
-               Read all {\bf status information} of the {\bf linear scaling
-               optimizers} (L-BFGS and P-RFO) including L-BFGS history but
-               excluding partial Hessian for P-RFO from restart file.
-               The {\bf partial Hessian} is read separately using
-               {\bf RESTART PHESS}.
-               Useful with the keywords \refkeyword{LBFGS} and/or \refkeyword{PRFO}.
-         \item[ADPTTL]
-               Read {\bf wavefunction convergence criteria} at the current point
-               of geometry optimization from restart file.
-               Useful with the keywords \refkeyword{CONVERGENCE} [ADAPT, ENERGY, CALFOR].
-         \item[VIBANALYSIS]
-               Use the information on finite differences
-               stored in the file {\em FINDIF}. This
-               option requires a valid restart file for
-               the wavefunctions, even when wavefunctions
-               and coordinates are recalculated or read
-               from the input file.
-         \item[POTENTIAL]
-               Read an old potential from the restart file.
-               This applies to restarts
-               for Kohn-Sham energy calculations.
-         \item[KPOINTS]
-               Restart with k points.
-         \item[DENSITY]
-              Restart with electronic density.
-         \item[GLE]
-              Restart the extended variables of the GLE dynamics
-         \item[PRNG]
-              Restart the internal state of the Marsaglia random number generator
-         \item[CONSTRAINTS]
-              Restart with old values for constraints. This option
-              is mainly for restraints with GROWTH option.
-         \item[EXTRAP]
-              Restart from a previously saved wavefunction history.
-              See \refkeyword{EXTRAPOLATE WFN} for details.
-         \item[CVDFT]
-              Read CDFT multiplier $V$ from \verb|CDFT_RESTART|, for HDA run read 
-              $V$ and wavefunction of the appropriate state.
-         \item[ALL]
-              Restart with all fields of RESTART file
-      \end{description}
-%%%%%%%%%%%%%%%%%%%%%%%
-% end of special input
-%%%%%%%%%%%%%%%%%%%%%%%
-
-\keyword{RESTFILE}{}{}{}{\&CPMD}
-  \desc{The number of distinct \refkeyword{RESTART} files generated
-    during CPMD runs is read from the next line.\\
-    The restart files are written in turn.
-    {\bf Default is 1}. If you specify e.g.~3, then the files
-    RESTART.1, RESTART.2, RESTART.3 are used in rotation.}
-
-\keyword{RESTFILE}{}{}{}{\&PTDDFT}
-   \desc{Defines a restart code for the restart of the Ehrenfest dynamics
-         (\refkeyword{MOLECULAR DYNAMICS} EH) and the propagation spectra 
-         (\refkeyword{PROPAGATION SPECTRA}). The restart option is read from the 
-         next line: 0(=default) restart from the (complex)wavefunctions in the file
-         wavefunctions. This option is used in case of a continuation run; 
-         1. restart from the the orbital files WAVEFUNCTION.n, where
-         $n$ is the index of the KS orbital and runs from $1$ to the number of s
-         tates (This states a prepare in a previuos run using the KOHN-SHAM ENERGIES
-         principal keyward), 2; restart from the orbitals stored in RESTART (obtained
-         from a optimization run with tight convergence (at least 1.D-7)).}
-
-\keyword{REVERSE VELOCITIES}{}{}{}{\&CPMD}
-  \desc{Reverse the ionic and electronic (if applicable) velocities
-      after the initial setup of an MD run. This way one can, e.g., 
-      go ``backwards'' from a given \refkeyword{RESTART} to improve
-      sampling of a given MD ``path''. }
-
-\keyword{RFO ORDER=nsorder}{}{}{}{\&CPMD}
-  \desc{Rational function approximation combined with
-      a quasi-Newton me\-thod (using BFGS) for {\bf optimization} of the
-      {\bf ionic positions} is used~\cite{Banerjee85}.
-      A saddle point of order nsorder is searched for.}
-
-\keyword{RHOOUT}{}{[BANDS,SAMPLE=nrhoout]}{}{\&CPMD}
-  \desc{{\bf Store} the {\bf density} at the end of the run
-      on file {\em DENSITY}. \\
-      If the keyword BANDS is defined then on
-      the following lines the number of bands (or orbitals) to be 
-      plotted and their index (starting from 1) have to be given. 
-      If the position specification is a negative number, then the 
-      wavefunction instead of the density is written. Each band is 
-      stored on its own file {\em DENSITY.num}. For spin polarized 
-      calculations besides the total density also the spin density 
-      is stored on the file {\em SPINDEN}. The following example will
-      request output of the orbitals or bands number 5, 7, and 8 as
-      wavefunctions:}
-\begin{verbatim}
-            RHOOUT BANDS
-              3 
-              -5 -7 -8
-
-\end{verbatim}
-    \desc{
-      With the optional keyword {\bf SAMPLE} the requested file(s) will 
-      be written every {\em nrhoout} steps during an MD trajectory. 
-      The corresponding time step number will be appended to the filename.
-}
-
-\keyword{ROKS}{}{\{SINGLET, TRIPLET\},\{DELOCALIZED, LOCALIZED, GOEDECKER\}}{}{\&CPMD}
-  \desc{Calculates the first excited state using Restricted Open-shell Kohn-Sham 
-      theory~\cite{Frank98}. By default, the singlet state is calculated using the 
-      delocalized variant of the modified Goedecker-Umrigar scheme, which is supposed 
-      to work in most cases. That is, for doing a ROKS simulation, it is usually 
-      sufficient to just include this keyword in the CPMD section (instead of using 
-      the \refspekeyword{LSE}{LOW SPIN EXCITATION} input). 
-      See \ref{hints:roks} for further information.}
-
-\keyword{ROTATION PARAMETER}{}{}{}{\&TDDFT}
-  \desc{The parameters for the orbital rotations in an optimized
-       subspace calculation (see \refkeyword{TAMM-DANCOFF})
-       are read from the next line. The total number of iterations
-       (default 50), the convergence criteria (default $10^{-6}$) and
-       the step size (default 0.5) have to be given.}
-
-\spekeyword{RUNGE\_KUTTA}{}{}{}{\&CPMD}{RUNGE-KUTTA}
-  \desc{Defines the integration schemes used in the Ehrenfest \refkeyword{MOLECULAR DYNAMICS}.
-        Always used this option.}
-
-\keyword{SCALED MASSES}{}{[OFF]}{}{\&CPMD}
-  \desc{Switches the usage of g-vector dependent masses on/off. \\
-      The number of shells included in the analytic integration
-      is controlled with the keyword {\bf HAMILTONIAN CUTOFF}.\\
-      By {\bf default} this option is switched {\bf off}.}
-
-\keyword{SCALE}{}{[CARTESIAN]}{[S=sascale] [SX=sxscale] [SY=syscale] [SZ=szscale]}{\&SYSTEM}
-  \desc{{\bf Scale atomic coordinates} of the system with the
-      lattice constants (see {\bf CELL}).
-      You can indicate an additional scale for each axis with the options
-      {\bf SX}, {\bf SY} and {\bf SZ}.
-      For instance, if you indicate SX=sxscale,
-      you give your x-coordinates
-      between $0.$ and sxscale (by default $1.$).
-      This is useful when you use many primitive cells.
-      With the keyword {\bf CARTESIAN}, you specify that the given
-      coordinates are in Cartesian basis, otherwise the default with
-      the {\bf SCALE} option is in direct lattice basis.
-      In all cases, the coordinates are multiplied by the lattice
-      constants. If this keyword is present an output file
-      GEOMETRY.scale is written. This file contains the lattice vectors
-      in \AA and atomic units together with the atomic coordinates in
-      the direct lattice basis.}
-
-\keyword{SHIFT POTENTIAL}{}{}{}{\&CPMD}
-  \desc{After this keyword, useful in hamiltonian diagonalization, the 
-      shift value $V_{\rm shift}$ must be provided in the next line.
-      This option is used in the Davidson diagonalization 
-      subroutine and shifts rigidly the total electronic potential as 
-      $V_{\rm pot}({\bf r}) \to V_{\rm pot}({\bf r})+V_{\rm shift}$
-      then it is subtracted again at the end of the main loop, restoring
-      back the original $V_{\rm pot}({\bf r})$ that remains basically
-      unaffected once that the calculation is completed.}
-
-\keyword{SLATER}{}{[NO]}{}{\&DFT}
-  \desc{The $\alpha$ value for the Slater exchange
-      functional~\cite{Slater51} is read from the next line.
-      With NO the exchange functional is switched off.\\
-      Default is a value of 2/3.\\
-      This option together with no correlation functional, allows for
-      $X\alpha$ theory.}
-
-\keyword{SMOOTH}{}{}{}{\&DFT}
-  \desc{A smoothening function is applied to the density~\cite{Laasonen93}.\\
-      The function is of the Fermi type.
-      \[  f(G) = \frac{1}{%
-    \displaystyle{1 + e^{\frac{\scriptstyle{G - G_{\scriptstyle cut}}}
-                              {\scriptstyle\Delta}}}} \]
-      G is the wavevector, $G_{cut} = \alpha\,G_{max}$ and
-      $\Delta = \beta\,G_{max}$. Values for $\alpha$ and $\beta$
-      have to be given on the next line.}
-
-\keyword{SPLINE}{}{[POINTS, QFUNCTION, INIT, RANGE]}{}{\&CPMD}
-  \desc{This option controls the generation of the pseudopotential
-      functions in g-space. \\
-      All pseudopotential functions are first initialized on a evenly
-      spaced grid in g-space and then calculated at the needed
-      positions with a spline interpolation.
-      The number of spline points is read from the next
-      line when {\bf POINTS} is specified. \\
-      ( The {\bf default} number is {\bf 5000}.)
-      For calculations with the small cutoffs typically used together with
-      Vanderbilt PP a much smaller value, like 1500 or 2000, is sufficient. \\
-      In addition it is possible to keep the Q-functions of
-      the Vanderbilt pseudopotentials on the spline grid during
-      the whole calculation and do the interpolation whenever needed.
-      This option may be useful to save
-      time during the initialization phase and memory in the case of
-      Vanderbilt pseudopotentials when the number of
-      shells is not much smaller
-      than the total number of plane waves, i.e. for all cell
-      symmetries except simple cubic and fcc.}
-
-\keyword{SSIC}{}{}{}{\&CPMD}
-  \desc{Apply an {\it ad hoc} Self Interaction Correction (SIC) to the 
-        ordinary DFT calculation expressed in terms of total energy as
-        \begin{equation*}
-        E^{\rm tot}-a\cdot  E_H[m]- b\cdot E_{xc}[m, 0]
-        \end{equation*}
-        where $m({\bf x}) = \rho_\alpha({\bf x})-\rho_\beta({\bf x})$.
-        The value of $a$ must be supplied in the next line, while
-        in the present implementation $b$ is not required, being
-        the optimal values $a=0.2$ and $b=0.0$ according to
-        Ref.~\cite{SSIC}. These are assumed as default values
-        although it is not always the case \cite{dna_sic}.
-        Note that if you select negative $\{a, b \}$ parameters,
-        the signs in the equation above will be reversed.
-        The Hartree electronic potential is changed accordingly
-        as $V_H[\rho] \to V_H[\rho] \pm a\cdot V_{\rm SIC}[m]$,
-        being
-        \begin{equation*}
-        V_{\rm SIC}[m]=\frac{\delta E_H[m]}{\delta m({\bf x})}
-        \end{equation*}
-        where the sign is $+$ for $\alpha$ spin and $-$ for
-        $\beta$ spin components, respectively.
-        Be aware that this keyword should be used together with
-        $LSD$ (set by default).}
-
-\keyword{STAGING}{}{}{}{\&PIMD}
-  \desc{Use the staging representation~\cite{Tuckerman96}
-        of the path integral propagator. It is possible to impose a
-        mass disparity between centroid and non--centroid coordinates by
-        dividing the fictitous masses of only the {\em non}--centroid
-        $s=2, \dots ,P$ replicas by
-        the adiabaticity control factor FACSTAGE. This dimensionless
-        factor {\em must always} be specified in the following line.
-        Note: the eigen--{\em frequencies} of the $s>1$ replicas are changed
-        by only $\sqrt{\mbox{FACSTAGE}}$, see Ref.~\cite{Martyna96}(b).
-        Note: using FACSTAGE~$\not= 1.0$ essentially makes no sense
-        within the STAGING scheme, but see its use within
-        CENTROID DYNAMICS and NORMAL MODES.}
-
-\keyword{STATES}{}{}{}{\&SYSTEM}
-  \desc{The number of states used in the calculation is read
-      from the next line. \\
-      This keyword has to preceed the keyword
-      {\bf OCCUPATION}.}
-
-\keyword{NSUP}{}{}{}{\&SYSTEM}
-  \desc{The number of states of the same spin as the first state is read
-      from the next line. \\
-      This keyword makes only sense in spin-polarized calculations (keyword
-      \refkeyword{LSD}).}
-
-\spekeyword{STATES}{\{MIXED,SINGLET,TRIPLET\}}{}{}{\&TDDFT}{STATES TDDFT}
-  \desc{The number of states to be calculated is read from the next line.
-       The type of state {\sl SINGLET, TRIPLET} can be given for
-       non-spinpolarized calculations. Default is to calculate
-       one singlet state for LDA and 1 mixed state for LSD calculations.}
-
-\keyword{STEEPEST DESCENT}{}{[ELECTRONS, IONS, CELL],[NOPRECONDITION\-ING],[LINE]}{}{\&CPMD}
-  \desc{NOPRECONDITIONING works only for electrons and LINE only for ions.
-      Use the method of {\bf steepest descent} for the {\bf optimization}
-      of wavefunction and/or atomic positions and/or cell.\\
-      If both options are specified in a geometry optimization
-      run, a simultaneous optimization is performed. \\
-      Preconditioning of electron masses (scaled masses)
-      is used by default. The preconditioning is controlled by the
-      keyword {\bf HAMILTONIAN CUTOFF}.
-      Optionally preconditioning can be disabled.\\
-      For ions optimization, the steplength is controlled by the
-      keywords {\bf TIMESTEP} and {\bf EMASS}.}
-
-\keyword{STEPLENGTH}{}{}{}{\&LINRES}
- \desc{
- Step length for steepest descent and preconditioned conjugate gradient
- methods used in linear response calculations. Default is 0.1.
- }
-
-\keyword{STORE}{ \{OFF\}} {[WAVEFUNCTIONS, DENSITY, POTENTIAL]}{}{\&CPMD}
-  \desc{The \refkeyword{RESTART} file is {\bf updated} every {\sl ISTORE} steps.
-      {\sl ISTORE} is read from the next line.
-      {\bf Default} is at the {\bf end of the run}.\\
-      Moreover, in the same line of the number ISTORE, you can specify
-      the number of self-consistent iterations (with SC=number) between
-      two updates of restart file.
-      If OFF is specified , do not store wavefunctions and/or density
-      ({\sl ISTORE} is not necessary).}
-
-\spekeyword{STRESS TENSOR}{}{}{}{\&CPMD}{STRESS TENSOR CPMD}
-  \desc{Calculate the {\bf stress tensor} every {\sl NSTEP}
-      iteration in a constant volume MD.\\
-      {\sl NSTEP} is read from the next line.
-      Works also for wavefunction or geometry optimisation.
-      In this case NSTEP is meaningless.}
-
-\spekeyword{STRESS TENSOR}{}{}{}{\&SYSTEM}{STRESS TENSOR SYSTEM}
-  \desc{In extension to the keyword PRESSURE the complete
-      {\bf stress tensor} in kbar can be specified.
-      The {\bf stress} on the system is read in the form:
-      \begin{center}
-       $t_{11}\ t_{12}\ t_{13}$\\
-       $t_{21}\ t_{22}\ t_{23}$\\
-       $t_{31}\ t_{32}\ t_{33}$\\
-       \end{center}
-       }
-
-\keyword{STRUCTURE}{}{[BONDS, ANGLES, DIHEDRALS, SELECT]}{}{\&CPMD}
-  \desc{Print {\bf structure information} at the end of the run. \\
-      Bonds, angles and dihedral angles can be printed.
-      Dihedral angles are defined between
-      0 and 180 degrees. This might change in the future.\\
-      If the option {\bf SELECT} is used the output is restricted
-      to a set of atoms. The number of atoms and a list of the selected
-      atoms has to be given on the next lines.}
-
-\keyword{SUBTRACT}{}{[COMVEL, ROTVEL]}{}{\&CPMD}
-  \desc{If COMVEL is selected, the total momentum of the system is
-    removed, if ROTVEL is selected the global angular momentum of the
-    system is removed. Both options can be used separately and
-    simultaneously. The subtraction is done each {\bf ncomv} or
-    {\bf nrotv} steps, where the value is read in the next line.\\
-
-    If this key is activated but no number provided,
-    the {\bf default} is $10000$ steps. \\
-
-    {\bf Note}: The use of these keywords is strongly recommended
-    for long runs (e.g. $t>10$ ps) and/or low density systems (e.g.
-    isolated molecules, gas phase \& Co.). Otherwise the whole system
-    will start to translate and/or rotate toward a (random) direction
-    with increasing speed and spinning. The ``relative'' translation
-    within the system slows down correspondingly and thus the system
-    effectively cools down. As a consequence dynamic properties, like
-    self-diffusion coefficients will be wrong.\\
-
-    This option should not be used for systems, where some atoms are
-    kept at fixed positions, e.g. slab configurations. Here the center
-    of mass may (or should) move. Due to the interactions with the fixed
-    atoms, a drift of the whole system should be much reduced,
-    anyways.\\
-
-    {\bf Note}: since the subtracted kinetic energy is put back into
-    the system by simple rescaling of the ionic velocities, these
-    options is not fully compatible with \refkeyword{NOSE} thermostats.
-}
-
-\keyword{SURFACE HOPPING}{}{}{}{\&CPMD}
-  \desc{Nonadiabatic dynamics involving the ground state and a \refkeyword{ROKS}
-      excited state\cite{surfhop}.
-      Do NOT use this keyword together with \refkeyword{T-SHTDDFT}, which invokes
-      the surface hopping MD scheme based on TDDFT~\cite{TDDFT-SH} (see \refkeyword{T-SHTDDFT}).
-      }
-
-\keyword{SURFACE}{}{[XY, YZ, ZX]}{}{\&SYSTEM}
-  \desc{By default, if nothing is specified, assume {\bf periodic boundary} condition in
-      {\bf $x$- and $y$-direction}. With the extra keywords {\sl XY}, {\sl YZ} or 
-       {\sl ZX}, the periodicity of the systems is assumed to be along $(x,y)$, $(y,z)$
-        or $(z,x)$, respectively.\\
-%        You also need to set the 'cluster option' (i.e. \refkeyword{SYMMETRY} 0).
-      }
-
-\keyword{SYMMETRIZE COORDINATES}{}{}{}{\&SYSTEM}
-  \desc{{\bf Input coordinates} are {\bf symmetrized} according
-      to the {\bf point group}
-      specified. \\
-      This only makes sense when the structure already
-      is close to the symmetric one.}
-
-\keyword{SYMMETRY}{}{}{}{\&SYSTEM}
-  \desc{The {\bf supercell symmetry type} is read from the next line.\\
-      You can put a number or a keyword.
-      {\small
-      \begin{description}
-      \renewcommand{\makelabel}[1]{\hbox to 2em {\hfill#1}}
-               \item[0]  {\bf ISOLATED}
-                         system in a cubic/orthorhombic
-                         box~\cite{Hockney70,Landman}
-                  with ISOLATED MOLECULE option activated.
-                  By default the Hockney method (see \refkeyword{POISSON SOLVER}) is used for
-                  solving the Poisson equations.
-                  You can use this option in combination with \refkeyword{POLYMER} or
-                  \refkeyword{SURFACE} for systems that are periodic in only
-                  1 or 2 dimensions. The default Poisson solver is MORTENSEN in
-                  this case. See the Hints and Tricks section
-                  for some additional requirements when calculating
-                  isolated system.
-               \item[1]  Simple {\bf CUBIC}
-               \item[2]  {\bf FACE CENTERED CUBIC}
-                                         ({\bf FCC})
-               \item[3]  {\bf BODY CENTERED CUBIC}
-                         ({\bf BCC})
-               \item[4]  {\bf HEXAGONAL}
-               \item[5]  {\bf TRIGONAL} or {\bf RHOMBOHEDRAL}
-               \item[6]  {\bf TETRAGONAL}
-               \item[7]  {\bf BODY CENTRED TETRAGONAL}
-                         ({\bf BCT})
-               \item[8]  {\bf ORTHORHOMBIC}
-               \item[12] {\bf MONOCLINIC}
-               \item[14] {\bf TRICLINIC}
-       \end{description}
-       }
-       Warning: This keyword should not be used with the keyword
-       {\bf CELL VECTORS}.}
-
-\keyword{T-SHTDDFT}{}{}{}{\&TDDFT}
-  \desc{Non adiabatic (nonadiabatic, non-adiabatic) Tully's trajectory surface hopping dynamics using TDDFT energies and forces.
-        To be used together with the keywords \refkeyword{MOLECULAR DYNAMICS} BO
-        and \refkeyword{TDDFT} in the \&CPMD section (see section~\ref{sec:TDDFTdynamics}).
-        Do NOT use the keyword \refkeyword{T-SHTDDFT} together with the keyword
-        \refkeyword{SURFACE HOPPING} in \&CPMD, which invokes the SH scheme based on \refkeyword{ROKS}~\cite{surfhop}
-        (see \refkeyword{SURFACE HOPPING}).\\
-        For a given initial configuration, the run produces a trajectory
-        that undergoes surface hopping according to the algorithm
-        by Tully adapted to TDDFT~\cite{TDDFT-SH}.
-        The forces on the excited state surfaces are computed using TDDFT as
-        for the adiabatic case.
-        A sufficiently large number of excited states must be declared using the
-        keyword \refkeyword{STATES} in the section \&TDDFT. The initial running surface is
-        specified with the keyword \refkeyword{FORCE STATE} in the section \&TDDFT.
-        This can change during the dynamics when a surface hop occurs. After a
-        restart the value of the running state is taken from the file SH\_STATE.dat (see below).
-        The run produces a series of additional files: SH\_COEFA.dat (absolute value of the state
-        amplitudes), SH\_COEFC.dat (their complex values), SH\_COUPL.dat
-        (the coupling strength per state), SH\_ENERG.dat (the energy of the different
-         states: setp number, ground state energy, first excited state energy, $\dots$, highest
-         excited state energy, energy of the running state), SH\_PROBS.dat (transition
-         probabilities between running state and all other states), SH\_STATE.dat
-         (the running state at each step). All these files (in addition to SH\_WAVEFUNCTIONS and
-        SH\_LRWAVEFUNCTIONS) are needed to restart the SH dynamics.
-        Note that each run produces a single SH trajectory. Several subsequent runs starting from
-        different initial coordinates and velocities are required to collect statistics.
-       }
-
-\keyword{TAMM-DANCOFF}{}{[SUBSPACE,OPTIMIZE]}{}{\&TDDFT}
-  \desc{Use the Tamm--Dancoff approximation. This is the default for
-       TDDFT calculations.
-       Optionally, only a {\sl SUBSPACE}
-       of the occupied orbitals can be included in the calculation.
-       The subspace can be optimized at each step (not recommended).
-       Default is to use all states.}
-
-%\keyword{TASKGROUPS}{}{[MINIMAL,MAXIMAL,CARTESIAN]}{}{\&CPMD}
-%  \desc{The number of taskgroups is
-%      read from the next line. The number of taskgroups has to be a
-%      divisor of the number of nodes in a parallel run;
-%      Cartesian Taskgroups use cartesian communicators.}
-
-\spekeyword{TD\_METHOD\_A}{}{[{\em functionals}]}{}{\&TDDFT}{TD METHOD A}
-  \desc{Use a different potential for the eigenvalue differnce part
-        of the response equations than was used to generate the ground state
-        orbitals. The potential generating functional has to be given after the
-        keyword. For possible functionals see the code. Most likely you want
-        to use the {\bf SAOP} functional. \\
-        This functional does not affect the choice of functional used in the
-        TDDFT kernel. The kernel functional is set in the \&DFT section.
-        It is either the standard functional or the functional defined by
-        the keyword \refkeyword{LR KERNEL}.}
-
-\keyword{TDDFT}{}{}{}{\&CPMD}
-  \desc{Calculate the energy according to TDDFT. This keyword can be used
-       together with \refkeyword{OPTIMIZE GEOMETRY} or \refkeyword{MOLECULAR DYNAMICS} BO.
-       Use the \&TDDFT section to set parameters for the calculation.
-       This keyword requires \refkeyword{RESTART} LINRES.}
-
-\spekeyword{TD\_POTENTIAL}{}{}{}{\&PTDDFT}{TD-POTENTIAL}
-  \desc{Defines a time dependent external potential to be used in Ehrenfest dynamics
-        (\refkeyword{MOLECULAR DYNAMICS} EH). Can be used with the keyword \refkeyword{PIPULSE}.
-        The frequency of the external field is read from the next line (in atomic units).
-        For more information see subroutine gaugepot\_laser in tdi\_util.F .}
-
-\keyword{TEMPCONTROL}{}{[IONS, ELECTRONS, CELL]}{}{\&CPMD}
-  \desc{The {\bf temperature} of the {\bf ions} in Kelvin
-      or the {\bf fictitious kinetic energy} of the {\bf electrons}
-      in atomic units
-      or the {\bf kinetic energy} of the {\bf cell} in atomic units (?)
-      is controlled by scaling. \\
-      The {\bf target} temperature and the {\bf tolerance} for the
-      ions or the target kinetic energy and the tolerance for the
-      electrons or the cell are read from the next line.
-
-      As a gentler alternative you may want to try 
-      the \refkeyword{BERENDSEN} scheme instead.}
-
-\keyword{TEMPERATURE ELECTRON}{}{}{}{\&CPMD}
-  \desc{The {\bf electronic temperature} is read from the next line.\\
-      {\bf Default} is $1000$K.}
-
-\keyword{TEMPERATURE}{}{[RAMP]}{}{\&CPMD}
-  \desc{The {\bf initial temperature} in Kelvin of the {\bf system} is read from the next line. 
-        With the additional keyword {\bf RAMP} the temperature can be linearly ramped to a target 
-	value and two more numbers are read, the ramping target temperature in Kelvin and the
-        ramping speed in Kelvin per atomic time unit (to get the change per timestep you have to multiply it
-        with the value of \refkeyword{TIMESTEP}). Note that this ramping affects the target temperatures for
-        \refkeyword{TEMPCONTROL}, \refkeyword{BERENDSEN} and the global \refkeyword{NOSE} thermostats.}
-
-\keyword{TESR}{}{}{}{\&SYSTEM}
-  \desc{The number of additional supercells included in the real space sum for
-        the Ewald term is read from the next line. Default is 0, for small unit
-        cells larger values (up to 8) have to be used.}
-
-\keyword{THAUTO}{}{}{}{\&LINRES}
-  \desc{The two values read from the next line control the switch to different
-        optimizers for an automatic selection of optimizers during a linear response
-        calculation. This also applies to the Z-vector optimization for
-        TDDFT forces. The first value is the threshold for switching from
-        conjugate gradients to DIIS (with compressed storage and averged preconditioner,
-        subspace size defined with \refkeyword{ODIIS}).
-        The second value is the threshold for switching to DIIS with
-        full storage and state dependent preconditioner. See also
-        \refkeyword{ZDIIS} for specification of the subspace size.}
-
-\keyword{TIGHTPREC}{}{}{}{\&RESP}
-  \desc{
-   Uses a harder preconditioner. For experts: The
-   Hamiltonian is approximated by the kinetic energy,
-   the G-diagonal Coulomb potential and the KS-energies.
-   The number obtained this way must not be close to zero.
-   This is achieved by smoothing it with
-   This is achieved by smoothing it with
-     $$x \to f(x) = \sqrt{x^2 + \epsilon^2} \; \; [{\rm default}] $$
-   or
-     $$x \to f(x) = (x^2 + \epsilon ^2)/x \; \; [{\rm this \; option}] $$
-   The HARD option conserves the sign of the approximate
-   Hamiltonian whereas the default formula does never
-   diverge.
-   }
-
-\keyword{TIMESTEP ELECTRONS}{}{}{}{\&CPMD}
-  \desc{The time step for electron dynamics in atomic units is read from the next line. This is can
-   be used to tweak the convergence behavior of the wavefunction optimization in Born-Oppenheimer
-   dynamics, where the default time step may be too large. see, e.g. \refkeyword{PCG}}
-
-\keyword{TIMESTEP IONS}{}{}{}{\&CPMD}
-  \desc{The time step in atomic units is read from the next line.}
-
-\keyword{TIMESTEP}{}{}{}{\&CPMD}
-  \desc{The time step in atomic units is read from the next line. \\
-      {\bf Default} is a time step of {\bf 5 a.u.}
-      ($1\, a.u. = 0.0241888428$ fs).}
-
-\keyword{TRACE}{}{[ALL,MASTER]}{}{\&CPMD}
-\desc{ Activate the tracing of the procedures. {\sl ALL} specifies that all the mpi tasks are traced.
-  {\sl ALL} specifies that only the master is traced.
-}
-
-\spekeyword{TRACE\_PROCEDURE}{}{}{}{\&CPMD}{TRACE PROCEDURE}
-\desc{Select a procedure to be traced. The procedure is read from the next line.}
-
-\spekeyword{TRACE\_MAX\_DEPTH}{}{}{}{\&CPMD}{TRACE MAX DEPTH}
-\desc{Set the maximal depth for tracing. The depth is read from the next line.}
-
-\spekeyword{TRACE\_MAX\_CALLS}{}{}{}{\&CPMD}{TRACE MAX CALLS}
-\desc{Set the maximal number of calls for tracing. The number is read from the next line.}
-
-\keyword{TRAJECTORY}{}{[OFF, XYZ, DCD, SAMPLE, BINARY, RANGE, FORCES]}{}{\&CPMD}
-  \desc{Store the atomic positions, velocities and optionally forces
-      at every {\em NTRAJ} time step on file {\em TRAJECTORY}.
-      This is the {\bf default for MD runs}. With the additional keyword
-      XYZ the trajectory is also writthen in xyz-format on the file {\em
-      TRAJEC.xyz}, similarly with the additional keyword DCD a trajectory
-      in dcd-format (binary and single precision, as used by CHARMM, X-PLOR
-      and other programs) is written on the file {\rm TRAJEC.dcd}.
-      If the keyword SAMPLE is given
-      {\em NTRAJ} is read from the next line, otherwise the default value
-      for {\em NTRAJ} is $1$. A negative value of {\em NTRAJ} will
-      disable output of the {\em TRAJECTORY} file, but e.g. {TRAJEC.xyz}
-      will still be written every {\em -NTRAJ} steps. A value of 0 for
-      {\em NTRAJ} will disable writing of the trajectory files alltogether.
-
-      The TRAJECTORY file is written in binary format
-      if the keyword BINARY is present. If FORCES is specified also the forces
-      are written together with the positions and velocities into the file
-      FTRAJECTORY. It is possible to store the data of a subset of atoms by
-      specifying the suboption RANGE, the smallest and largest index of atoms
-      is read from the next line.
-      If both, SAMPLE and RANGE are given, the RANGE parameters have to
-      come before the SAMPLE parameter.}
-
-\keyword{TRANSITION MOMENT}{}{}{}{\&PROP}
-  \desc{Calculate the dipole transition matrix element.\\
-%
-    On the following lines, the number of transitions and the involved orbitals
-    are given.
-      Example: \\
-         {\tt
-         \begin{tabular}{ccc}
-         \multicolumn{2}{l}{\bf TRANSITION MOMENT}\\
-         2 &  \\
-         6 & 7\\
-         6 & 8\\
-         \end{tabular}
-         }
-%
-    This calculates the dipole transition matrix elements between KS states 6
-    and 7, and between 6 and 8.}
-
-\keyword{TROTTER DIMENSION}{}{}{}{\&PIMD}
-  \desc{The Trotter number $P$, i.e. the number of ``replicas'',
-        ``beads'', or ``imaginary time slices'' which are used in order
-        to discretize the Feynman--Kac path integral of the nuclei,
-        is read from the next line. If NORMAL MODES or STAGING is
-        not activated
-        the path integral is discretized in cartesian coordinates
-        in real space (so--called ``primitive coordinates'').
-        A discussion about controlling discretization errors
-        and on estimating $P$ in advance is given in
-        Ref.~\cite{knoll-marx-00}.}
-
-\keyword{TROTTER FACTORIZATION OFF}{}{}{}{\&CPMD}
-  \desc{Do not use Trotter factorization to calculate free energy
-      functional.\\
-      Remark: Place this keywords only after FREE ENERGY FUNCTIO\-NAL;
-      before it has no effect.
-      Note: this keyword has {\em nothing} to do with path integral
-      MD as activated by the keyword PATH INTEGRAL and as specified in the
-      section \&PIMD ... \&END.}
-
-\keyword{TROTTER FACTOR}{}{}{}{\&CPMD}
-  \desc{Solve $e^{-H/k_BT}$ directly using {\bf Trotter approximation}\\
-      $\left( e^{-pH} \simeq  e^{-pK/2}e^{-pV}e^{-pK/2}\right)$.\\
-      The Trotter approximation is twice as fast.\\
-      The Trotter factor is read from the next line
-      (typically 0.001 is very accurate).}
-
-
-\spekeyword{USE\_IN\_STREAM}{}{}{}{\&CPMD}{USE IN STREAM}
- \desc{ Specify that the RESTART file shall be read in the stream mode.
-   This allows for parallel restarting (to be used with {\sl USE\_MPI\_IO}).
- }
-
-\spekeyword{USE\_OUT\_STREAM}{}{}{}{\&CPMD}{USE OUT STREAM}
- \desc{ Specify that the RESTART file shall be written in the stream mode.
-   This allows for parallel restarting (to be used with {\sl USE\_MPI\_IO}).
- }
-
-\spekeyword{USE\_MPI\_IO}{}{}{}{\&CPMD}{USE MPI IO}
- \desc{ Specify that MPI shall be used for parallel reading/writing of the RESTART file.
-   This shall be used with {\sl USE\_IN\_STREAM} and /or {\sl USE\_OUT\_STREAM}.
- }
-
-\keyword{VDW CORRECTION}{[ON,OFF]}{}{}{\&CPMD}
-
-\desc{An empirical van der Waals correction scheme is applied to
-  pairs of atom types specified with this keyword. This activates
-  reading the corresponding parameters from the \&VDW ... \& END 
-  in which you have to specify all the VDW parameters between the opening
-  and closing section keywords EMPIRICAL CORRECTION and END EMPIRICAL CORRECTION. 
-  Note that the two possible vdW options, EMPIRICAL CORRECTION  and
-  WANNIER CORRECTION are mutually exclusive.
-  See \refkeyword{VDW PARAMETERS} for more details.}
-
-
-\keyword{VDW PARAMETERS}{}{}{}{\&VDW}
-
-\desc{ Parameters for empirical van der Waals correction schemes are set
-  with the keyword. This requires the \refkeyword{VDW CORRECTION} keyword
-  to be set in the \&CPMD section.  For Grimme's {\bf DFT-D2} type (see below) 
-  an automatic assignment of the parameters can be requested by putting 
-  {\bf ALL DFT-D2} on the next line. Otherwise the number of pairs
-  {\itshape NVDW} is read from the next line and followed by {\itshape NVDW} 
-  lines of parameters: {\itshape TYPE}, $\alpha$, $\beta$, $C_6^{\alpha\beta}$,
-  $R_0^{\alpha\beta}$, and $d$ for each pair of atom types $\alpha$ and
-  $\beta$, where $\alpha$ and $\beta$ are the indexes of
-  pseudopotentials (and their associated groups of atoms) in the order
-  they are listed in the \&ATOMS section. For type {\bf DFT-D2} only $\alpha$
-  and $\beta$ are required. If the other parameters are ommited the internal
-  table of parameters is used.
-% Note:  References to two papers by R. LeSar have
-% been removed from this entry because Elstner's
-% damping function is quite different from LeSars,
-% Elstner does not reference LeSar's work,
-% and LeSar's damping function was adopted from
-% earlier work (ie., LeSar was not the first to
-% use such corrections.)  It does appear that
-% LeSar's function may be in the CPMD source code,
-% but it is commented out.
-
-  A presently implemented damped dispersion model, described by M.
-  Elstner {\itshape et al.}\cite{Elstner}, having the same form as that
-  constructed by Mooij {\itshape et al.}\cite{mooij:99}, is activated by
-  specifying {\bf C6} as {\itshape TYPE}.  This model is expressed as
-% Elstner's Damping function:
-\begin{equation}
-\label{elstner-damping-function} %\ref{elstner-damping-function}
-E_{vdW} = \sum_{ij}
-    \frac{C_6^{\alpha\beta}}{{R^{\alpha\beta}_{ij}}^6}
-\left(1 - \exp{
-\left[-d
-\left(\frac{R^{\alpha\beta}_{ij}}{R^{\alpha\beta}_0}
-\right)^7
-\right]}
-\right)^4.
-\end{equation}
-A table of parameters appropriate for this particular model, using the
-PBE and BLYP functionals, is available \cite{williams-vdw:06}.
-
-Alternatively Van der Waals correction according to Grimme can be used \cite{Grimme06}
-by selecting {\itshape TYPE} {\bf DFT-D2}. 
- \begin{equation}
-  E_{disp} = - s_6 \sum_{i=1}^{N_{at} -1} \sum_{j=i+1}^{N_{at}} 
-               \frac{C_6^{ij}}{R_{ij}^6} f_{dmp} (R_{ij})
- \end{equation}       
-The values of $C_6$ and $R_0$ are not specific that are used by this method are taken 
-from \cite{Grimme06} 
-and stored internally (see above for details). Namely, all elements from H ($Z=1$) to
-Rn ($Z=86$) are available, whereas elements beyond Rn give by default a zero contribution.
-Note that the parameter $s_6$ depends on the functional used and has to be provided consistently
-with the DFT one chosen for the calculation. The following line has to be added {S6GRIMME}
-and the type of functional is read from the next line. One of the following labels has to be provided:
-{BP86, BLYP, B3LYP, PBE, TPSS, REVPBE, PBE0}. Note that Grimme vdW does not support other functionals.
-}
-
-
-\keyword{VDW-CUTOFF}{}{}{}{\&VDW}
-   \desc{On the next line the short range cutoff of van der Waals correction
-    has to be specified. The default value is $10^{-2}$.}
-
-\keyword{VDW-CELL}{}{}{}{\&VDW}
-   \desc{The number of additional supercells to be included in the sum of
-    van der Waals correction.}
-
-\keyword{VDW WANNIER}{}{}{}{\&CPMD}
-\desc{A first-principle van der Waals correction scheme \cite{psil1,psil2}
-  is applied to selected groups of atoms on which maximally localized Wannier
-  functions (WF) and centers (WFC) have been previously computed.
-  The file WANNIER-CENTER generated upon WFC calculation must be present.
-  This activates the reading procedure of the corresponding parameters from
-  the \&VDW ... \&END section.}
-
-\keyword{WANNIER CORRECTION}{END WANNIER CORRECTION}{}{}{\&VDW}
-\desc{Between these opening and ending keywords, the partitioning of the system
- and the calculation procedure must be selected. Three implementatons are available
- for partitioning the system: 
- (1) choosing a {\it zlevel}, namely a z coordinate separating
-  the first fragment form the second (this is appropriate for cases where
-  there are only two fragments such as, for instance two graphene layers or
-  adsorption of molecules on surfaces); in this case the keyword FRAGMENT ZLEVEL
-  must be used. 
- (2) give reference ion and a cut-off radius around which WFCs  are supposed to 
-  belong to the given atom or fragment; in this case the keyword FRAGMENT RADIUS
-  must be used.
- (3) the system is subdivided into fragments automatically detected by using 
-  predefined covalent bond radii. in this case the keyword FRAGMENT BOND
-  must be used. This is also the default in case no specification is done.
- 
-  The syntax for the different options is:
-
-    VERSION \\
-     iswitchvdw (method 1 \cite{psil1} or 2 \cite{psil2}) \\
-    FRAGMENT ZLEVEL \\
-     zlevel (in a.u.) \\
-   FRAGMENT RADIUS \\
-     multifrag \\
-     i radius(i) \\
-     ... \\
-   FRAGMENT BOND \\
-     tollength  \\
-   DAMPING \\
-     a6 \\
-   RESTART WANNIER \\
-   ENERGY MONOMER \\
-     enmonomer \\
-   TOLERANCE WANNIER \\
-     tolwann  \\
-   TOLERANCE REFERENCE \\
-     tolref \\
-   CHANGE BONDS \\
-    nboadwf \\
-    i  j $\pm$ 1  \\
-   CELL \\
-    nxvdw nyvdw nzvdw \\
-   PRINT $[$INFO,FRAGMENT,C6,FORCES$]$
-
-  Note that the total number of WFCs in your system depends on the
-  spin description you use (1 for LSD, 2 for LDA).
-  The coefficient a6 is the smoothing parameter and the
-  reference total energy intended as a sum of all the total energies
-  of your fragments (e.g. the ETOT you get by a standard calculation
-  not including vdW corrections). For a6 the suggested parameter is
-  20.0 \cite{molphy}.
-  Note that the two possible vdW options, EMPIRICAL CORRECTION  and
-  WANNIER CORRECTION are mutually exclusive.}
-
-\keyword{VELOCITIES ... END VELOCITIES}{}{}{}{\&ATOMS}
-  \desc{Sets an {\bf initial velocity} for specified atoms.\\
-      The first line contains first the total number of specified atomic velocities
-      followed \textbf{on the same line} by the list of atomic numbers
-      for which the velocities will be read.
-      On each of the follwoing lines the x, y and z coordinates of the
-      velocities of an atom have to be specified. These values will
-      ignored in case of starting with \refkeyword{RESTART} VELOCITIES..
-
-      NOTE: these velocities are rescaled to produce the initial
-      temperature as specified by \refkeyword{TEMPERATURE}.
-      The default temperature, however, is 0K, so you \textbf{have}
-      to set the matching temperature or your initial velocities
-      will be useless.
-}
-
-\keyword{VGFACTOR}{}{}{}{\&CPMD}
-  \desc{For \refkeyword{CDFT} runs read the inverse of the gradient optimiser step size
-  ($1/dx$) from the next line. The standard value of \defaultvalue{10.0} should be fine
-  in most situations.}
-
-\keyword{VIBRATIONAL ANALYSIS}{}{[FD, LR, IN], [GAUSS, SAMPLE, ACLIMAX]}{}{\&CPMD}
-  \desc{Calculate harmonic frequencies by finite differences of first
-      derivatives {\bf (FD)} (see also keyword \refkeyword{FINITE DIFFERENCES}),
-      by {\bf linear response} to ionic
-      displacements {\bf (LR)} or from a {\bf pre-calculated} Hessian
-      {\bf (IN)}.
-      K-point sampling is currently possible using finite differences.
-      If the option GAUSS is specified, additional output is written
-      on the file {\em VIB1.log} which contains the modes in a style similar
-      to GAUSSIAN 98 output. This file can be read in and visualized
-      with programs like MOLDEN or MOLEKEL. The option SAMPLE reads an
-      integer from the next line. If this number is 2 an additional file
-      {\em VIB2.log} containing the lowest modes is written. The {\bf
-      default} value is 1.
-      If the option ACLIMAX is specified, additional output is written on
-      the file VIB.aclimax which contains the modes in a style readable by
-      aClimax (\htref{http://www.isis.rl.ac.uk/molecularspectroscopy/aclimax/}{http://www.isis.rl.ac.uk/molecularspectroscopy/aclimax/}).
-      If a section {\bf \&PROP} is present with the keyword
-      \refkeyword{DIPOLE MOMENT}[BERRY] or
-      \refkeyword{DIPOLE MOMENT}[RS],
-      the Born charge tensor is calculated on the fly.
-      See also the block \&LINRES ... \&END and the keywords
-      \refkeyword{RESTART} PHESS and \refkeyword{HESSIAN} \{DISCO,SCHLEGEL,UNIT\} PARTIAL.
-      }
-
-\keyword{VMIRROR}{}{}{}{\&CPMD}
-  \desc{For \refkeyword{CDFT} HDA runs initialise $V$ for the second state as the negative
-     final $V$ value of the first state. Useful in symmetric systems.}
-
-
-\keyword{WANNIER DOS}{}{}{}{\&CPMD}
-  \desc{Outputs the projected density of states of the Wannier orbitals 
-    (file WANNIER\_DOS) and the KS hamiltonian in the Wannier states 
-    representation (file WANNIER\_HAM). 
-
-    When running \refkeyword{MOLECULAR DYNAMICS} CP the files WANNIER\_DOS and 
-    WANNIER\_HAM solely written at the last step.}
-
-\keyword{WANNIER MOLECULAR}{}{}{}{\&CPMD}
-  \desc{Generates effective molecular orbitals from the Wannier representation. 
-    It first attributes Wannier orbitals to molecules and then diagonalizes by 
-    molecular blocks the KS Hamiltonian.
-
-    Does not work with \refkeyword{MOLECULAR DYNAMICS} CP.}
-
-\keyword{WANNIER NPROC}{}{}{}{\&CPMD}
-\desc{ Set the number of mpi tasks to be used for localization. 
-  Default is to use all the tasks avalable. The number of tasks is
-   read from the next line and shall be a
-   divisor of the number of tasks in a parallel run.
-}
-
-\keyword{WANNIER OPTIMIZATION}{\{SD,JACOBI,SVD\}}{}{}{\&CPMD}
-  \desc{Use steepest descent or Jacobi rotation method for the orbital
-      localization.\\
-      Default are Jacobi rotations.}
-
-\keyword{WANNIER PARAMETER}{}{}{}{\&CPMD}
-  \desc{{\sl W\_STEP, W\_EPS, W\_RAN, W\_MAXS} are read from the next line.
-      {\sl W\_STEP} is the step size of the steepest descent algorithm
-      used in the optimization procedure (default value 0.1).
-      {\sl W\_EPS} the convergence criteria for the gradient
-      (default value $1.e-7$).
-      {\sl W\_RAN} the amplitude for the initial random rotation
-      of the states (default value 0.0).
-      {\sl W\_MAXS} is the maximum steps allowed in the optimization
-      (default value 200).}
-
-\keyword{WANNIER REFERENCE}{}{}{}{\&CPMD}
-  \desc{The vector {\sl W\_REF} is read from the next line, which consists
-      of 3 coordinates $x, y, z$. These are assumed as the origin for
-      the WFCs positions and related ionic coordinates (i.e.
-      ${\bf R}_I \to {\bf R}_I-(x, y, z)$).
-      The default value is the center of the supercell, if
-      \refkeyword{CENTER MOLECULE} keyword is active (Note, that
-      this is implicitely turned on, for calculations with
-      \refkeyword{SYMMETRY} 0). Otherwise it is set to (0,0,0), which
-      is usually not the center of the box.
-      In order to get the best results displaying the
-      IONS+CENTERS.xyz file this parameter should be set explicitly.}
-
-\spekeyword{WANNIER RELOCALIZE\_IN\_SCF}{}{}{}{\&CPMD}{WANNIER RELOCALIZE IN SCF}
-   \desc{ If present, relocalize/project the wavefunction at every SCF step.}
-
-\spekeyword{WANNIER RELOCALIZE\_EVERY}{}{}{}{\&CPMD}{WANNIER RELOCALIZE EVERY}
-   \desc{ If present, relocalize the wavefunction at every SCF step with the Jacobi method.
-     The stride is read from the next line.}
-
-\keyword{WANNIER SERIAL}{}{}{}{\&CPMD}
-  \desc{Requests that the calculation of Wannier functions is performed using
-        the serial code, even in parallel runs.}
-
-\keyword{WANNIER TYPE}{\{VANDERBILT,RESTA\}}{}{}{\&CPMD}
-  \desc{Indicates the type of Wannier functions.
-      Vanderbilt type is the default.}
-
-\keyword{WANNIER WFNOUT}{}{[ALL,PARTIAL,LIST,DENSITY]}{}{\&CPMD}
-  \desc{Controls the printing of Wannier functions. Either all
-      or only some of the functions can be printed. This will be
-      done at the end of each calculation of Wannier functions.
-      For {\bf PARTIAL} output you have to give the indices of the 
-      first and the last wannier function to print; the {\em LIST}
-      directive follows the syntax of \refkeyword{RHOOUT} {\em BANDS}.
-    }
-\begin{verbatim}
-            WANNIER WFNOUT PARTIAL
-               5  8
-
-\end{verbatim}
-
-\keyword{WCUT}{}{}{CUT}{\&SYSTEM}
-  \desc{Set the radial \refkeyword{CDFT} weight cutoff for all 
-     atom species to CUT, which is specified next to the keyword. 
-     Default is a species specific cutoff at the distance where 
-     the magnitude of the respective promolecular density is 
-     smaller than $10^{-6}$.}
-
-\keyword{WGAUSS}{}{}{NWG}{\&SYSTEM}
-  \desc{Use Gaussian weight functions instead of Hirshfeld promolecular orbitals
-     in the \refkeyword{CDFT} weight. Parameter NWG is specified next to the keyword
-     and has to be equal to the number of different atom species in the calculation. 
-     The Gaussian widths $\sigma_i$ of the species $i$ are read from subsequent lines.}
-
-\keyword{WOUT}{}{[FULL]}{}{\&CPMD}
-  \desc{Controls the printing of the CDFT weight(s). If the keyword FULL is set
-     the full weight is written out in the form of a density to WEIGHT-(suff),
-     where (suff) is defined by the kind of the CDFT job. (suff)=WFOPT for single point
-     calculations, while for geometry optimisations and MD two weights are written,
-     (suff)=INIT at the beginning and (suff)=FINAL for the last step.
-     If FULL is not set write out a slice of the weight in gnuplot readable form to
-     WEIGHT-(suff).dat. Parameters WSLICE and WSTEP are read from the next line.\\
-     WSLICE \defaultvalue{0.5} is if larger than zero the z coordinate of
-     the x-y weight plane to write out divided by the total box height. If WSLICE$<0$ the weight at
-     the z coordinate of the first acceptor atom will be used.\\
-     WSTEP \defaultvalue{1} is the grid point step size for the output.}
-
-\spekeyword{XC\_ANALYTIC}{}{}{}{\&LINRES}{XC-ANALYTIC}
- \desc{
- Use analytic second derivatives of
- the XC functional (only available for some LDA functionals)
- }
-
-\spekeyword{XC\_EPS}{}{}{}{\&LINRES}{XC-EPS}
- \desc{
- Finite difference parameter for XC derivative. Default is $5 \cdot 10^{-4}$.
- }
-
-\spekeyword{XC\_DD\_ANALYTIC}{}{}{}{\&LINRES}{XC-DD-ANALYTIC}
- \desc{
- Use analytic second derivatives of the XC functional, see Ref.~\cite{xcder}
- (only available for some LDA and gradient-corrected functionals).
- For the analytic third derivatives of some LDA XC functionals,
- \refspekeyword{XC\_ANALYTIC}{XC-ANALYTIC} can be combined with this keyword
- }
-
-\keyword{ZDIIS}{}{}{}{\&LINRES}
-  \desc{The subspace size for the optimizer is read from the next line.}
-
-
-\keyword{ZFLEXIBLE CELL}{}{}{}{\&SYSTEM}
-  \desc{Specifies a constraint on the super cell in constant
-   pressure dynamics or geometry optimizations.
-   The supercell may only shrink or grow in z-direction.
-   Should be very useful for ``dense slab'' configurations,
-   e.g. a water layer between solid slabs.\\
-   \textbf{Please note:} this is by no means intended to give a
-   statistically meaningful ensemble, but merely to provide a
-   tool for efficient equilibration of a specific class of system.
-}
-
-\spekeyword{{[TSDE, TSDP, TSDC]}}{}{[NOPRECONDITIONING]}{NOPRECONDITIONING only
-  electrons}{\&CPMD}{TSDE, TSDP, TSDC}
-  \desc{Short forms for the different \refkeyword{STEEPEST DESCENT} options.}
-
-\keyword{n-CENTER CUTOFF}{}{}{}{\&PROP}
-  \desc{The cutoff for printing the n-center shared electron numbers is read
-    from the next line. All one and two center terms are printed.}
-
-%
-\clearpage
-%
-%---------------------------------------------------------------------
-\subsection{Further details of the input}\label{further_input}
-%---------------------------------------------------------------------
-%
-\subsubsection{Pseudopotentials}
-%
-\label{S_Pseudopotentials}
-%
-
-  The general format for entering the pseudo potentials in the input file is:
-\begin{itemize}
-\item The input for a {\bf new atom type} is started
-      with a ``{\bf *}'' in the first column. This line further contains:
-      \begin{itemize}
-      \item the {\bf file name} ({\sl ECPNAME}) where to find the
-            {\bf pseudopotential}
-            information starting in column 2
-      \item and several {\bf \sl labels}:
-            \begin{itemize} %labels
-            \item[.] The {\bf first label} \\
-            {\bf [GAUSS-HERMITE, KLEINMAN-BYLANDER]}\\
-                  specifies the method to be used for the calculation of
-                  the {\bf nonlocal parts} of the {\bf pseudopotential} \cite{KB}.
-                  It can be omitted for Vanderbilt pseudopotentials
-                  and Stefan Goedecker's pseudopotentials. For semi-local
-                  pseudopotentials the default is Gauss-Hermite integration
-                  with 20 special points. The number of integration points
-                  can be changed using {\bf GAUSS-HERMITE=xx}.
-            \item[.] It is further possible to specify {\bf nonlinear core
-                  correction \cite{NLCC} [NLCC]} and the width of the 
-                  {\bf ionic charge distribution [RAGGIO]}.
-                  ({\bf Default} is {\bf no NLCC} and the default value for
-                  {\bf RAGGIO} is {\bf 1.2}.)
-            \item[.] The  label {\bf UPF} indicates that the pseudopotential
-                  was stored using the Universal Pseudopotential Format.
-            \item[.] For {\bf Vanderbilt ultrasoft pseudopotentials}
-                one of the following options has to be specified:
-                {\bf BINARY} indicates the binary version of the output
-                file from Vanderbilts atomic code. \\
-                {\bf FORMATTED} indicates the formatted version of the
-                Vanderbilt pseudopotential files after a conversion with
-                the program `reform.f' from the
-                Vanderbilt atomic code package (see section \ref{intro:further}) \\
-                For Vanderbilt pseudopotentials the option NLCC is ignored.
-                The nonlinear core correction will always be used if the
-                pseudopotential was generated with a partial core. \\
-                It is strongly recommended to use only Vanderbilt pseudopotentials that
-                were generated with a new version of Vanderbilts atomic code
-                (version 7.3.0 or newer).
-            \item[.] The  label {\bf CLASSIC} indicates that the following atoms are to be
-                traeted with classical force fields only. See section \&CLASSIC for more information.
-            \item[.] The  label {\bf \_EAM\_} indicates that the following atoms are treated using
-                the EAM approach.
-            \item[.] The  label {\bf FRAC} indicates that the core charge of
-                a pseudopotential should not be rounded for the calculation of the
-                number of electrons (for pseudopotentials with fractional core charge).
-            \item[.] The  label {\bf ADD\_H} indicates that the
-              potential should used to saturate dangling bonds or
-              ``hydrogenize'' united atom potentials in a CPMD/Gromos-QM/MM
-              calculation (see section \ref{sec:qmmm} for more details).
-            \end{itemize} % labels
-      \end{itemize}
-\item The next line contains information on the {\bf nonlocality} of
-      the {\bf pseudopotential} ({\sl LMAX, LOC, SKIP}) \cite{BHS,SGS,TM}.
-\item On the following lines the {\bf coordinates} for this
-      {\bf atomic species} have to be given.\\
-      The first line gives the number of atoms ({\sl NATOMS}) of the
-      current type.\\
-      Afterwards the coordinates of the atoms are listed
-      (in Cartesian coordinates by default). For CPMD/Gromos-QM/MM
-      calculation, however, the Gromos atom numbers have to be given
-      instead of coordinates (see section \ref{sec:qmmm} for more details).
-\end{itemize}
-
-
-\noindent
-The information on the {\bf nonlocal part} of the pseudopotential \cite{BHS,SGS,TM}
-can be given in two different styles:
-\begin{itemize}
-\item[-] You can specify the maximum $l$ - quantum number with
-         ``{\bf LMAX}=$l$'' where $l$ is S, P or D. \\
-         If this is the only input, the program assumes that LMAX
-         is the local potential (LOC). \\
-         You can use another local function by specifying ``{\bf LOC}=$l$''.\\
-         In addition it is possible to assign the local potential to a
-         further potential with ``{\bf SKIP}=$l$''.
-\item[-] Alternatively you can specify these three angular quantum
-         numbers by their numerical values (S=0, P=1, D=2) in the
-         order ``LMAX LOC SKIP''.\\
-         If values for LOC and SKIP are provided outside the range
-         0 - LMAX the program uses the default.
-\end{itemize}
-\begin{flushleft}
-{\bf Examples:} The following lines are {\bf equivalent} \medskip \\
-{\bf
-  LMAX=P \smallskip \\
-  LMAX=P LOC=P \smallskip\\
-    1   1   2 \smallskip\\
-    1   2   2 \smallskip\\
-}
-\end{flushleft}
-
-
-\noindent
-{\bf Note:}
-
-Also for Vanderbilt and Goedecker pseudopotentials \cite{GTH}
-this line has to be in a {\bf valid format},
-but the actual values are {\bf not} used.
-
-\subsubsection{Constraints and Restraints}
-\label{sec:cnstr}
-
-\refkeyword{CONSTRAINTS ... END CONSTRAINTS}\hfill \smallskip \\
-     Within this input block you can specify several
-     \textbf{constraints} and \textbf{restraints} on the atoms.\\
-    Please note, that for calculations using the Gromos
-    QM/MM-interface (see section \ref{sec:qmmm}) the atom indices
-    refer to the ordering of the atoms
-    as it appears in the respective Gromos coordinate file.
-    In all cases the indices of dummy atoms start sequentially from total-number-of-atoms plus one.
-
-    The following suboptions are possible:
-
-     \begin{description}
-        \item[FIX ALL]\hfill \\
-          {\bf All coordinates} of {\bf all atoms} are kept fixed.\\
-           For wavefunction optimization via simulated annealing.
-
-        \item[FIX QM]\hfill \\
-          {\bf All coordinates} of {\bf all QM atoms} are kept fixed.\\
-          This is the same as above unless you are running a QM/MM
-          calculation with the Gromos interface code.
-
-        \item[FIX MM]\hfill \\
-          {\bf All coordinates} of {\bf all MM atoms} are kept fixed.\\
-           This is ignored unless you are running a QM/MM
-           calculation with the Gromos interface code.
-
-        \item[FIX SOLUTE]\hfill \\
-          {\bf All coordinates} of {\bf all solute atoms} are kept fixed.\\
-           This is ignored unless you are running a QM/MM
-           calculation with the Gromos interface code.
-           The definition of what is a solute is taken from the
-           respecitve GROMOS topology file.
-
-        \item[FIX SEQUENCE]\hfill \\
-          {\bf All coordinates} of a series of atoms are kept fixed.\\
-          This keyword is followed by the index numbers of the first and
-          the last atoms to be fixed in the next line.
-          Example: \\
-          {\tt
-            {\bf FIX SEQUENCE}\\
-            5~25~~~~~~{\small \sl all coordinates of atoms no. 5 to 25 are kept fixed}
-            }
-
-        \item[FIX ELEMENT {[SEQUENCE]}] \hfill \\
-          \textbf{All coordinates} of all atoms belonging to the same
-          \textbf{element} are kept fixed. This works across
-          pseudopotential types or QM and MM atoms in case of a QM/MM
-          calculation. The keyword is followed by the core charge of
-          the respective element. With the optional SEQUENCE modifier
-          two more numbers are read in, specifying the first and the
-          last index of a sequence of atoms to which this keyword will
-          be applied.
-          Example: \\
-          {\tt
-            {\bf FIX ELEMENT}\\
-            8~~~~~~~~~{\small \sl all coordinates of oxygen atoms are kept fixed}
-            }
-
-
-        \item[FIX PPTYPE {[SEQUENCE]}] \hfill \\
-          \textbf{All coordinates} of all atoms belonging to the same
-          potential type are kept fixed. The keyword is followed by the
-          atom type index number on the next line, corresponds to the
-          sequence of how the atom types are specified in the \&ATOMS
-          section of the CPMD input. In case of a QM/MM calculation
-          this is expanded to respective classical atom types. In this
-          case the QM atom types come first followed by the GROMOS atom
-          types.
-% FIXME: AK: 2005/05/25
-          With the optional SEQUENCE modifier
-          two more numbers are read in, specifying the first and the
-          last index of a sequence of atoms to which this keyword will
-          be applied.
-          Example: \\
-          {\tt
-            {\bf FIX PPTYPE SEQUENCE}\\
-            ~~2~~~5~25~~~~~~{\small \sl atoms corresponding to the
-              second atom type with an index between 5 and 25 are kept fixed}
-            }
-
-        \item[FIX ATOMS]\hfill \\
-          {\bf All coordinates} of certain atoms can be fixed.\\
-          This keyword is followed by the number of atoms to be fixed
-          and a list of these atoms specifying them by the number of
-          their position in the input file (NOTE: in the file
-          GEOMETRY.xyz the atoms have the same ordering).
-          Example: \\
-          {\tt
-            {\bf FIX ATOMS  }\\
-            5~~~~2~~5~20~21~23~~~~~{\small \sl all coordinates of atoms
-              2, 5, 20, 21, and 23 are kept fixed}
-            }
-
-        \item[FIX COORDINATES]\hfill \\
-          {\bf Certain coordinates} of atoms are fixed.\\
-          This keyword is followed by the number of
-          atoms with fixed coordinates and a list of these atoms
-          together with flags indicating which coordinates are fixed.
-          A zero indicates a fixed coordinate.
-          Example: \\
-          {\tt
-            \begin{tabular}{lllll}
-              \multicolumn{5}{l}{\bf FIX COORDINATES }\\
-              2 &   &   &        &{\small \sl Two atoms have fixed coordinates}\\
-              1 & 1 & 1 & 0      &{\small \sl for atom \#1 $z$ is fixed}\\
-              4 & 0 & 1 & 0      &{\small \sl for atom \#4 $x$ and $z$ are fixed}
-            \end{tabular}
-            }
-        \item[FIX COM] \hfill \\
-          Fix the center of mass.\\
-          \textbf{NOTE:} This currently works only for \refkeyword{OPTIMIZE GEOMETRY}
-          and not for the \refkeyword{LBFGS} optimizer.
-
-        \item[FIX STRUCTURE {[SHOVE]} ] \hfill \\
-          This keyword starts a group of individual constraints where
-          whole {\bf structural units} can be fixed. The keyword is
-          followed by the number of individual constraints on the next line.
-          \begin{description}
-          \item[DIST]  $n1$ $n2$ $R$ \hfill\\
-            Fixes the distance $R$ between the atoms $n1$ and $n2$.
-          \item[STRETCH]  $n1$ $n2$ $R$ \hfill\\
-            Fixes $R^2$ defined by the atoms $n1$ and $n2$.
-                          \item[DIFFER]  $n1$ $n2$ $n3$ $R$ \hfill\\
-            Fixes $R_{12}-R_{23}$ defined by the atoms $n1$, $n2$, and $n3$,
-            where $R_{ab}$ is the distance between atoms a and b.
-          \item[DISAXIS] $n1$ $n2$ $k$ $R_0$  [+1,-1,0] GROWTH aa DEST Rd \hfill\\
-            Distance between two atoms $n1$ and $n2$ along $x$ or $y$ or $z$ direction. 
-            $n1$ $n2$ $k$ and the value $R_0$ are read next on the same line. 
-            Here $k=1$ means $x$, $k=2$ means $y$ and $k=3$ means $z$ coordinate.
-          \item[BEND]  $n1$ $n2$ $n3$ $\theta$ \hfill\\
-            Fixes the bending angle defined by the atoms
-            $n1$, $n2$ and $n3$.
-          \item[TORSION]  $n1$ $n2$ $n3$ $n4$ $\Theta$ \hfill\\
-            Fixes the torsion angle defined by the atoms
-            $n1$, $n2$, $n3$ and $n4$.
-          \item[OUTP]  $n1$ $n2$ $n3$ $n4$ $\Theta$ \hfill\\
-            ``Out of Plane''; Angle between plane
-            ($n1$, $n2$, $n3$) and atom $n4$ is fixed.
-
-          \item[RIGID]  $nr$ $n1$ $n2$ ... $nx$  \hfill\\
-            Keeps the structure formed by the $nr$ atoms
-            $n1$, $n2$, \dots\\
-            You can put your atom index in several lines.
-            The number of constraints {\bf nfix} is equal to
-            $3nr-6$ for $nr>2$ ($nfix=1$ for $nr=2$).
-
-          \item[COORD]  $n1$ $\kappa$ $Rc$ $d^0$ \hfill\\
-            Constraint on the coordination (number of atoms around a selected
-            one within a specific spherical range of radius $\sim Rc$) for atom $n1$.
-            The parameters $\kappa$ and $Rc$ for the Fermi function
-            are given in Bohr ($Rc$) and 1/Bohr ($\kappa$), or
-            in \AA   ($Rc$) and 1/\AA   ($\kappa$), if the
-            keyword \refkeyword{ANGSTROM} is set.
-            See Ref.~\cite{Sprik98a}.
-
-          \item[COORSP] $n1$ $jsp$ $\kappa$ $Rc$ $d^0$\hfill\\
-            Fixes the coordination number (CN) of one
-            selected atom $i$ with respect to only one selected
-            species $jsp$. The CN is defined by a Fermi-like function as for $COORD$,
-            but in this case $j$ runs only over the atoms belonging to the selected
-            species $jsp$.
-
-          \item[COOR\_RF] $n1$ $jsp$ $p$ $q$ $Rc$ $d^0$\hfill\\
-            CN of one selected atom $i$ with respect to one selected
-            species, $jsp$.
-            The CN value is calculated as the sum of rational functions
-            \begin{equation}
-              CN_i = \sum_{j \neq i}^{n_{list}} \frac{1-\left(\frac{d_{ij}}{d^0}\right)^{p}}
-              {1-\left(\frac{d_{ij}}{d^0}\right)^{p+q}},
-            \end{equation}
-            where j runs over the indexes of the atoms belonging to $jsp$ or over the
-            indexes given in the list $j1 \cdots jn_{list}$.
-
-          \item[BNSWT] $n1$ $n2$  $p$ $q$ $Rc$ $d^0$\hfill\\
-            Reciprocal CN between 2 selected atoms, defined with the same
-            functional form as the one described for $COOR\_RF$.
-            This coordinate states the presence of the bond between the
-            two atoms $i$ and $j$.
-
-          \item[TOT\_COOR] $isp$ $jsp$ $p$ $q$ $Rc$ $d^0$\hfill\\
-            Average CN of the atoms belonging to a selected species $isp$
-            with respect to a second selected species, $jsp$, or with respect to a given
-            list of atoms, $j1 \cdots jn_{list}$.
-            The same functional forms and input options are used, as those
-            described for $COOR\_RF$, but the index of one selected species $isp$
-            is read in place of the index of one atom.
-
-          \end{description}
-          $n1$, ... are the atom numbers, $R$ distances and $\Theta$ angles.
-             A function value of -999. for $R$ or $\Theta$ refers to the
-             current value to be fixed. The constraint is linearly added
-             to the CP Lagrangian according to the {\it Blue Moon} ensemble
-             prescription\cite{Sprik98b}. The values of the Lagrange
-             multipliers and of the actual constraint are printed in the file
-             CONSTRAINT.\\
-             The options {\bf DIST, STRETCH, BEND, TORSION, OUTP, DIFFER, COORD,
-             COORSP, COOR\_RF, TOT\_COOR} can have
-             an optional additional keyword at the end of the line of the form \\
-             {\tt DIST  1 2 -999.  GROWTH  0.001 }\\
-             The keyword {\bf GROWTH} indicates that the constraint value should be
-             changed at each time step. The rate of change is given after the keyword
-             in units per atomic time unit, i.e. {\bf independent} from
-             the current length of a time step.\\
-             {\bf Note:} In MD runs {\bf only} the actual initial value
-             (-999.) can be fixed.\\
-             The {\bf SHOVE} option requires an additional entry at the end
-             of each constraint line. This entry has to be either
-             $-1$, $0$, or $1$. The constraint is then either fixed ($0$)
-             or allowed to shrink ($-1$) or grow ($1$).
-
-           \item[RESTRAINTS [HYPERPLANE [K=scal]]] \hfill \\
-             Defines restraints. 
-             \begin{description}
-             \item[nres] \hfill\\
-               Number of restraints.
-             \item[DIST]  $n1$ $n2$ $R$ $kval$ \hfill\\
-               Restrains the distance $R$ between the atoms $n1$ and $n2$ by
-               a harmonic potential having spring constant $kval$.
-             \item[STRETCH]  $n1$ $n2$ $R$ $kval$ \hfill\\
-               Restrains $R^2$ defined by the atoms $n1$ and $n2$ by
-               a harmonic potential having spring constant $kval$.
-             \item[DIFFER]  $n1$ $n2$ $n3$ $R$ $kval$ \hfill\\
-               Restrains $R_{12}-R_{23}$ defined by the atoms $n1$, $n2$, and $n3$,
-               where $R_{ab}$ is the distance between atoms a and b by
-               a harmonic potential having spring constant $kval$.
-              \item[DISAXIS] $n1$ $n2$ $k$ $R_0$ $kval$ \hfill\\ 
-               Restraints the distance between two atoms $n1$ and $n2$ along $x$ or $y$ or 
-               $z$ direction. $n1$ $n2$ $k$ and the value $R_0$ are read next on the same line.
-               Here $k=1$ means $x$, $k=2$ means $y$ and $k=3$ means $z$ coordinate. 
-             \item[BEND]  $n1$ $n2$ $n3$ $\theta$ $kval$ \hfill\\
-               Restrains the bending angle defined by the atoms
-               $n1$, $n2$ and $n3$ by a harmonic potential having spring constant $kval$.
-             \item[TORSION]  $n1$ $n2$ $n3$ $n4$ $\Theta$ $kval$ \hfill\\
-               Restrains the torsion angle defined by the atoms
-               $n1$, $n2$, $n3$ and $n4$ by a harmonic potential having spring constant $kval$.
-             \item[OUTP]  $n1$ $n2$ $n3$ $n4$ $\Theta$ $kval$ \hfill\\
-               ``Out of Plane''; Angle between plane
-               ($n1$, $n2$, $n3$) and atom $n4$ is restrained by
-               a harmonic potential having spring constant $kval$.
-             \item[COORD]  $n1$ $K$ $RC$ $C0$ $kval$ \hfill\\
-              Coordination restraint for atom $n1$. The parameters $K$ and $RC$ for the
-              Fermi-like function are given in Bohr ($RC$) and 1/Bohr ($K$), or in \AA  ($RC$) 
-              and 1/\AA  ($K$), if the keyword \refkeyword{ANGSTROM} is set.
-              See Ref.~\cite{Sprik98a}. The harmonic potential spring constant is $kval$.
-             \item[COORSP] $n1$ $is$ $K$ $RC$ $C0$ $kval$ \hfill\\
-              Retraint on the coordination number (CN) of one selected atom $n1$ with respect
-              to a single selcted species $is$. The CN is defined by a Fermi-like function 
-              as for $COORD$. 
-              As in all the above cases, the harmonic potential spring constant is $kval$.
-             \item[COOR\_RF] $n1$ $is$ $N$ $M$ $RC$ $C0$ $kval$ \hfill\\
-              Restraint on CN of one selected atom $n1$ with respect to one selected
-              species, $is$. The CN value is calculated as the sum of rational functions
-              \begin{equation}
-              CN_i = \sum_{j \neq i}^{n_{list}} \frac{1-\left(\frac{d_{ij}}{d^0}\right)^{p}}
-              {1-\left(\frac{d_{ij}}{d^0}\right)^{p+q}},
-              \end{equation}
-              where j runs over the indexes of the atoms belonging to $is$ or over the
-              indexes given in the list $j1 \cdots jn_{list}$.
-              As in all the above cases, the harmonic potential spring constant is $kval$.
-             \item[BNSWT] $n1$ $n2$ $N$ $M$ $ RC$ $C0$ $kval$ \hfill\\
-              Reciprocal CN between 2 selected atoms, defined with the same
-              functional form as the one described for $COOR\_RF$.
-              This coordinate states the presence of the bond between the
-              two atoms $n1$ and $n2$.
-              As in all the above cases, the harmonic potential spring constant is $kval$.
-             \item[TOT\_COOR] $is1$ $is2$ $N$ $M$ $RC$ $C0$ $kval$ \hfill\\
-              Average CN of the atoms belonging to a selected species $is1$
-              with respect to a second selected species, $is2$, or with respect to a given
-              list of atoms, $j1 \cdots jn_{list}$.
-              The same functional forms and input options are used, as those
-              described for $COOR\_RF$, but the index of one selected species $isp$
-              is read in place of the index of one atom.
-              As in all the above cases, the harmonic potential spring constant is $kval$.
-             \item[RESPOS] $n1$, $x_0$, $y_0$, $z_0$ $d_0$ $kval$ \hfill\\
-               Restrains the position ${\bf R}=(x,y,z)$ of atom $n1$ to oscillate
-               around ${\bf R}_0=(x_0,y_0,z_0)$ with a constraint harmonic
-               potential $V_c=(kval/2)(|{\bf R}-{\bf R}_0|-d_0)^2$ \cite{cco}.
-               The limits $kval=0$ and $kval \to \infty$ correspond
-               to free and fixed atomic positions, respectively.
-               The keyword GROWTH is not supposed to be used for this restraint.
-               For the sake of clarity and consistency with the atomic
-               units used through the code, coordinates and distances are 
-               expected to be in atomic units (not $\rm \AA$).
-             \end{description}
-
-             $n1$, ... are the atom numbers, $R$ distances and $\Theta$ angles. A
-             function value of -999. for $R$ or $\Theta$ refers to the current value.
-             The restraining potential is harmonic with the force constant $kval$.
-             The options can have an optional additional keyword at the
-             end of the line of the form \\
-             {\tt DIST  1 2 -999. 0.1  GROWTH  0.001 }\\
-             The keyword {\bf GROWTH} indicates that the constraint value should be
-             changed at each time step. The rate of change is given after the keyword
-             in units per atomic time unit.\\
-             If the keyword {\bf HYPEPLANE} is set, the system is not restrained around 
-             a point in the collective variable space but in an hyperplane. This 
-             hyperplane is defined as going through a point in the collective variable 
-             space, defined from the $R$ and $\Theta$ above, and by a vector defined 
-             from the $kval$ values. {\bf K=scal} applies a scaling to the vector 
-             defining the hyperplane so as to modulate the strength of the restraint.\\
-             The energy formula for an hyperplane restraint is then:\\
-             $E_r=\frac{1}{2}\left((\vec{c}-\vec{c}_0)\cdot \vec{n}\right)^2$,\\
-             where the vectors are vectors in the collective variable space.\\
-             If a file {\bf RESVAL} is found after parsing the input, the current 
-             restraint target values will be replaced by the values found in this file.
-        \item[PENALTY]\hfill \\
-             The weight factors for the penalty function
-             for stretches, bends and torsions are read from the
-             next line.
-           \end{description}
-
-
-\subsubsection{Atomic Basis Set}
-\label{input:basis}
-
-The \&BASIS section is used in CPMD only to provide an atomic basis set
-for generating the initial guess and for analyzing orbitals. If the
-input file contains no \&BASIS section, a minimal Slater basis is used.\\
-
-There have to be {\em number of species} different entries in this
-section. \\
-
-The order of the basis sets has to correspond with the order
-of the atom types in the section {\bf \&ATOMS \ldots \&END}.\\
-With the keyword {\bf SKIP} the species is skipped and the
-default minimal Slater function basis is used.\\
-Basis sets are either specified as Slater functions or given
-on an additional input file.
-
-\medskip
-
-\noindent
-The respective input formats are given below:
-
-\medskip
-
-\noindent
-Slater type basis
-\begin{verbatim}
-SLATER   nshell  [OCCUPATION]
-  n1   l1    exp1
-  ..   ..    ....
-  nx   lx    expx
-  [f1 f2 ... ]
-\end{verbatim}
-\bigskip
-
-\noindent
-Pseudo atomic orbitals
-\begin{verbatim}
-PSEUDO AO nshell  [OCCUPATION]
-  l1   l2   ..   lx     !a function with l=-1 is skipped
-  [f1 f2 ... ]
-\end{verbatim}
-\bigskip
-
-\noindent
-Numerical functions
-\begin{verbatim}
-*filename  nshell  FORMAT=n  [OCCUPATION]
-  l1   l2   ..   lx
-  [f1 f2 ... ]
-\end{verbatim}
-\bigskip
-
-\noindent
-Gaussian basis functions
-\begin{verbatim}
-*filename  nshell  GAUSSIAN  [OCCUPATION]
-  l1   l2   ..   lx
-  [f1 f2 ... ]
-\end{verbatim}
-\bigskip
-
-\noindent
-Skip atom type and use default minimal slater function
-\begin{verbatim}
-SKIP
-\end{verbatim}
-
-\medskip
-
-\noindent
-{\tt nshell} is the number L-values\ \ {\tt l1 l2  ..  lx}\ \
-to be used.\\
-{\tt [f1 f2 ... ]} is their occupation.
-
-\medskip
-
-\noindent
-The format {\bf PSEUDO AO} refers to the \&WAVEFUNCTION section
-on the corresponding pseudopotential file. \\
-With a L-value of -1 a specific function can be skipped.
-
-\medskip
-
-\noindent
-The * for the numerical basis has to be in the first column. The
-default format is 1, other possible formats are 2 and 3. The numbers
-correspond to the format numbers in the old pseudopotential definitions
-for the atomic wavefunctions.
-
-\medskip
-
-\noindent
-The format {\bf GAUSSIAN} allows to use any linear combination of
-Gaussian functions. The format of the file is as follows:
-\begin{verbatim}
-Comment line
-Lmax
-(for each l value)
-  Comment line
-  # of functions; # of exponents
-  exp1 exp2 ... expn
-  c11  c21      cn1
-  c12  c22      cn2
-  ...  ...      ...
-  c1m  c2m      cnm
-\end{verbatim}
-
-\subsubsection{Van der Waals potential}
-
-This section ( \&VDW \ldots \&END) contains information about the
-empirical van der Waals correction. There are currently two major
-types of corrections implemented: the one described by 
-M.~Elstner~{\itshape et al.}\cite{Elstner} requires parameter sets 
-designed to use only in conjunction with a specific corresponding 
-density functional, the alternate parametrization by S.~Grimme\cite{Grimme06}
-is less specific and therefore easier to use and independent
-of the chose functional. Parameters for elements up to Xe have
-been directly coded into CPMD.
-(This part of the input is read via the code in vdwin.F).
-See the description of the keyword \refkeyword{VDW PARAMETERS}
-for more details.
-\vfill
-\clearpage
-
-%---------------------------------------------------------------------
-\part{Miscellaneous}
-\section{Postprocessing}\label{post}
-
-  The given output from a calculation with the CPMD code can be used for
-postprocessing. There are several types of output. The most typical types of
-output are density-like files, trajectories and/or xyz-files. These can
-be visualized or analyzed with a number of different programs. Some of them
-are (in no specific order):\\
-Molden: (homepage: 
-\htref{http://www.cmbi.kun.nl/~schaft/molden/molden.html}{http://www.cmbi.kun.nl/~schaft/molden/molden.html}\\
-gOpenMol: (homepage: \htref{http://www.csc.fi/gopenmol/}{http://www.csc.fi/gopenmol/})\\
-Molekel: (homepage: \htref{http://www.cscs.ch/molekel/}{http://www.cscs.ch/molekel/})\\
-VMD: (homepage:
-\htref{http://www.ks.uiuc.edu/Research/vmd/}{http://www.ks.uiuc.edu/Research/vmd/})\\
-Starting with version 1.8.2 VMD does fully support the CPMD trajectory format,
-xyz-movie format and Gaussian Cube files. Since version 1.8.3 VMD
-supports periodic display of non-orthogonal supercells.
-A tutorial on Visualization and Analysis of CPMD data with VMD can be
-found at
-\htref{http://www.theochem.ruhr-uni-bochum.de/go/cpmd-vmd.html}{http://www.theochem.ruhr-uni-bochum.de/go/cpmd-vmd.html}.
-
-
-
-\subsection{Density files}
-
-\subsubsection{List}
-
-DENSITY.x, ELF, LSD\_ELF, SPINDEN.x, WANNIER\_1.x ...
-
-\subsubsection{Postprocessing}
-
-These files are created in a binary format, they have to be transformed
-to a Gaussian cube-File format to be readable by visualization programs.
-The {\tt cpmd2cube.x} to convert the output
-can be download at www.cpmd.org and is used in the following way:
-\begin{verbatim}
-cpmd2cube: Convert CPMD's Wannier-function files to cube
-usage is: cpmd2cube [options] Wannier_file [Wannier_file...]
-   If you specify more than one Wannier file, they MUST have the
-   same g-vectors and (for the moment) atom positions
-   The program will create one cube file for each Wannier file
-   and one pdb file with the atom positions
-Example:
-   cpmd2cube.x WANNIER_1.*
-possible options are
-   -v <verbosity>:
-      <verbosity> is 0-2 (default is 1)
-   -double:
-      Read the density in double precision (default is single)
-   -halfmesh:
-      leave out half the grid points in each direction.
-      Reduces the file size by 1/8th (on by default).
-   -fullmesh:
-      use the full real space grid.
-   -n <n1> <n2> <n3>:
-      change the REAL-space mesh. Default is to take the same mesh as CPMD
-   -o <prefix>:
-      specify the prefix of the name used for the cube and pdb-files
-   -rep <n1> <n2> <n3>:
-      replicate the cell n<j> times along the <j>-th direction by periodicity
-   -shift <r1> <r2> <r3>:
-      shift cube density by r1*a1+r2*a2+r3*a3
-   -centre:
-   -center:
-      centre density around centre of mass of system.
-   -inbox:
-      put atoms inside unit cell centred around origin
-   -rho:
-   -dens:
-      store the density instead of the wavefunction into the cube file.
-   -psi:
-   -wave:
-      store the wavefunction instead of the density into the cube file.
-   --:
-      last option. Useful if you have a file with the same name as an option
-   -h  or  -?  or  -help  or  --help  or no files:
-      write this help
-\end{verbatim}
-
-\subsection{xyz-files}
-
-\subsubsection{List}
-
-GEOMETRY.xyz, ION+CENTERS.xyz
-
-\subsubsection{Postprocessing}
-
-  These files can be directly read by a visualisation program. Note, that at
-the current status it is useful to include a reference point (WANNIER
-REFERENCE) for the ION+CENTERS.xyz which has to be put at the middle of the
-box.
-
-\subsection{TRAJECTORY-File}
-
-\subsubsection{List}
-
-TRAJECTORY
-
-\subsubsection{Postprocessing}
-
-1. Looking at a movie\hfill\\
-The TRAJECTORY files contains the coordinates and the
-velocities. To create a movie file in the xyz-format, you have to transfer the
-coordinates from Bohr to {\AA} and you have to add the symbols of the atoms in
-the first position. Two lines have to be at the beginning of each time step,
-from which the first line gives the number of the total atoms. An .xyz
-file can also be recorded directly during the simulation Using the
-\refkeyword{TRAJECTORY} keyword with the option {\bf XYZ}.\\
-Please note, that CPMD does not apply the minium image convention
-to these trajectory files, i.e. atoms are \textbf{nor} replaced by their
-images, if they leave the supercell.
-
-\medskip
-
- 2. Calculating radial pair distribution functions\hfill\\
-The simplest analysis of the structure is
-given by the radial pair distribution function g(r). This quantity is a to
-unity normalized function and describes the probability of finding two atoms
-separated by a distance r relative to the probability expected for a completely
-random distribution at the same density. It is formally defined as:
-\begin{eqnarray*}
-g(r)=\rho^{-2}\left < \sum_i\sum_{i\neq j} \delta({\bf r}_i)
-\delta({\bf r}_j-{\bf r}) \right > \nonumber\\
-= \frac{V}{N^2}\left < \sum_i\sum_{i\neq j} \delta({\bf r}-{\bf r}_{ij})
- \right >
-\end{eqnarray*}
-with r being the atomic separation, $\rho$ the number density, N the number of
-atoms, V the volume, {\textbf r} the atomic position, and {\textbf r$_{ij}$}
-the position of the atom i relative to the atom j. The average $<>$ is taken
-over particles and time. Examples of code can be found in the following
-references \cite{Allen87,Frenkel02}.
-
-\subsection{The MOVIE format}
-
-Besides the TRAJECTORY file CPMD also produces a specialy
-formated trajectory in the MOVIE file. This file contains the position
-of all atoms of the system in Angstrom units at a rather low
-precision ($10^{-4}$). The sampling of the positions can be done
-independently from the trajectory file. The sets of coordinates are
-follwoing each other contigously. The format of each line is \\[10pt]
-x-coordinate, y-coordinate, z-coordinate, atomic number, type .
-
-
-\clearpage
-%---------------------------------------------------------------------
-\section{Hints and Tricks}\label{hints}
-
-\subsection{Pseudopotentials and Plane Wave Cutoff}\label{hints:cutoff}
-The selection of proper pseudopotentials and the corresponding
-plane wave cutoff are crucial for obtaining good results with
-a CPMD calculation. The cutoff required is mainly determined by
-the type and the ``softness'' of a pseudopotential.\\
-Ideally a pseudopotential for a specific atom type should be
-usable for all kinds of calculations (Transferability), but in
-practice one frequently has to make compromises between accuracy
-and impact on the computational effort when creating a pseudopotential.
-Therefore one always has to test pseudopotentials before using them
-on new systems. There are quite a large number of CPMD calculations
-published (see
-\htref{http://www.cpmd.org/cpmd_publications.html}{http://www.cpmd.org/cpmd\_publications.html})
-which can serve as a guideline.\\
-
-Since CPMD uses a plane wave basis, a concept of several different,
-formalized basis sets of different quality, like with gaussian basis set
-based quantum chemical software, does not apply here.
-Since plane waves are 'delocalized' in space, they provide the same
-'quality' everywhere in space and one can increase the basis set almost
-arbitrarily by increasing the number of plane waves via the
-\refkeyword{CUTOFF} keyword.  The cutoff has to be chosen
-in such a way, that all required quantities are reasonably converged
-with respect to the plane wave cutoff. For a molecular dynamics
-run this refers primarily to the atomic forces. For the calculation
-of other properties like the stress tensor a different, usually a much
-higher cutoff is required. It's always a good idea to make checks at
-some critical points of the calculations by increasing the cutoff.\\
-
-Typical cutoff values range from 20--40~ry for Vanderbilt ultra-soft
-pseudopotentials, 60--100~ry for Troullier-Martins norm-conserving
-pseudopotentials to 80--200~ry for Goedecker
-pseudopotentials. Pseudopotentials of different types can be freely
-mixed, but the required plane wave cutoff is determined by the
-``hardest'' pseudopotential. Support for Vanderbilt ultra-soft
-pseudopotentials is (mostly) limited to the basic functionality
-like molecular dynamics and geometry optimization.\\
-
-\subsection{Wavefunction Initialization}
-
-  The default initial guess for the wavefunctions is calculated from the atomic
-pseudo-wavefunctions and gives usually excellent results. Good results can also
-be obtained by using wavefunctions from other calculations with a different
-cutoff or slightly different geometry. The other initialization available,
-starts from random coefficients and should only be used as a last resort. Cases
-where the default method does not work are when the molecule has less occupied
-states than one of the atoms (in this case add some empty states for the
-molecule) or when the additional memory required for the atomic calculation is
-not available.
-
-\subsubsection{Using Vanderbilt Ultrasoft Pseudopotentials}
-When using Vanderbilt ultrasoft pseudopotentials (USPPs) \cite{Vanderbilt} and 
-starting from atomic pseudo-wave\-func\-tions, the calculations often do not
-converge or converge to a wrong state, especially if 3d-elements are
-involved. Convergence is generally much better when assigning (partial)
-charges via the \refkeyword{ATOMIC CHARGES} keyword in the \&SYSTEM
-\ldots \&END section. Values from a classical MD forcefield or an NBO
-calculation are usually good values. Alternatively a random initialization
-of the wave functions (via \refkeyword{INITIALIZE WAVEFUNCTION} RANDOM)
-can be used.
-
-Also, due to the comparatively small plane wave cutoffs, you will have small
-but significant modulations of the density in especially in regions with
-little electron density. These lead to "strange" effects with
-gradient corrected functionals, causing the optimization to fail.
-To avoid this, you can skip the calculation of the gradient correction
-for low electron density areas using \refkeyword{GC-CUTOFF} with a value
-between 1.D-6 and 1.D-5 in the \&DFT section.
-
-In case of geometry optimizations, also the accurate calculation of the
-forces due to the augmentation charges may need a higher density cutoff
-and/or a tighter real space grid.
-This can be achieved by either using a higher plane wave cutoff or via
-increasing \refkeyword{DUAL} to 5.0 or even 6.0 and/or setting
-the real space grid explicitely via the \refkeyword{MESH}
-keyword in the \&SYSTEM section. For the same reason, these options
-may be needed to increase energy conservation during molecular dynamics runs.
-Use these options with care, as they will increase the cpu time
-and memory requirements significantly und thus can easily take away
-one of the major advantages of ultra-soft pseudopotentials.
-
-\subsection{Wavefunction Convergence}\label{hints:wfconv}
-Some general comments on wavefunction optimizations:\\[2ex]
-%
-Any optimization that takes more than 100 steps
-should be considered slow.\\[1ex]
-%
-Optimizations using ODIIS that have repeated resets
-(more than a few) will probably never converge.
-%
-Convergence for LSD is normaly slower and more
-difficult than for unpolarized cases.\\[1ex]
-%
-If the ODIIS converger gets stuck (more than one reset)
-stop the run and restart using
-\begin{verbatim}
-  PCG MINIMIZE
-  TIMESTEP
-   20
-\end{verbatim}
-The conjugate gradient minimizer with line search is
-much more robust. For LSD and larger systems it should be used from
-the start.\\[1ex]
-%
-A typical behavior will be that after the restart the energy goes down
-and the gradient increases. This means that we are in a region where
-there are negative curvatures. In such regions the DIIS minimizer moves
-in the wrong direction.  After some iterations we will be back to normal
-behavior, energy and gradient get smaller. At this point it may be save
-to switch back to ODIIS.\\[1ex]
-%
-Sometimes, it can also be helpful to wait longer for a DIIS reset and to
-diagonalize after repeated resets to get out of this region. This can be
-accomplished using
-\begin{verbatim}
-  ODIIS NO_RESET=20
-    5
-  LANCZOS DIAGONALIZATION RESET=2
-\end{verbatim}
-%
-Starting a Car-Parrinello MD from a random wavefunction with all atom
-positions fixed, a comparatively high electron mass and using
-\refkeyword{ANNEALING} ELECTRONS is another alternative to get
-to a reasonably converged wavefunction. Due to the exponential
-convergence of the annealing procedure, one should switch to
-a different optimizer as soon as the fictitious kinetic energy of
-the electrons drops below the typical range for a (normal) MD run.\\[1ex]
-
-Wavefunction optimizations for geometries that are far from equilibrium
-are often difficult. If you are not really interested in this geometry
-(e.g. at the beginning of a geometry optimization or this is just the
-start of a MD) you can relax the convergence criteria to $10^{-3}$ or
-$10^{-4}$ and do some geometry steps.  After that optimization will be
-easier.\\[1ex]
-%
-Some general remarks on comparing the final energies:\\[2ex]
-Converge the wavefunction very well, i.e. set \refkeyword{CONVERGENCE} ORBITALS to
-$10^{-6}$ or better.\\[2ex]
-Make sure that all parameters are the same:\\
-- same geometry,\\
-- same functional,\\
-- same number of grid points (this may differ
-     if you use different FFT libraries)\\
-- same number of spline points for the PP\\
-(IMPORTANT: the default for \refkeyword{SPLINE} \textbf{POINTS} has
-changed between different CPMD versions, $500 \to 3000 \to 5000$).
-A very good test is to start always from the same
-RESTART file and only do one single step. This
-way ALL energies have to be exactly the same and
-no problems with different convergence rates occure.
-
-
-
-\subsection{Cell Size for Calculations with \textbf{SYMMETRY~0}}\label{hints:symm0}
-Calculations of isolated systems (i.e. decoupling of the electrostatic
-images in the Poisson solver) are initialized with:\\
-\texttt{
-\refkeyword{SYMMETRY}\\
-\hspace*{4ex}0
-}
-
-The box is assumed to be orthorhombic. With the additional options
-\refkeyword{SURFACE} or \refkeyword{POLYMER} periodic boundary
-conditions in two or one dimensions, respectively, are assumed.
-Poisson solvers available are:\\
-\refkeyword{POISSON SOLVER} \{HOCKNEY,TUCKERMAN,MORTENSEN\}
-
-All methods require that the charge density is zero at
-the border of the box. For normal systems this means that
-about 3 Angstrom space between the outermost atoms and
-the box should be enough. However, for some systems and for
-high accuracy this may not be enough.
-Some methods have additional requirements (see below).
-
-The \refkeyword{ISOLATED MOLECULE} keyword has only an effect on the
-calculation of the degrees of freedom (3N-6 vs. 3N-3 for periodic
-systems).
-
-\refkeyword{CENTER MOLECULE} ON/OFF: The main purpose of this is to
-center the molecule (center of mass) in the box. This is needed for the
-HOCKNEY Poisson solver. This solver gives wrong results if the charge
-density is not centered in the computational box. All other solvers
-behave like the periodic counterpart, i.e. the relative position of the
-charge density and the box are not important.
-
-Further requirements:\\
-
-HOCKNEY Method:
-\begin{itemize}
- \item  molecule has to be in the center of the box
- \item  box size molecule + 3 {\AA} border
- \item  expensive for very small systems
- \item  not available for some response calculations
- \item  \refkeyword{POLYMER} is available but
-    gives (currently, Version 3.9) wrong results.
- \item  \refkeyword{SURFACE} is available and works.
-\end{itemize}
-
-TUCKERMAN Method:
-\begin{itemize}
- \item box size : molecule + 3 {\AA} border AND 2*size of charge distribution
-                 \item expensive for large systems, smaller boxes might be used without
- loosing too much accuracy
- \item \refkeyword{SURFACE} or \refkeyword{POLYMER} are not available
-\end{itemize}
-
-MORTENSEN Method:
-\begin{itemize}
- \item same as TUCKERMAN, but using analytic formula
-    made possible by using special boundary conditions
-    (sphere, rod)
- \item \refkeyword{SURFACE} and \refkeyword{POLYMER} are available and
-   should be safe to use (MORTENSEN is default for SURFACE and POLYMER)
- \item If you do an isolated system calculation, your cell has
-   to be cubic, if you use \refkeyword{POLYMER} cell dimensions b and c
-   have to be equal.
-\end{itemize}
-
-
-Finally, for many systems using a large enough cell and
-periodic boundary conditions is also an option.
-In general, the computed properties of molecules
-should be independent of the scheme used (either pbc or isolated
-box) except in difficult cases such as charged molecules,
-where the calculation in an isolated box is recommended.
-The PBC calculation is always cheaper for a box of the same size,
-so for a neutral molecule such as water molecule you would
-save time and memory by not using \refkeyword{SYMMETRY} 0.
-
-
-\subsection{Geometry Optimization}
-
-  Any combination of methods for geometry optimization and wavefunction
-optimization is allowed. Possible options for geometry optimization are GDIIS,
-LBFGS, PRFO, RFO, BFGS and steepest descent. If you choose steepest descent for
-both, geometry variables and the wavefunction, a combined method is used. For
-all other combinations a full wavefunction optimization is performed between
-changes of the ionic coordinates. The convergence criteria for the wavefunction
-optimization can be adapted to the requirements of the geometry optimization
-(CONVERGENCE ADAPT and CONVERGENCE ENERGY). The default options are GDIIS and
-ODIIS. Some quasi-Newton methods (GDIIS, RFO and BFGS) are using the BFGS
-method to update an approximate Hessian. At the beginning of a run the Hessian
-can either be initialized as a unit matrix {\bf HESSIAN UNIT} or with an
-empirical force field. Two force fields are implemented: The {\bf DISCO} and
-the {\bf SCHLEGEL} force field. The algorithm for the empirical force fields
-has to identify bonds in the system. For unusual geometries this may fail and
-the Hessian becomes singular. To prevent this you can add or delete bonds with
-the keyword {\bf CHANGE BONDS}.
-
-The linear-scaling geometry optimizers (options LBFGS and PRFO) do not require
-an approximate Hessian. To achieve linear scaling with the system size, the
-L-BFGS optimizer starts from a unit Hessian and applies the BFGS update on the
-fly using the history of the optimization. The P-RFO method can find transition
-states by following eigenmodes of the Hessian. The mode to be followed does not
-necessarily have to be the lowest eigenvalue initially ({\bf PRFO MODE}). For
-larger systems, only the reaction core should be handled by the P-RFO optimizer
-({\bf PRFO NVAR} and {\bf PRFO CORE}), and the environment is variationally
-decoupled using the L-BFGS optimizer. The normal LBFGS options can be used for
-the environment. The Hessian used for transition-state search therefore spans
-only a subset of all degrees of freedom, is separate from the Hessian for the
-other optimizers and the vibrational analysis, but it can be transferred into
-the appropriate degrees of freedom of the regular Hessian
-({\bf HESSIAN PARTIAL}). In order to allow negative eigenvalues, the Powell
-update instead of BFGS is used for transition-state search.
-
-Although tailored for large systems, the linear-scaling geometry optimizers
-are suitable for smaller systems as well.
-
-\subsection{Molecular Dynamics}
-
-\subsubsection{Choosing the Nos\'{e}-Hoover chain thermostat parameters}
-\label{hints:nose}
-
-  The Nos\'{e}-Hoover chain thermostat is defined by specifying three
-parameters: A target kinetic energy, a frequency and a chain length. For the
-ions, given the target temperature $T_W$, the target kinetic energy is just
-$gkT_W$, where $g$ is the number of degrees of freedom involved in a common
-thermostat. For example, if there is one thermostat on the entire ionic system,
-then $g=3N_{AT}-N_{const}$, where $N_{const}$ is the number of constraints to
-which the atoms are subject. The frequency for the ionic thermostat should be
-chosen to be some characteristic frequency of the ionic system for which one
-wishes to insure equilibration. In water, for example, one could choose the O-H
-bond vibrational frequency. (Having a precise value for this frequency is not
-important, as one only wishes to insure that the thermostat will couple to the
-mode of interest.) The choice of chain length is not terribly important as it
-only determines how many extra thermostats there will be to absorb energy from
-the system. Usually a chain length of 4 is sufficient to insure effective
-equilibration. Longer chains may be used in situations where heating or cooling
-effects are more dramatic.
-
-  For the electrons, the target kinetic energy is not usually known {\it a
-priori} as it is for the ions. However, by performing a short run without
-thermostats, one can determine a value about which the electron kinetic energy
-`naturally' fluctuates and take this as the target value. While the precise
-value is not important, a little experience goes a long way, as a choice that
-is either too small or too large can cause spurious damping of the ions or
-departures from the Born-Oppenheimer surface, respectively. A good choice for
-the frequency of the electron thermostat can be made based on $\Omega_I^{\rm
-max}$, the maximum frequency in the phonon spectrum. The frequency of the
-electron thermostat should be at least 2-3 times this value to avoid coupling
-between the ions and the electron thermostats. As an example, for silicon, the
-highest frequency in the phonon spectrum is 0.003 a.u., so a good choice for
-the electron thermostat frequency is 0.01 a.u. The chain length of the electron
-thermostat can be chosen in the same way as for the ions. 4 is usually
-sufficient, however longer chains may be used if serious heating is expected.
-In addition, the electron thermostats have an extra parameter that scales the
-number of dynamical degrees of freedom for the electrons. ($1/\beta_e =
-2E_e/N_e$, where $E_e$ is the desired electron kinetic energy and $N_e$ is the
-number of dynamical degrees of freedom for the electrons -- see Eq.~(3.4) in
-Ref.\cite{Tuckerman94}). The default value is the true number of dynamical
-degrees of freedom $N_e = (2*N_{GW}-1)*N_{ST} - N_{ST}^p$, where $p=2$ for
-orthonormality constraints and $p=1$ for norm constraints. When this number is
-very large, it may not be possible to integrate the electron chain thermostats
-stably using a frequency above that top of the phonon spectrum. Should this be
-the case in your problem, then the number of dynamical degrees of freedom
-should be scaled to some smaller number such that the system can once again be
-integrated stably. This parameter has no other effect that to change the
-relative time scales between the first element of the electron thermostat chain
-and the other elements of the chain.
-
-  In addition to the basic parameters defining the chains themselves, one needs
-to specify two more parameters related to the integration of the thermostated
-equations of motion. The first is the order $M_{SUZ}$ of the Suzuki integrator.
-Experience shows that the choice $M_{SUZ}=3$ is sufficient for most
-applications. Finally, one must specify the number of times the Suzuki
-integrator will be applied in a given update. This is the parameter $N_{SUZ}$
-which determines the basic Suzuki time step $\delta t$ = $\Delta t/N_{SUZ}$,
-where $\Delta t$ is the time step being used in the MD run. $N_{SUZ} =2$ or 3
-is usually large enough to give stable integration. If more stable integration
-is required, try $M_{SUZ}=4$ or make $N_{SUZ}$ larger.
-
-
-\subsection{Restarts}
-
-\subsubsection{General information}
-
-  All restart information for CPMD simulations are stored within one binary
-file. There are very few exceptions we will discuss later. The name of the
-restart files is \texttt{RESTART} or \texttt{RESTART.n}, where $n$ stands for an
-integer number. If the keyword \refkeyword{RESTART} is found the program
-processes the file with the name \texttt{RESTART}. Using suboptions to the
-\refkeyword{RESTART} option, the information retained from the file can be
-specified. For example the suboptions \texttt{COORDINATES WAVEFUNCTION} will
-force the program to use the geometry and orbitals from the \texttt{RESTART}
-file.
-
-  At the end of a simulation or at regular intervals (using the keyword
-\refkeyword{STORE}) a restart file with the default name \texttt{RESTART.1} is
-written. If this happens more than once (e.g. during a molecular dynamics run)
-the restart file is being overwritten. Using the keyword \refkeyword{RESTFILE}
-it can be specified that more than one restart file should be used for writing.
-If the \refkeyword{RESTFILE} parameter was set to 4, then 4 restart files with
-the names \texttt{RESTART.1}, $\ldots$, \texttt{RESTART.4} will be written. If
-more than 4 restart files are needed the first one will be overwritten. This
-option is useful if there is the possibility that restart files get corrupted
-(e.g. on instable systems), or if simulations are performed that might lead to
-unphysical results. In this case it might be possible to go back to a restart
-file which contains still intact information.
-
-  The name of the last restart file written is stored in the file {\tt LATEST}.
-Using the suboption LATEST to the keyword RESTART changes the default name of
-the file to be read from RESTART to the name found in the file {\tt LATEST}.
-The danger of using this option is that the file from which the simulation is
-started gets overwritten during the simulation. Using the default (starting
-from RESTART) ensures that the original file stays intact. However, it requires
-the renaming of the final file of a simulation from \texttt{RESTART.n} to {\tt
-RESTART}.
-
-\subsubsection{Typical restart scenarios}
-
-\paragraph{Wavefunction optimizations}
-
-  The restart options used in wavefunction optimizations are \\ {\bf RESTART
-WAVEFUNCTION COORDINATES}. The suboption COORDINATES is not really necessary
-but it is adviced to use it anyway, as in this way the correspondence of
-wavefunction and ionic geometry is assured.
-
-\paragraph{Geometry optimizations}
-
-  Typical suboptions used in a geometry optimizations are \\ {\bf RESTART
-WAVEFUNCTION COORDINATES HESSIAN}. With the suboption HESSIAN the information
-from previous runs stored in the updated approximate HESSIAN can be reused.
-
-\paragraph{Molecular dynamics}
-
-  Molecular dynamics simulations use restart options of the kind \\ {\bf
-RESTART WAVEFUNCTION COORDINATES VELOCITIES}. These are the minimal options
-needed for a smooth continuation of a Car--Parrinello molecular dynamics
-simulation. Use of the suboption ACCUMULATORS ensures that the calculated means
-(e.g. temperature) are correct for the whole simulation, not just the current
-run. If Nos\'e thermostats are used it is important also the restart the
-thermostat variables. This is achieved by adding the corresponding keywords to
-the RESTART (NOSEE, NOSEP, NOSEC).
-
-\paragraph{Kohn--Sham energies}
-  The calculation of canonical Kohn--Sham orbitals requires a restart. In
-general, this will be a restart from converged orbitals from a wavefunction
-optimization. There is no way that the program can check this. However, if the
-same convergence criteria are used, the number of occupied states orbitals
-should converge in the first iteration of the diagonalization.
-
-\subsubsection{Some special cases}
-
-  The suboption VELOCITIES will result in a restart from both, ionic and
-wavefunction velocities. In special cases, this is not the desired behavior.
-Using the additional keyword \refkeyword{QUENCH} the read velocities can be set
-back to zero. This will be most likely used for wavefunctions with QUENCH
-ELECTRONS. Another possibility is to reoptimize the wavefunction at the start
-of a molecular dynamics simulation. This is achieved with the keywords QUENCH
-BO.
-% This also sets the velocities of the wavefunctions to zero.
-% AK: FIXME: 02/2004
-% QUENCH BO does not do QUENCH ELECTRONS automatically anymore, is this intentional?
-
-  For performance reasons the writing of the restart file should be done only
-occasionally. This might cause problems if the simulation was terminated
-incorrectly. Several hundreds or thousands of simulation steps might be lost.
-For this reason CPMD writes a special output file {\tt GEOMETRY} after each
-molecular dynamics step. Together with a normal restart file this allows to
-start the simulation form the last ionic configuration and velocities. To
-achieve this another suboption GEOFILE has to be added to the RESTART keyword.
-After reading the positions and velocities of the ions from the restart file,
-they are also read from the GEOMETRY file and overwritten.
-
-  Special restarts to be used with the keywords \refkeyword{TDDFT} and
-\refkeyword{VIBRATIONAL ANALYSIS} are discussed in the sections covering that
-type of simulations.
-
-\subsection{TDDFT}
-
-  The TDDFT part of CPMD is rather new. Therefore it hasn't yet reached the
-stability of other parts of the code. It has to be used with special care.
-
-  There are four different type of calculations that can be performed using
-the TDDFT module; calculation of the electronic spectra, geometry optimization and
-vibrational analysis, and molecular dynamics in excited states.
-
-  All options (spectra and forces, spin polarized and unpolarized) are
-implemented for the Tamm--Dancoff approximation to TDDFT. Only part of these
-options are available for the full TDDFT response calculation.
-
-\subsubsection{Electronic spectra}
-\reflabel{sec:ElectronicSpectra}{}
-
-  Electronic excitation energies can be calculated using the keyword
-\refkeyword{ELECTRONIC SPECTRA} in the \&CPMD section. This calculation is
-performed in three parts. First, the ground state wavefunctions are optimized,
-then a limited set of unoccupied orbitals is determined and finally the TDDFT
-response equations are solved. A typical input for such a calculation would
-look like
-
-\begin{verbatim}
-&CPMD
-  ELECTRONIC SPECTRA
-  DIAGONALIZATION LANCZOS
-  COMPRESS WRITE32
-&END
-
-&TDDFT
-  STATES SINGLET
-    5
-  TAMM-DANCOFF
-  DAVIDSON PARAMETER
-  150 1.D-7 50
-&END
-\end{verbatim}
-
-  For this calculation of the electronic spectra defaults are used for the
-ground state optimization (ODIIS and $10^{-5}$ convergence). The calculation of
-the empty states is performed using the Lanczos diagonalizer with default
-settings. The final wavefunction will be stored in the restart file using 32
-bit precision.
-
-  Five single states with the Tamm--Dancoff approximation have to be
-calculated. The parameters for the Davidson diagonalization have been changed
-to 50 for the Davidson subspace and a convergence criteria of $10^{-7}$ is
-used.
-
-  Restarting this type of calculation has to be done with care.
-At the end of each phase of the calculation a new restart file
-is written. If the defaults are used, each time the file \texttt{RESTART.1}
-is overwritten. For a restart from converged ground state wavefunctions
-and canonical Kohn--Sham orbitals a restart with \\
-\texttt{RESTART WAVEFUNCTION COORDINATES} \\
-will be used. A restart also including the linear response orbitals
-will use \\
-\texttt{RESTART WAVEFUNCTION COORDINATES LINRES}. \\
-In this case only restarts from the file \texttt{RESTART} are possible
-as after phase one and two the file \texttt{RESTART.1} would be
-overwritten and the information on the linear response orbitals,
-read only in phase three, would be lost.
-
-\subsubsection{Geometry optimizations and molecular dynamics}
-\label{sec:TDDFTdynamics}{}
-
-  Geometry optimizations and molecular dynamics simulations can only be
-performed after an electronic spectra calculation. A typical input file would
-contain the sections
-
-\begin{verbatim}
- &CPMD
-   OPTIMIZE GEOMETRY
-   TDDFT
-   RESTART WAVEFUNCTION COORDINATES LINRES
- &END
-
- &TDDFT
-  STATES SINGLET
-    1
-  TAMM-DANCOFF
-  DAVIDSON PARAMETER
-  150 1.D-7 50
-  FORCE STATE
-   1
- &END
-\end{verbatim}
-
-  The keywords in section \&CPMD are all mandatory. The section \&TDDFT
-specifies that the optimization should be performed for the first excited
-singlet state. Replacing \refkeyword{OPTIMIZE GEOMETRY} by 
-\refkeyword{MOLECULAR DYNAMICS} BO would result in a molecular dynamics simulation. 
-In this case further input specifying the time step, maximal number of steps, 
-thermostats, etc. would also be supplied.
-
-
-
-
-%%%   BEGIN/Daniel   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Perturbation Theory / Linear Response}
-
-\newcommand{\beq}{\begin{eqnarray}}
-\newcommand{\eeq}{\end{eqnarray}}
-\newcommand{\zero}{^{(0)}}
-\newcommand{\one}{^{(1)}}
-\newcommand{\PSI}[2]{\vert\varphi_{#1}^{(#2)}\rangle}
-\newcommand{\rv}{\mathbf{r}}
-\newcommand{\Rv}{\mathbf{R}}
-\newcommand{\Gv}{\mathbf{G}}
-\newcommand{\Bv}{\mathbf{B}}
-\newcommand{\pv}{\mathbf{p}}
-\newcommand{\respkeyword}[1]{{\bfseries #1}}
-
-\newcommand{\verbatimsize}{\footnotesize}
-\newcommand{\eofverbsize}{\normalsize}
-
-\newcommand{\ddpart}[3]{\ensuremath{\frac{\partial^2{{#1}}} {\partial{{#2}}
-\partial{{#3}}} }}
-
-\newcommand{\bA}{\ensuremath{\mathbf{A}}}
-\newcommand{\bI}{\ensuremath{\mathbf{I}}}
-\newcommand{\bP}{\ensuremath{\mathbf{P}}}
-\newcommand{\bR}{\ensuremath{\mathbf{R}}}
-\newcommand{\bQ}{\ensuremath{\mathbf{Q}}}
-\newcommand{\bT}{\ensuremath{\mathbf{T}}}
-\newcommand{\be}{\ensuremath{\mathbf{e}}}
-\newcommand{\bq}{\ensuremath{\mathbf{q}}}
-\newcommand{\br}{\ensuremath{\mathbf{r}}}
-\newcommand{\bs}{\ensuremath{\mathbf{s}}}
-\newcommand{\bt}{\ensuremath{\mathbf{t}}}
-\newcommand{\bw}{\ensuremath{\mathbf{w}}}
-
-\newcommand{\dr}{d^3r}
-
-
-\subsubsection{General}
-
-Ref: \cite{apdsmp}.
-
-Perturbation theory describes the reaction of a system onto an
-external perturbation. At the time when the perturbation occurs, the
-system is in its ground state (or unperturbed state). The perturbation
-then changes slightly the potential energy surface and therefore also
-the state where the system's energy is minimum. As a consequence, the
-system tries to move towards that state of minimum energy. This
-movement or the new state often have properties which can be accessed
-experimentally. Example: An external electric field will slightly
-deform the electronic cloud, creating a dipole. That dipole can then
-be measured.
-
-
-Assume that the magnitude of the perturbation is small compared to the
-strength of the forces acting in the unperturbed system. Then, the
-change in the minimum energy state will be small as well and
-perturbation theory can be applied to compute how the system reacts
-onto the perturbation. Generally, the Schr\"odinger equation is
-expanded in powers of the perturbation parameter (ex: the strength of
-the electric field), and the equations obtained for those powers are
-solved individually. At power zero, one refinds the equation of the
-unperturbed system:
-
-\beq
-  (H\zero - \varepsilon_k) \PSI k 0 &=& 0.
-\eeq
-
-For the part which is linear in the perturbation,
-the general format of the resulting equation is
-
-\beq
-  (H\zero - \varepsilon_k) \PSI k 1  &=& - H\one \PSI k 0.
-\label{eqn:sternheimer}
-\eeq
-
-Grosso modo, this equation is solved during a linear response
-calculation through a wavefunction optimization process for {$\PSI k
-1$}.
-
-
-The presence of a first order perturbation correction for the
-wavefunctions, $\PSI k {\text{\sf tot}} = \PSI k 0 + \PSI k 1$ implies
-that the total density of the perturbed system is no longer equal to
-the unperturbed one, $n\zero$, but also contains a first order
-perturbation correction, $n\one$.  That density is given by
-\beq
-n\one (\rv) &=& \sum_k
-           \langle \varphi\one_k \vert \rv \rangle \;
-           \langle \rv \vert \varphi\zero_k \rangle
-           + \text{c.c.}
-\eeq
-
-The Hamiltonian depends on the electronic density. Therefore, the
-first order density correction implies automatically an additional
-indirect perturbation hamiltonian coming from the expansion of the
-unperturbed Hamiltonian in the density. It has to be added to the
-explicit perturbation Hamiltonian determined by the type of the
-(external) perturbation. The contribution is
-
-\beq
-H\one_{\text{\sf indirect}}(\rv) &=& \int \dr^\prime\;
-   \frac{\partial H\zero(\rv)}{\partial n\zero(\rv^\prime)}\;
-   n\one(\rv^\prime)
-\label{eqn:implicit-hamiltonian}
-\eeq
-
-The calculation of this indirect Hamiltonian represents almost 50\% of
-the computational cost of the response calculation, especially in
-connection with xc-functionals. After several unsuccessful trials with
-analytic expressions for the derivative of the xc-potential with
-respect to the density, this is done numerically. That means that at
-each step, the xc-potential is calculated for the density
-$n\zero+\epsilon n\one$ and for $n\zero-\epsilon n\one$ (with an
-$\epsilon$ empirically set to 0.005), and the dervative needed in
-(\ref{eqn:implicit-hamiltonian}) is calculated as
-
-\beq
-  \int \dr^\prime\; n\one(\rv^\prime)\;
-  \frac{\partial v_{\text{xc}}}{\partial n\zero(\rv^\prime)}
-  &=& \frac{v_{\text{xc}}[n\zero+\epsilon n\one]
-      - v_{\text{xc}}[n\zero-\epsilon n\one]}
-      {2\epsilon}.
-\eeq
-
-In the case of the local density approximation, the derivative can be
-done analytically, in which case it only needs to be done once. This
-improves the performance of the optimization.
-
-\subsubsection{\&RESP section input}
-\label{sec:resp-section}
-
-Generally, the keyword \refkeyword{LINEAR RESPONSE} in the
-\&CPMD input section initiates the calculation. In the
-section \&RESP, the type of the perturbation needs to be
-specified. Either one of the following keywords must appear:
-
-\begin{quote}
-  \refkeyword{PHONON} \hfill \newline
-  \refkeyword{LANCZOS} \hfill \newline
-  \refkeyword{RAMAN} \hfill \newline
-  \refkeyword{FUKUI} \hfill \newline
-  \refkeyword{KPERT} \hfill \newline
-  \refkeyword{NMR} \hfill \newline
-  \refkeyword{EPR} \hfill \newline
-  \refkeyword{HARDNESS} \hfill \newline
-  \refkeyword{EIGENSYSTEM} \hfill \newline
-  \refkeyword{INTERACTION} \hfill \newline
-  \refkeyword{OACP}
-\end{quote}
-
-The first six types are discussed in detail in the following. An overview is also
-contained in the file \respkeyword{respin\_p.F}. In addition to the
-specific keywords of every option, there are several keywords which
-are common to all perturbation types. They determine fine-tuning
-parameters of the wavefunction optimization process, and usually you
-do not need to change them. A \# indicates that a command takes an
-argument which is read from the next line. All other keywords toggle
-between two states and do not require any argument. Those keywords can
-be put together, and they can also figure in the main keyword line
-(example: \respkeyword{NMR NOOPT FAST WANNIERCENTERS})
-
-
-NB: The linear response code works with all cell symmetries\footnote
-{except for isolated systems, \respkeyword{SYMMETRY=0}, where only the NMR
-part is adapted to.}, but it is \textbf{\textsl{not implemented}} for
-$k$-points.
-
-
-\begin{itemize}
-
-\item[\#] \respkeyword{CG-ANALYTIC:}
-The wavefunction optimization uses a preconditioned conjugate gradient
-technique. The optimum length of the ``time step'' can be calculated
-analytically assuming a purely linear equation, according to the
-Numerical Recipes Eq.\ 10.6.4. However, this is somewhat expensive,
-and experience shows that the time step is almost constant except at
-the very beginning. Therefore, it is only calculated a few times, and
-lateron, the last calculated value is used. This option controls the
-number of times the step length is calculated analytically. Default is
-3 for NMR and 99 for all other perturbations.
-
-
-
-\item[\#] \respkeyword{CG-FACTOR:}
-The analytic formula for the time step assumes that the equation to be
-solved is purely linear. However, this is not the case, since the
-right hand side can still depend on the first order wavefunctions
-through the dependence of the perturbation hamiltonian $H\one$ on the
-perturbation density $n\one$. Therefore, the analytic formula has a
-tendency to overshoot. This is corrected by an empirical prefactor
-which is controlled by this option. Default is 0.7.
-
-
-\item[\#] \respkeyword{CONVERGENCE:} The criterium which determines
-when convergence is reached is that the maximum element of the
-gradient of the energy with respect to the wavefunction coefficients
-be below a certain threashold. This value is read from the next
-line. Default is 0.00001. Experience shows that often, it is more
-crucial to use a strict convergence criterium on the ground state
-wavefunctions than for the response. A rule of thumb is that good
-results are obtained with a 10 times stricter convergence on the
-ground state orbitals compared to that of the response orbitals.
-
-
-\item[\#] \respkeyword{HTHRS or HAMILTONIAN CUTOFF:}
-The preconditioning calculates the diagonal $(\Gv,\Gv)$ matrix
-elements of $\eta=H\zero-\frac 1N \sum_k\varepsilon_k$ to do an
-approximate inversion of Eq.~(\ref{eqn:sternheimer}). However, these
-diagonal values can become very small, yielding numerical
-instabilities. Therefore, a smoothing is applied instead of simply
-taking the reciprocal values:
-\beq
-  \eta^{-1} &\mapsto& \left(\eta^2 + \delta^2\right)^{-1/2}
-  \label{eqn:precond-1}\\
-  \eta^{-1} &\mapsto& \frac {\eta} {\eta^2 + \delta^2}
-  \label{eqn:precond-2}
-\eeq
-The value of the parameter $\delta$ in a.u. is read from the line
-after {\respkeyword{HTHRS}}, default is 0.5. By default,
-Eq.~(\ref{eqn:precond-1}) is used. \respkeyword{TIGHTPREC} switches to
-Eq.~(\ref{eqn:precond-2}).
-
-
-\item \respkeyword{NOOPT:} In order for the wavefunction optimization to
-work properly, the ground state wavefunction must be converged. For
-this reason, a ground state optimization is performed by default prior
-to computing the response. When restarting from an already converged
-wavefunction, this step can be skipped through this keyword and the
-computer time for initializing the ground state optimization routine
-is saved. However, the use of this option is strongly discouraged.
-
-
-\item \respkeyword{POLAK:} There are several variants of the conjugate
-gradient algorithm. This keyword switches to the Polak-Ribiere
-formulation (see the Numerical Recipes, Eq.~10.6.7) which is usually
-significantly slowlier but safer in the convergence.  By default, the
-Fletcher-Reeves formula is used.
-
-
-\item \respkeyword{TIGHTPREC:} Switches to another preconditioning
-formula. See \respkeyword{HTHRS}.
-
-\end{itemize}
-
-
-
-
-\subsubsection{Response output}
-
-While the calculations are being done, the program prints the progress
-of the optimization process:
-
-\begin{itemize}
-\item
-The ``scaling input'' prints the number by which the right-hand-side
-of Eq.~(\ref{eqn:sternheimer}) is multiplied in order to deal with
-reasonable numbers during the optimization. The number is determined
-through the condition
-
-\beq
-  \vert\vert\;H\one \PSI k 0\;\vert\vert_2 &=& 1.
-\eeq
-
-When leaving the optimization routine, the inverse scaling is applied
-to the $\PSI k 1$, of course.
-
-\item
-The standard output shows (A) the maximum gradient of the second order
-energy with respect to the first order perturbation wavefunction, (B)
-the norm of that gradient, (C) the second order energy, (D) its
-difference with respect to the last value, and finally (E) the CPU
-time needed for one step. The last value decreases by somewhat after
-the number of steps determined by the {\respkeyword{CG-ANALYTIC}} keyword,
-because the analytic line search is no longer performed, as discussed
-                above.
-
-\item
-A line full of tildes ($\tilde{\ }$) indicates that the energy has
-increased. In that case, the conjugate direction is erased and the
-conjugate gradient routine is restarted. Also the time step is
-calculated again using the analytic quadratic line search formula.
-
-\item
-The warning ``line search instable'' indicates that the length which
-has been calculated using the analytic quadratic line search
-approximation (Numerical Recipes Eq.~10.6.4) has given a numerical
-values larger than 3. This does not happen in normal cases, and it can
-yield to program crashes due to floating point overflows ($\mapsto$
-{\tt NaN}, not a number). Thus, a safe value, 1, is used instead.
-
-\item
-The warning ``gradient norm increased by more than 200\%'' indicates
-that the quadratic approximation is not valid in the momentary
-position of the optimization. If it was, the gradient (of the energy
-with respect to the first order perturbation wavefunctions) would only
-decrease and finally reach zero. If this situation occurs, the
-conjugate direction is erased and the conjugate gradient algorithm is
-restarted.
-\end{itemize}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsubsection{Phonons}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\textbf{Theory}
-
-A phonon corresponds to small displacements of the ionic positions
-with respect to their equilibrium positions. The electrons principally
-follow them, in order to minimize again the energy of the system.
-
-The expansion of the Hamiltonian in powers of the displacement
-$u^R_\alpha$ of the ion (labeled by its position $R$) in the cartesian
-direction $\alpha=1,2,3$ consists of two parts\footnote
-%
-  {The reader might wonder whether Einstein summations over repeated
-  indices like $\alpha$ and $R$ are done or not. The answer is that
-  {\textsl{it depends}}. If only one atom is displaced along one of
-  the axes, there is no summation needed. The generalization to a
-  simultaneous displacement of all atoms in arbitrary directions is
-  trivially done by assuming the summation over $\alpha$ and $R$.}:
-
-\beq
-H\one &=& H\one_C + H\one_{PP}
-\eeq
-
-The contribution $H\one_C$ comes from the Coulomb term, the
-electrostatic potential:
-
-\beq
-H\one_C &=& u^R_\alpha
-    \frac \partial {\partial R_\alpha} \; \frac{Z_R}{|\rv - \Rv|}.
-\eeq
-
-The second is due to the pseudopotential which is rigidly attached to
-the ions and which must be moved simultaneously. In particular, the
-nonlocal pseudopotential projectors must be taken into account as
-well:
-
-\beq
-H\one_{PP} &=& u^R_\alpha
-    \frac \partial {\partial R_\alpha} \;
-    \left[\sum_i
-       \vert\text{\tt P}^R_i\rangle \langle\text{\tt P}^R_i\vert
-    \right]\\
-   &=& u^R_\alpha\sum_i\;\left[
-    \left[\frac\partial{\partial R_\alpha}\;
-          \vert\text{\tt P}^R_i\rangle\right]
-          \langle\text{\tt P}^R_i\vert
-    +
-    \vert\text{\tt P}^R_i\rangle
-          \left[\frac\partial{\partial R_\alpha}\;
-          \langle\text{\tt P}^R_i\vert\right]
-    \right]
-\label{eq.phon}
-\eeq
-
-where $\vert\text{\tt P}_i^R\rangle$ designates the projectors,
-whatever type they are. The index $i$ comprises the $l$ and $m$
-quantum numbers, for example. The superscript $R$ just says that of
-course only the projectors of the pseudopotential of the displaced
-atom at $R$ are considered in this equation.
-
-In \cpmd, these projectors are stored in G-space, and only one copy is
-stored (that is the one for a fictitious ion at the origin,
-$R=0$). The projectors for an ion at its true coordinates is then
-obtained as
-
-\beq
-  \langle \Gv \vert\text{\tt P}_i^R\rangle &=&
-  \text{e}^{i\Gv\cdot\Rv}\;\langle \Gv \vert\text{\tt P}_i^{R=0}\rangle.
-\label{eqn:translation-formula}
-\eeq
-
-This makes the derivative $\frac{\partial}{\partial R_\alpha}$
-particularly simple, as only the $i\Gv$ comes down, and the
-translation formula (\ref{eqn:translation-formula}) remains valid for
-$\vert\text{\tt P}_i^R\rangle$. Thus, there is only an additional
-nonlocal term appearing which can be treated almost in the same way as
-the unperturbed pseudopotential projectors.
-
-
-
-A perturbative displacement in cartesian coordinates can have
-components of trivial eigenmodes, that is translations and rotations.
-They can be written {\em a priori} (in mass weighted coordinates in this case)
-and thus projected out from the Hessian matrix;
-\beq
-\bt_j=\left(\begin{array}{c}
-            \sqrt{m_1}(\be_j) \\
-            \sqrt{m_2}(\be_j) \\
-            \vdots          \\
-            \sqrt{m_N}(\be_j) \\
-            \end{array} \right) \qquad
-\bs_j=\left(\begin{array}{c}
-            \sqrt{m_1}(\be_j\times\bR_1) \\
-            \sqrt{m_2}(\be_j\times\bR_2) \\
-            \vdots          \\
-            \sqrt{m_N}(\be_j\times\bR_N) \\
-            \end{array} \right)
-\eeq
-where j=x,y,z, $\be_j$ = unit vectors in the Cartesian directions and
-$\bR_k$ = positions of the atoms (referred to the COM). The rotations
-$\bs_j$ constructed in this way are not orthogonal; before being used
-they are orthogonalized with respect to the translations and with
-each other.
-
-The projection on the internal mode subspace is done this way:
-first one constructs a projector of the form,
-\beq
-\bP=\sum_j(\bt_j\cdot\bt_j^T+\bs_j\cdot\bs_j^T)
-\eeq
-and then applies the projector to the Hessian matrix,
-\beq
-\bA=(\bI-\bP)\cdot\bA\cdot(\bI-\bP)
-\eeq
-with \bI\ being the unit matrix.
-The projection is controlled by the keyword \refkeyword{DISCARD}, {\em vide
-infra}.
-
-\textbf{Phonon input}
-
-The input for the phonon section is particularly simple due to
-the absence of any special keywords. Only the word \refkeyword{PHONON}
-should appear in the \&RESP section.
-
-
-\textbf{Phonon output}
-
-In total analogy to \cpmd's \refkeyword{VIBRATIONAL ANALYSIS}, the
-displacement of all atoms in all cartesian directions are performed
-successively. The difference is, of course, that there is no real
-displacement but a differential one, calculated in perturbation
-theory. Thus, only one run is neccessary per ion/direction\footnote{In
-contrast to this, the \refkeyword{VIBRATIONAL ANALYSIS} displaces each
-atom in each direction first by +0.01 and then by -0.01.}.
-
-At the end, the harmonic frequencies are printed like in the
-\refkeyword{VIBRATIONAL ANALYSIS}. They should coincide to a few percent.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsubsection{Lanczos}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\textbf{Theory}
-
-Ref: \cite{ffmp}
-
-A different way of diagonalizing the Hessian matrix comes from the
-Lanczos procedure. It is easy to generalize eq.\ref{eq.phon} to
-a collective displacement of atoms,
-\beq
-H\one_{PP} &=& \sum_{R,\alpha}u^R_\alpha
-    \frac \partial {\partial R_\alpha} \;
-    \left[\sum_i
-       \vert\text{\tt P}^R_i\rangle \langle\text{\tt P}^R_i\vert
-    \right]\\
-   &=&  \sum_{R,\alpha} u^R_\alpha\sum_i\;\left[
-    \left[\frac\partial{\partial R_\alpha}\;
-          \vert\text{\tt P}^R_i\rangle\right]
-          \langle\text{\tt P}^R_i\vert
-    +
-    \vert\text{\tt P}^R_i\rangle
-          \left[\frac\partial{\partial R_\alpha}\;
-          \langle\text{\tt P}^R_i\vert\right]
-    \right]
-\eeq
-In this way the information contained in the Hessian matrix, {\bf A}, can
-be used to compute terms of the type
-\beq
-\bA\cdot\bw =
-\left( \begin{array}{c}
-       \ddpart{E}{R_{1x}}{\bw}\\
-       \ddpart{E}{R_{1y}}{\bw}\\
-       \vdots                 \\
-       \ddpart{E}{R_{Nz}}{\bw}
-       \end{array}\right)
-\label{eq.lr.12}
-\eeq
-where {\bf w} is the collective displacement. This is the building block
-for Lanczos diagonalization, that is performed by iterative application
-of the symmetric matrix to be diagonalized, over a set of vectors,
-known as Lanczos vectors, according to the scheme
-\begin{itemize}
-\item $\br_0=\bq_1; \beta_0=1; \bq_0=0; k=0$
-\item[WHILE] {$\beta_k\neq 0$}
-\item  $k=k+1$
-\item  $\alpha_k=\bq_k^T\bA\bq_k$
-\item  $\br_k=\bA\bq_k-\alpha_k\bq_k-\beta_{k-1}\bq_{k-1}$
-\item  $\beta_k=\parallel\br_k\parallel_2$
-\item  $\bq_{k+1}=\br_k/\beta_k$
-\item  Orthogonalization, $\bq_{k+1}\perp\left\{\bq_1,\cdots,\bq_k\right\}$
-\item  Diagonalization of $\bT_k$
-\item[END WHILE]
-\end{itemize}
-
-The matrix \bA\ is thus projected onto a k$\times$k subspace, in a
-tridiagonal form, $\bT_k$. \bT's eigenvalues are approximations to \bA's,
-while the eigenvectors are brought in the n$\times$n space by means of
-the orthogonal matrix $\bQ=[\bq_1,\bq_2,\dots,\bq_k]$.
-The advantage with respect to the usual diagonalization schemes is that
-the highest and the lowest end of the spectrum tend to converge before
-the ionic degrees of freedom are fully explored.
-
-The projection of the trivial eigenmodes is performed by eliminating
-their contribution from every Lanczos vector at the orthogonalization step
-reported in the algorithm above,
-\beq
-\bq_k=\bq_k-\sum_j\left((\bq_k^T\cdot\bt_j)\bt_j +
-(\bq_k^T\cdot\bs_j)\bs_j\right)
-\eeq
-This procedure seems slightly different from that of the \refkeyword{PHONON} case,
-but they are perfectly equivalent. It is controlled by the same keyword
-\refkeyword{DISCARD} with the same arguments.
-
-\textbf{Lanczos input}
-
-The input for the Lanczos routine is given by the keyword
-\refkeyword{LANCZOS} plus some optional arguments and a mandatory following
-line with numerical data. Plese note that this keyword
-is analogous to that for the  Lanczos diagonalization of the electronic
-degrees of freedom. Given its presence in the \&RESP section
-there should be no ambiguity.
-
-\begin{itemize}
-
-\item \respkeyword{LANCZOS [CONTINUE,DETAILS];} the keyword \refkeyword{LANCZOS}
-simply activates the diagonalization procedure. At every cycle the program
-writes a file, {\tt LANCZOS\_CONTINUE.1} which contains the information
-about the dimension of the calculation, the number of iteration, the
-elements of the Lanczos vectors and the diagonal and subdiagonal
-elements of the \bT\ matrix.
-\begin{itemize}
-\item With the option \respkeyword{CONTINUE} one
-restart a previous job, asking the program to read the needed information
-from the file {\tt LANCZOS\_CONTINUE}; if the program does not find this file,
-it stops. This option is to be used when the calculation that one wants
-to perform does not fit in the time of a queue slot.
-\item The argument \respkeyword{DETAILS} prints a lot of information about
-the procedure at the end of the output. It is intended for debugging purposes.
-\end{itemize}
-The subsequent line is mandatory, and contains three numerical
-parameters;
-\begin{itemize}
-\item {\tt Lanczos\_dimension}; it is the dimension of the vibrational
-degrees of freedom to be explored. Normally it is 3$\times$N$_{\rm at}$,
--3 if you are eliminating the translations or -6 if you are eliminating
-also the rotations({\em vide infra}). It is possible to use lower values.
-Higher are non sense.
-\item {\tt no. of iterations}; it is the number of cycles that are to be
-performed during the actual calculation. It must be $\leq$ to
-{\tt Lanczos\_dimension}; the program checks and stops if it is higher.
-In case of a continued job, the program checks if the given number of
-iterations + the index of the iteration from which it restarts is
-within the limit of {\tt Lanczos\_dimension}; if not it resets the
-number to fit the dimension, printing a warning on std. output.
-\item {\tt conv\_threshold}; it is the threshold under which an eigenvector
-is to be considered as converged. It is the component of the eigenvector
-over the last Lanczos vector. The lower it is, the lower is the information
-about this mode which has still to be explored.
-\end{itemize}
-\item \respkeyword{DISCARD \{PARTIAL,TOTAL,OFF,LINEAR\};} this keyword controls
-the elimination of the trivial eigenmodes ({\em i.e.} translations and
-rotations) from the eigenvector calculations. It works both for
-\refkeyword{PHONON} and \refkeyword{LANCZOS}. Omitting it is equivalent
-to \respkeyword{DISCARD PARTIAL}.
-When using it, the choice of one of the arguments is mandatory; the
-program stops otherwise. They are;
-\begin{itemize}
-\item \respkeyword{PARTIAL}; only the translational degrees of freedom are
-eliminated (useful for crystals). This is the default.
-\item \respkeyword{TOTAL}; both translational and rotational degrees of
-freedom are eliminated.
-\item \respkeyword{OFF}; the option is disactivated and no projection is
-performed.
-%\item \respkeyword{LINEAR}; it projects out all the translatios, plus
-%only 2 rotational degrees of freedom. Valid for linear molecules.
-%{\em Not implemented yet!}
-\end{itemize}
-
-\end{itemize}
-
-
-\textbf{Lanczos output}
-In the output, all the informations about the perturbed wavefunction
-optimization are reported, just like in the \refkeyword{PHONON} case. The
-differences are in the form of the perturbation and in the eigenmodes
-information coming from the diagonalization of $\bT_k$.
-
-
-The report of the perturbation for a water dimer reads like;
-\verbatimsize\begin{verbatim}
- **********************   perturbations    **********************
-
- **** atom=    1     O    .04171821      .07086763      .07833475
- **** atom=    2     O    .03615521      .08499767      .07082773
- **** atom=    3     H    .29222111      .13357862      .09032954
- **** atom=    4     H    .33764012      .15750912      .25491923
- **** atom=    5     H    .06426954      .26020430      .01822161
- **** atom=    6     H    .15765937      .27370013      .29183999
- cpu time for wavefunction initialization:          89.22 seconds
-\end{verbatim}\eofverbsize
-where at every atom corresponds the x,y,z displacemnts applied to calculate
-the perturbed wavefunctions.
-
-At every iteration information about the elements of the $\bT_k$ matrix,
-alpha's and beta's, are reported. Here we are at the end of the
-calculation. Note the numerical zero in the final +1 beta value.
-Then the spectrum in a.u. is reported,
-together with the convergence information. At the last iteration there
-are vectors which are not ``converged''. But this comes only from
-the definition, since some of the eigenvectors {\em must} have a
-component over the last Lanczos vectors. Following there are the
-familiar eigenvalues in cm$^{-1}$.
-\verbatimsize\begin{verbatim}
-
- ****************************************************************
-  *+* L2 norm[n[i+1]]       =  0.100262974102936016E-02
-  *=*   overlap: alpha[ 12 ] =  0.982356847531824437E-03
-  *=*   off-diag: beta[ 13 ] =  0.300011777832112837E-19
-  *=*   norm:               =  0.300011777832112837E-19
- ****************************************************************
- *** SPECTRUM, run 12 :
- *** eigenvalue  12 =     .4855525       (converged: .000000).
- *** eigenvalue  11 =     .4785309       (converged: .000000).
- *** eigenvalue  10 =     .4605248       (converged: .000000).
- *** eigenvalue   9 =     .4303958       (converged: .000000).
- *** eigenvalue   8 =     .0973733       (converged: .000000).
- *** eigenvalue   7 =     .0943757       (converged: .000000).
- *** eigenvalue   6 =     .0141633       (converged: .000004).
- *** eigenvalue   5 =     .0046807   (NOT converged: .004079).
- *** eigenvalue   4 =     .0020023   (NOT converged: .010100).
- *** eigenvalue   3 =     .0010310   (NOT converged: .313417).
- *** eigenvalue   2 =     .0009886   (NOT converged: .933851).
- *** eigenvalue   1 =     .0006303   (NOT converged: .171971).
-
- ****************************************************************
-  harmonic frequencies [cm**-1]:
-
-        129.0591        161.6295        165.0552        230.0241
-        351.6915        611.7668       1579.1898       1604.0732
-       3372.3938       3488.4362       3555.9794       3581.9733
-
- ****************************************************************
-
-\end{verbatim}\eofverbsize
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsubsection{Raman}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-Ref: \cite{apmp}
-
-Upon the specification of the RAMAN keyword, the polarizabilities of
-the system are calculated by evaluating the response to an applied
-electrical field. The calculation is done by means of the Berry phase
-approach, which is also suited for periodic systems.
-
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsubsection{Nuclear Magnetic Resonance}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\textbf{Theory}
-
-Ref: \cite{dsmp}
-
-A magnetic field $\Bv$ is applied to the system, which reacts by
-induced electronic ring currents. These currents produce an additional
-magnetic field by themselves, which is not homogeneous in
-space. Therefore, the actual magnetic field at the ionic positions is
-different for all atoms in the cell. This field determines the
-resonance frequency of the nuclear spin, and this resonance can be
-measured with a very high accuracy.
-
-The perturbation Hamiltonian is given by
-
-\beq
-  H\one &=& \frac 12 \frac em \pv \times \rv \cdot \Bv.
-\label{eqn:nmr}
-\eeq
-
-The difficult part of this Hamiltonian lies in the position operator
-which is ill defined in a periodic system. To get around this, the
-wavefunctions are localized and for each localized orbital,
-Eq.~(\ref{eqn:nmr}) is applied individually assuming the orbital being
-isolated in space. Around each orbital, a \textsl{virtual cell} is
-placed such that the wavefunction vanishes at the borders of that
-virtual cell.
-
-
-The perturbation and therefore also the response are purely imaginary,
-so that there is no first order response density. This simplifies the
-equations and speeds up convergence.
-
-
-\textbf{NMR input}
-
-The options which control the specific NMR features are discussed
-below. None of them requires an argument, they can all be put in the
-same line.
-
-
-\begin{itemize}
-
-\item \respkeyword{RESTART:} The run is restarted from a previous
-  stop. The user has to take care that the required files
-  RESTART.\textit{xxx} (where \textit{xxx} are NMR, p\_x, p\_y, p\_z)
-  exist.
-
-
-\item \respkeyword{CURRENT:} Three density files containing current
-  density values are written to disk. Further, the nucleus-independent
-  chemical shift fields are written to disk. All in cube format.
-
-\item \respkeyword{NOSMOOTH:} At the border of each virtual cell, the
-  position operator is smoothened through an $\exp -r^2$. This option
-  turns smoothing off. Can be useful if your cell is too small so that
-  this smoothing would already occur in a region where the orbital
-  density has not yet vanished.
-
-
-\item \respkeyword{NOVIRTUAL:} If this keyword is specified, no individual
-  virtual cells are used at all. All orbitals will have the same
-  virtual cell, equal to the standard unit cell.
-
-
-\item \respkeyword{PSI0:} With this option, the Wannier orbitals are
-  plotted as cube files.
-
-\item \respkeyword{RHO0:} With this option, the orbital densities are
-  plotted as cube files.
-
-\item[\#] \respkeyword{OVERLAP:}
-  Overlapping orbitals (overlap criterion read from next line) are
-  assigned the same virtual cells. Useful for isolated systems.
-
-\item \respkeyword{FULL}
-  A full calculation of the $\Delta j$ term in the NMR scheme is
-  done. Relatively expensive, but quite important for accurate results
-  in periodic systems.
-
-
-\end{itemize}
-
-
-
-
-\textbf{NMR output}
-
-At the end of the six perturbation runs, the results are printed. This
-includes the magnetic susceptibility and the chemical shieldings. For
-the chemical shieldings, there are two values: the raw and the net
-ones. The raw shieldings correspond to a molecule in vacuum, without
-the susceptibility correction, whereas the net shieldings contains
-that correction for a spherical sample. It consists of an additive
-constant to all eigenvalues, which is printed out at the end of the
-net shieldings.
-
-
-In more detail, the results are:
-
-
-\begin{itemize}
-\item
-The magnetic susceptibility tensor in both SI and cgs units. This
-quantity is an extensive quantity, i.e. two molecules in the
-simulation box will give twice the susceptibility of one.
-
-
-\item
-The raw shielding matrices of all atoms and its eigenvalues. Generally,
-the shielding tensor is not symmetric. To obtain unique eigenvalues, it is
-symmetrized ($A_{ij} \mapsto (A_{ij}+A_{ji})/2$) before the
-diagonalization.
-
-All values are given in ppm, parts per millon. Chemical shieldings are
-dimensionless quantities.
-
-
-\item
-The principal values (eigenvalues) of the raw and net shielding
-tensors. As mentioned above, they only differ by an additive constant,
-the susceptibility correction for a spherical sample, which is printed
-out at the end of the list. The numbers are the shielding eigenvalues from
-most negative to most positive, the isotropic shielding (the average of
-the eigenvalues), and the anisotropy (the difference between the most
-positive and the average of the other two).
-
-\end{itemize}
-
-
-
-\textbf{What to look at?}
-If you search for the values which are peaked in a spectrum, you have
-to take the isotropic shieldings (the {\respkeyword{iso}} column of the
-output). If the system is a gas, take the raw shielding, if it is
-condensed matter, take the net shielding. If your system is a molecule in
-vacuo, but the experimentalists measure it in a solvent, add the
-susceptibility correction to the raw shieldings by yourself.
-
-\textbf{Why are my numbers so strange in absolute value?}
-One more point shall be mentioned: For all nuclei except hydrogen,
-pseudopotentials screen the core electrons. The chemical shielding,
-however, is very sensitive to core and semi-core electrons. This can
-be corrected through a semi-empirical additive constant in many
-cases. This constant still needs to be added to the values given from
-the program. It depends on the nucleus, on the pseudopotential, and on
-the xc-functional.
-
-In other cases, the calculated chemical shieldings are completely
-meaningless due to this deficiency. Then, you have to use a
-pseudopotential which leaves out the semicore states such that they
-are correctly taken into account. Example: carbon shieldings can be
-corrected very well through a constant number, silicon shieldings
-cannot. For Si, you have to take the $n=3$ shell completely into the
-valence band, requiring a cutoff larger than 300Ry.
-
-
-\textbf{How to compare to experiment?}
-Usually, experimentalists measure the {\textit{difference}} between
-the resonance frequency of the desired system and that of a reference
-system, and they call it $\delta$ (the {\bfseries shift}) instead of
-$\sigma$ (the {\bfseries shielding}). To make life more complicated,
-they usually define the shift of nucleus {\sffamily A} of molecule
-{\sffamily X} with respect to reference molecule {\sffamily ref} as
-%
-$\delta^{\text{\sffamily A}}_{\text{\sffamily ref}}({\text{\sffamily X}}) =
- \sigma^{\text{\sffamily A}}({\text{\sffamily ref}})-
- \sigma^{\text{\sffamily A}}({\text{\sffamily X}})$.
-%
-Example: To calculate
-%
-$\delta^{\text{\sffamily H}}_{\text{\sffamily TMS}}({\text{\sffamily
-CH}}_4)$,
-%
-where TMS=tetramethylsilane, the standard reference molecule for
-H-shifts, one would have to calculate the H-shielding of TMS and of
-CH$_4$ and substract them. Unfortunately, TMS is nontrivial to
-calculate, because it is a large molecule and the geometry is
-complicated (and the shieldings probably must be calculated taking
-into account vibrational and rotational averaging). Thus, in most
-cases it is better to take for instance the CH$_4$ shielding as a
-(computational) reference, and transform the shieldings relative to
-CH$_4$ to those relative to TMS through the experimental shielding of
-CH$_4$ with respect to TMS.
-
-While doing so, you should not forget that the shielding is a property
-which is usually not yet fully converged when energies and bonding
-are. Therefore, the reference molecule should be calculated with the
-same computational parameters as the desired system (to reproduce the
-same convergence error). In particular, computational parameters
-include the type of the pseudopotential and its projectors, the
-xc-functional and the cutoff.
-
-
-
-\textbf{What accuracy can I expect?}
-This is a difficult question, and there is no overall answer. First,
-one has to consider that on the DFT-pseudopotential level of theory,
-one will never reach the accuracy of the quantum chemistry community.
-                However, for ``normal'' systems, the absolute accuracy is typically
-0.5-1 ppm for hydrogen and about 5-20ppm for Carbon. The spread
-between extreme regions of the carbon spectrum is not reached: instead
-of 200ppm, one only reaches 150ppm between aliphatic and aromatic
-atoms, for instance. The anisotropy and the principal values of the
-shielding tensor can be expected to be about 10-20\% too small.  For
-hydrogen shieldings, these values are usually better, the error
-remains in the region of a single ppm.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsubsection{FUKUI}
-Compute, within the linear response perturbation theory, the nuclear Fukui
-function $\phi _I$~\cite{fukui} formally identified as a reactivity index of the 
-density functional theory~\cite{fukui2,fukui3}, according to the postulated
-criterion for $\delta \mu$.
-The quantity $\delta \mu$ is the change in the electronic chemical
-potential $\mu$ and is given by
-
-\begin{equation}
-\delta \mu =\int f({\bf r}) \delta V^{ext}({\bf r}) d^3r
-= -\sum_I \phi_I \delta {\bf R}_I
-\end{equation}
-
-where $\phi _I =(\partial {\bf F}_I/\partial N)_{V^{ext}}=
--(\partial \mu /\partial R_I)_N$, $N$ is the number of electrons,
-$f({\bf r})$ the electronic Fukui function \cite{fukui,fukui2},
-$V^{ext}({\bf r})$ the external
-potential at {\bf r}, ${\bf R}_I$ the cartesian coordinate of the
-$I^{th}$ nucleus and ${\bf F}_I$ the force on the $I^{th}$ nucleus.
-
-\subsubsection{KPERT: kdp k-point calculations}
-Described in section \ref{sec:kpert}, page{\pageref{sec:kpert}}.
-Ref: \cite{mimp}
-
-%%%   END/Daniel   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% METADYNAMICS  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Metadynamics}\label{sec:meta}
-
-These are some notes about the use of the metadynamics (MTD) machinery within CPMD.
-It is just a first version of a manual that I hope will be improved by the comment
-and possibly the contributions of the users of this method.
-
-The metadynamics can run in a standard NVE/NVT MD run or in a NPE/NPT run (variable cell).
-In order to apply the MTD algorithms in CPMD some (not few) lines have to be added in
-the input file.
-These lines are to be in the \&ATOMS .. \&END section and they provide information about
-the kind of MTD to be performed, the choice of collective variables (CV),
-some parameters required to determine the time dependent potential
-and some other options.
-All the MTD input must be between an initial and a final line which are: \\
-{\tt
-METADYNAMICS \\
-$\cdots$ \\
-END METADYNAMICS }\\
-If the initial line contains also the keyword $COLLECTIVE $ $ VARIABLES$,
-the standard MTD, with one single set of CV, is initialized.
-If, instead, the keyword  $MULTI$ is found, more than one MTD are performed
-simultaneously on the same system; therefore, the whole set of CV is constituted
-by $NSUBSYS$ subsets, which are independent one from each other.
-The number of subsystems is given on the same line by writing $NS=$ followed
-by an integer number  (default: 1). Alternatively, if $MULTIPLE$ $WALKERS$ is present in 
-the same line multiple walker metadynamics is preformed using the extended Lagrangian
-metadynamics; number of walkers is read in the same line immediately after $NW=$ (see \ref{sect:mw}).
-Instead, if  $CELL  FULL$ is the
-keyword, the CV are the 6 cell parameters (3 side lengths and 3 angles),
-and the MTD is performed without extended Lagrangian, i.e.
-the contribution coming from $V(t)$ is directly added into the stress
-tensor (see below in {\bf MTD Algorithm}). 
-
-For almost all the input parameters there is a reasonable
-default value, but, since the range of applications of MTD is quite wide, it is likely that
-the default values do not fit your problem. Therefore some effort is required to choose the
-optimal conditions for your run.
-Of course, it is important to know something about MTD before using it. There are some references
-about the method \cite{alaio, iannuzzi, micheletti, gerlaio, michele}, and about some successfull
-applications, as e.g. \cite{andras, gervasio, iannuzzi2, sergey, scwo, ikeda, rna, Nair-jacs-08, mb11}.
-It can be of great help to read about the choices and results obtained by other users.
-But I remark that there are very few general rules that can be held valid for different
-problems and systems.
-
-The method is based on the definition of a manifold of CV as functions of the
-degrees of freedom characterizing your system,
-${\bf S} = \{S_{\alpha}({\bf R},{\bf \phi},{\bf h})\}$, where ${\bf R}$ are the ionic
-degrees of freedom, ${\bf \phi}$ are the electronic wavefunctions, and
-${\bf h}$ defines the cell box.
-The CV which are implemented in the code, have been chosen according to the needs of those
-who used the method up to now. Of course they do not exhaust all the problems, and many more
-CV might be needed in the future. To implement them, once the analytical
-formula and its derivatives are available,
-is not complicated at all. In principle, the implementation should be easy for
-anybody who knows a bit the CPMD code.
-
-\subsubsection{MTD Algorithm}
-Once the CV have bee chosen, the MTD method can be applied in two different fashions. \\
-{\bf Direct MTD:} The simplest approach is to  define the time dependent
-potential as function of ${\bf S}$, $V(t,{\bf S})$, and apply it directly onto
-the involved degrees of freedom. In this case, the equations of motion of the
-dynamic variables of the system, ${\bf R},{\bf \phi},{\bf h}$, will include
-an additional term  in the total forces, due to the contribution of  $V(t,{\bf S})$.
-The disadvantage of this simplified version is that there is scarce control
-on the dynamics in the space defined by the CV (CV-space),
-which is a projection of the space of all the possible configurations.
-In general, we would like to span thoroughly the CV-space, and to acquire
-information about the underlying potential.
-Often, this means that we need a slow dynamics in this space,
-where, for each set of values of the CV, we allow the system to equilibrate
-and to choose the configuration with the highest probability.
-Only in this way we will be able to construct a reasonable probability
-distribution in the configurational space that has been explored and
-consequently we will be able to reproduce the Free Energy surface.    \\
-{\bf Lagrangian MTD:} This formulation is based on the method of the
-extended Lagrangian. In addition to the dynamic variables that
-characterize your system, a new set of variables
-${\bf s}=\{s_{\alpha}\}$ is introduced.
-Each $s_{\alpha}$ is associated to one of the selected $S_{\alpha}$,
-it has a fictitious mass $M_{\alpha}$ and velocity $\dot{s}_{\alpha}$.
-The equations of motion for the $s_{\alpha}$ variables are derived by
-a properly extended Lagrangian, where we add the fictitious kinetic
-energy and the potential energy as a function of ${\bf s}$.
-Therefore the total potential energy includes two new terms,
-a sum of harmonic potentials, which couple the $s_\alpha$
-to the respective $S_{\alpha}({\bf R},{\bf \phi},{\bf h})$,
-$\sum_{\alpha}k_{\alpha}(S_{\alpha}(\cdots)-s_{\alpha})^{2}$,
-and the time dependent potential, which now is a function of ${\bf s}$, $V(t,{\bf s})$.
-The coupling constants $\{k_{\alpha}\}$ and the fictitious masses $\{M_{\alpha}\}$
-are the parameters that determine the dynamics of the $\{s_{\alpha}\}$
-in the CV-space. Please notice that the units of $k$ are Hartree
-divided by the square power of u.s., the characteristic units of the
-specific CV (if CV is a distance it will be $a.u.^2$,
-if an angle $radiants^2$, etc.). In analogy, the units of the
-fictitious mass are $Hartree ((t)/(u.s.))^2$, where $t$ indicates the unit of time.
-Some guide lines on the choice of these parameters will be given in the following paragraphs.
-By choosing the temperture $T_{\bf s}$, the velocities of the components
-of $\bf s$ can be initialized giving via a Boltzmann distribution.
-Moreover, the velocities can be kept in a desired range by the
-activation of a temperature control algorithm (at the moment only the
-rescaling of velocity is  implemented).
-
-\subsubsection{The Shape of $V(t)$}
-Several shapes have been tested (and more might be proposed in the future).
-The default choice is the construction of $V(t)$ by the accumulation of
-Gaussian-like hills, i.e. (within the Lagrangian formulation, but the
-expressions are the same for the direct MTD approach,
-providing to exchange $\bf s$ with ${\bf S(\cdots)}$)
-\begin{eqnarray}
-V(t,{\bf s}) & = & \sum_{t_{i} < t } \Bigg[W_{i}\exp \left \{-
-\frac{({\bf s}-{\bf s}^{i})^{2}}{2 (\Delta s^{\perp})^{2}} \right \} \nonumber \\
- & & \exp \left
-\{-\frac{\left( ({\bf s}^{i+1}-{\bf s}^{i}) \cdot ({\bf s}-{\bf s}^{i})\right)^{2}}
-{2 (\Delta s^{||}_{i})^4} \right\}\Bigg],
-\label{eq: hills}
-\end{eqnarray}
-Here, $t$ indicates the actual simulation time, $i$ counts the metadynamics steps,
-the first exponential gives the hill's shape in the direction perpendicular
-to the trajectory, whereas the second exponential tunes the shape along the trajectory.
-In this form, the width of the hill along the trajectory is determined by
-the displacement in the CV-space, walked between two consecutive metadynamics
-steps, $\Delta s^{||}_{i} = f_{b}\sqrt{\Big[\sum_{\alpha}(s_{\alpha}^{i+1}-(s_{\alpha}^{i})^2\Big]}$.
-$f_b$ is a factor, which is read in input and can be used to change the
-size of the hills along the trajectory, by default it is 1.
-The height $W$ and the width $ \Delta s^{\perp}$ are input parameters that can
-also be tuned during the MTD, in order to better fit the hill shape to the
-curvature of the underlying energy surface (in the CV-space).
-As a rule of thumb,  $ \Delta s^{\perp}$  should have roughly the size of the
-fluctuations of CV at equilibrium (half the amplitude of the well) and $W$
-should not exceed few percents of the barrier's height.
-These information can be obtained by some short MD runs at equilibrium
-(without MTD) and from some insight in the chemical/physical problem at hand.
-Since, in general, different CV fluctuate in wells of different size,
-it is important to define one scaling factor  $scf_{\alpha}$ for each component
-$s_{\alpha}$, so that
-$\langle \delta s_{\alpha}\rangle /scf_{\alpha} = \Delta s^{\perp} \, \forall \alpha$.
-
-Other implemented shapes of $V(t)$ are:\\
-{\bf Shift:} the tails of the Gaussians are cutoffed, by
-setting to zero the Gaussian at a distance $R_{cutoff}\Delta s^{\perp}$
-from its center. In this way the problem of the overlap of the
-tails in regions far from the actual trajectory is reduced. \\
-{\bf Rational:} instead of Gaussian-like hills, some kind of rational functions are used,
-\begin{eqnarray}
-V(t,{\bf s}) & = & \sum_{t_{i} < t } \Bigg[W_{i}
-\frac{1- \left(\frac{\sqrt{({\bf s}-{\bf s}^{i})^{2}}}{\Delta s^{\perp}}\right)^{n}}
-{1- \left(\frac{\sqrt{({\bf s}-{\bf s}^{i})^{2}}}{\Delta s^{\perp}}\right)^{m}}
- \nonumber \\
- & & \exp \left
-\{-\frac{\left( ({\bf s}^{i+1}-{\bf s}^{i}) \cdot ({\bf s}-{\bf s}^{i})\right)^{2}}
-{2 (\Delta s^{||}_{i})^4} \right\}\Bigg],
-\label{eq: hills2}
-\end{eqnarray}
-where the exponents $n$ and $m$ determine the decay. \\
-{\bf Lorentzian:} Lorentzian functions are used in place of Gaussians.
-
-In all the cases, a new hill is added at each step of MTD, where
-$\Delta t _{meta}=t_{i+1}-t_{i}$ is usually chosen equal to $10\div500$
-steps of CP-MD (it depends on the relaxation time of the system and the
-size of the hills).
-The center of the new hill at time $t_{i+1}$ is positioned along the vector ${\bf s} - {\bf s^{i}}$.
-
-
-\subsubsection{Metadynamics Keywords}
-Now let's start with the explanation of the keywords. First, the definition of the CV is required.
-The selected CV are read from the input subsection enclosed between the initial and final lines: \\
-$DEFINE $ $ VARIABLES$ \\
-$\cdots$ \\
-$END $ $DEFINE$ \\
-Between these two lines the first input line states how many CV are used, $NCOLVAR$.
-In the following, each variable is described by one or more lines, according to its type.
-In general, each line must start with the name of the CV, $type-name$,
-followed by some indexes or parameters that are needed to
-specify its analytical function and the kind of atoms or species that are involved.
-At the end, always on the same line of the $type-name$,
-the scaling factor $scf$ and, if the extended Lagrangian is used, $k$ and $M$ can be given.
-If not specified $scf$, $k$ and $M$ take some default values. \\
-{\bf scf:} by default, $scf=1$ and it is fixed during the whole run.
-Otherwise, you can write ${\bf SCF}$ followed by the value, or
-${\bf SCA}$ followed by the value, a lower bound and an upper bound.
-In the latter case, the $scf$ is tuned along the MTD run.
-In practice, the average amplitude of the CV fluctuation is checked every
-time to time, and, if $scf_{\alpha}\cdot\delta s_{\alpha}$ is far from
-$\Delta s^{\perp}$, the $scf_{\alpha}$ is changed accordingly.  \\
-{\bf M:} it determines how fast the $s$ variable spans the entire well.
-Given the width of the well $scf\cdot\Delta s^{\perp}$  and the temperature
-$T_s$, it is possible to choose $M$ by stating the number of complete
-fluctuations per ps. The default value is taken for 10 fluctuation per ps.
-Otherwise, you can write ${\bf MCV}$  followed by the desired value for
-$M$ in $Hartree ((t)/(u.s.))^2/1822 = a.m.u. (a.u./a.s.)^2$. \\
-{\bf k:} it determines the dynamics of $s$ with respect to the dynamics of the
-physical CV. If $S(\cdots)$ is dominated by fast modes,
-it is reccomanded that $s$ be slower and its fluctuations span the entire well.
-Given the characteristic frequencies of the normal modes $\omega_{0}$, $k$ can
-be chosen such that $\sqrt{k/M}< \omega_{0}$. On the other hand,
-we want $k$ big enough, so that $s$ and $S$ stay close, and $S$ fluctuates
-many times at each position in the configuration space.
-By satisfing the latter condition, the average forces due to the
-underlying potential can be accurately estimated, and the trajectory
-lays on the minimum energy path. Therefore, also for $k$, the default
-value is chosen in terms of  $T_s$ and $scf_{\alpha}\cdot\delta s_{\alpha}$
-Otherwise,  you can write ${\bf KCV}$  followed by the desired value. \\
-
-On the same line, by writing {\bf WALL+ } or {\bf WALL-}, some fixed upper
-and lower boundaries
-for the CV can be determined. After the keyword the position of the boundary
-and the value of the constant repulsive force have to be specified.
-
-{\it Warning}: if even only one $k$ or one $M$ is read from input,
-the Lagrangian formulation of the MTD is initialized.
-
-\subsubsection{The Implemented Types of CV}
-Please note, that for calculations using the Gromos
-QM/MM-interface (see section \ref{sec:qmmm}) the atom indices refer
-to the ordering of the atoms as it appears in the respective GROMOS
-coordinate file.
-
-\begin{itemize}
-\item{STRETCH:} Bond stretch: give the indexes of the 2 atoms  $i1$ $ i2$, $s = (d_{i1,i2})^{2}$
-\item{BEND:} Bond angle: give the indexes of the 3 atoms defining the angle, $i1$ $ i2$ $i3$.
-\item{TORSION:} Torsion angle: give the indexes of the 4 atoms
-defining the torsion angle, $i1$ $ i2 $ $i3$ $ i4$.
-\item{DIST:} Distance between two atoms: give the indexes of the 2 atoms $i1$ $ i2$, $s = d_{i1,i2}$.
-\item{DISAXIS:} Distance between two atoms $i1$ and $i2$ along $x$ or $y$ or $z$ direction. $i1$ $i2$ $n$ are
-read next on the same line. Here $n=1$ means $x$, $n=2$ means $y$ and $n=3$ means $z$ coordinate.
-\item{OUTP:} Angle out of plane: give the indexes of the 3 atoms
-defining the plane and a fourth index of the atom for which the
-angle out of plane is computed, $i1$ $ i2 $ $i3$ $ i4$.
-\item{COORD:} Coordination number (CN) of one atom with respect to all the
-other atoms in the system. The CN is defined by a Fermi-like function
-\begin{equation}
- CN_i = \sum_{j \neq i}^{NATOM}\frac{1}{1+e^{k(d_{ij}-d^0)}}
-\end{equation}
-where $i$ is the index of the selected atom, $j$ runs over all the other
-atoms in the system, $k$ is the parameter which determines the steepness
-of the decay and $d^0$ is the reference distance. After the type-name,
-in the same line, give $i$ $k$ $d^0$.
-\item{DIFFER:} Difference between two distances, give the indexes of the 3 atoms
-defining the 2 vectors, $i1$ $ i2 $ $i3$, $s = d_{i1i2}-d_{i2i3}$.
-\item{COORSP:} CN of one selected atom $i$ with respect to only one selected
-species $jsp$. The CN is defined by a Fermi like function as for $COORD$,
-but in this case $j$ runs only over the atoms belonging to the selected
-species $jsp$. After the type-name, in the same line, give $i$ $jsp$ $k$ $d^0$.
-\item{COORGROUP:} Sum of the CN of a group of atoms $A$ with respect to
-individual group of atoms ($B$). CN is estimated using the Fermi function.
-Different cutoff distances are allowed for each type of $A$ atoms.
-\begin{equation}
- CN = \sum_{i}^{N_A}  \sum_{j}^{N_B(i)} \frac{1}{1+e^{k\left[d_{ij}-d^0(i)\right]}}
-\end{equation}
-After the keyword {\tt COORGROUP}, $N_A$ and $k$ should be specified.
-In the next lines should be:\\
- $i$, $N_B(i)$, $d^0(i)$ \\
- \hspace*{1cm}$j(1) \cdots j(N_B(i))$ \\
-This has to be done for all $i$ in list of $A$ type atoms.
-\item{COOR\_RF:} CN of one selected atom $i$ with respect to one selected
-species, $jsp$, or a list of atoms, $j1 \cdots jn_{list}$.
-The CN value is calculated as the sum of rational functions
-\begin{equation}
-CN_i = \sum_{j \neq i}^{n_{list}} \frac{1-\left(\frac{d_{ij}}{d^0}\right)^{p}}
-{1-\left(\frac{d_{ij}}{d^0}\right)^{p+q}},
-\end{equation}
-where j runs over the indexes of the atoms belonging to $jsp$ or over the
-indexes given in the list $j1 \cdots jn_{list}$.
-For the option of the species, you should provide, after the type-name,
-the indexes $i$ and $jsp$, the exponents $p$ and $q$, and the reference
-distance $d^0$ are read. If, instead, the list option is your choice,
-write immediately after the type-name the keyword $INDAT$, and next
-the values of  $i$, $n_{list}$, $p$, $q$, and $d^0$. The indexes of the
-atoms belonging to the list are read from the next line. \\
-If the keyword $2SHELL$ is found, in the same line as $COOR\_RF$, the
-first real number after this keyword is a second reference distance $d_{2sh}$.
-In this case, the functional form of CN is modified, in order to take into
-account only the neighbors belonging to one farther shell, and $d_{2sh}$ is
-the average distance of these atoms from $i$:
-\begin{equation}
-CN_i^{2sh} = \sum_{j \neq i}^{n_{list}} \frac{1-\left(\frac{(d_{ij}-d_{2s})}{d^0}\right)^{p}}
-{1-\left(\frac{(d_{ij}-d_{2s})}{d^0}\right)^{p+q}}.
-\end{equation}
-For the modified CN the exponents must be even.
-
-\item{BNSWT:} Reciprocal CN between 2 selected atoms, defined with the same
-functional form as the one described for $COOR\_RF$.
-This coordinate states the presence of the bond between the two atoms $i$ and $j$.
-After the type-name, give $i$, $j$, $p$, $q$, and $d^0$.
-\item{TOT\_COOR:} Average CN of the atoms belonging to a selected species $isp$
-with respect to a second selected species, $jsp$, or with respect to a given
-list of atoms, $j1 \cdots jn_{list}$.
-The same functional forms and input options are used, as those
-described for $COOR\_RF$, but the index of one selected species $isp$
-is read in place of the index of one atom.
-\item{DISPL1:} Average displacement of one group of species with respect
-to a second group of species, computed along one specified diraction in
-space (lattice axis in crystals).
-This  CV is useful to study diffusion processes in condensed matter.
-If the keyword $MIL$ is found, the 3 Miller indexes, which define the direction
-in space, are read immediately after (default: ${\bf v}=(hkl)=(100)$).
-\item{COORDIS:}
-\item{PLNANG:} Angle between two planes. Each plane is defined by the
-coordinates of 3 atoms; after the type-name, give the indexes of the
-3 atoms defining the first plane, $i1$ $i2$ $i3$, and the indexes
-of the atoms defining the second plane,  $j1$ $j2$ $j3$.
-\item{HBONDCH:}
-\item{DIFCOOR:} Difference between the CN of two different atoms,
-$i1$ and $i2$, with respect to the same species $jsp$, or the same list of
-atoms,$j1 \cdots jn_{list}$.
-The same functional forms and input options are used, as those described for
-$COOR\_RF$, but the index of two selected atoms are read, $i1$ and $i2$,  rather than one.
-\item{RMSD\_AB:} Given two atomic configurations $A$ and $B$, the root mean square
-displacements (RMSD) of the actual configuration from $A$, $rmsdA$, and from $B$,
-$rmsdB$, are calculated (global translation and rotation are subtracted by
-the method of quaternions). The RMSD can be calculated on selected group of species:
-after the type name give the number of species ($NUMSPEC$) and the indexes
-of the selected species ($IS_{1} \cdots IS_{NUMSPEC}$).
-If $NUMSPEC = 0$ all the species are included.
-If in the same line the keyword ${\bf FILEAB}$ is found, next the file name
-is read, where the atomic positions of the configurations $A$ and $B$ are given.
-Otherwise the file name is by default ${\bf STRUCTURE\_AB}$.
-File format: 2 consecutive blocks of $1+NATOM $ lines.
-In each block, the first line is a title (Character) and it is
-followed by the list of atomic coordinates in a.u. ($element\_name \, x \, y \, z$).
-\item{COOR\_CHAIN:} Conditioned CN. Given three species
-$isp1$, $isp2$, and $isp3$, the following average CN is calculated
-\begin{equation}
-CN = \frac{1}{N_{sp1}}\sum_{i1=1}^{N_{sp1}}\left[ \sum_{i2=1}^{N_{sp2}}\left(
-\frac{1-\left(\frac{d_{i1i2}}{d_{12}^0}\right)^{p}}{1-\left(
-\frac{d_{i1i2}}{d_{12}^0}\right)^{p+q}}\times \sum_{i3=1}^{N_{sp3}}
-\frac{1-\left(\frac{d_{i2i3}}{d_{23}^0}\right)^{p}}{1-\left(
-\frac{d_{i2i3}}{d_{23}^{0}}\right)^{p+q}}\right)\right].
-\end{equation}
-After the type-name, the parameters $isp1$, $isp2$, $isp3$, $p$, $q$, $d_{12}^0$,
-and $d_{23}^0$ are read.
-\item{HYDRONIUM:}
-\item{DIS\_HYD:}
-\item{SPIN:} Distance between a selected atom and the center of the spin
-polarization $(\rho_{\uparrow} - \rho_{\downarrow})$, where $\rho_{}$
-indicate the polarized density. The center is located where the difference
-is maximum, and this kind of variable is useful only when some spin
-polarization is present. The position of the center in systems with PBC
-can be calculated by the definition proposed by Resta \cite{resta,berghold}.
-Obviously, this CV can be used only together with $LSD$. After the type-name,
-give the index of the selected atom.
-\item{VOLVAR:} Volume of the cell. It can be used only with NPE/NPT MD.
-\item{CELLSIDE:} Length of one cell's side: give the cell-side's index $i$
-($i_a=1$,$i_b=2$,$i_c=3$).It can be used only with NPE/NPT MD.
-\item{CELLANGLE:} Cell-angle: give the cell-angle's index $i$
-($i_{\alpha}=1$,$i_{\beta}=2$,$i_{\gamma}=3$)). It can be used only 
-with NPE/NPT MD.
-\item{VCOORS}
-This CV represents the coordination of one point (V) with respect to 
-  a selected species of atoms $jspec$ in the system:
-\begin{eqnarray}
-CN^{jspec}_{V}=\sum^{N_{jspec}}_{i\in jspec}{1\over 1 + e^{k(d_{iV}-d_0)}}
-\end{eqnarray}
-After the keyword the parameters $jspec,k,d_0$ are read. In the next line 
-the coordinates of the point $V$ are read in a.u.
-\item{DIPOLE}
-The dipole of the atoms $i_1,...,i_N$ with respect to the atom $j$ is defined as:
-\begin{eqnarray}
-\vec D_j={1\over Q}\sum_{i=i_1,..,i_N}q_i(\vec r_i -\vec r_j);\;\;\; Q=\sum_{i=i_1,..,i_N} q_i
-\end{eqnarray}
-The three spherical coordinates of $\vec D_j $, that is $(\rho_j,\theta_j,\phi_j)$, can be used
-independently as CV. The keywords are {\bf DIPOLERHO}, {\bf DIPOLETHA}, {\bf DIPOLEPHI}. In the same
-line after the keywords are read the index of the atom $j$ and the number $N$ of atoms which
-constitute the dipole.  In the next two lines are read the indexes of the $N$ atoms and the
-corresponding charge $q_i$.    
-\end{itemize}
-
-If $CELL $ $FULL$ is defined in the first line of the MTD input, none of the CV defined above is used.
-The CV are the 6 cell parameters. In the section $DEFINE $ $VARIABLE$,
-the number of CV is 6 and in the following 6 lines the scaling factors are given:
-for each line write the index $i$ of the corresponding CV
-($i_a=1$,$i_b=2$,$i_c=3$,$i_{\alpha}=4$,$i_{\beta}=5$,$i_{\gamma}=6$)
-followed by $SCF$ or $SCA$ and the desired values
-(see the description at the beginning of this subsection).
-
-\subsubsection{Other Keywords}
-\begin{itemize}
-\item{ANALYSIS:} A standard MD run is performed, where the equations of motions are not
-affected by the hills-potential or the coupling potential.
-The selected CV are monitored and the values are reported in the
-output file, after every 10 MD steps.
-This option is useful in order to observe the behavior of the selected CV in equilibrium conditions.
-With this option only two output files are written: {\it istvar\_mtd}, and {\it enevar\_mtd} (see section 
-\ref{sub:outmtd}). The former file contains the values of the $S_{\alpha}$ and their averages in time.
-
-\item{METASTEPNUM:} The maximum number of MTD steps is read from the
-next line,\\$I\_META\_MAX$ (default: 100).
-
-\item{META\_RESTART:}
-To restart a metadynamic's run from where the former run has stopprd, one can use this keyword, and write in the 
-following line, the number of meta-steps completed already $I\_META\_RES$ (default: 0).
- Beware that for restarting the MTD in this way, the output
-files of the previous run are to be available in the run's directory and must contain a number
-of lines at least equal to the $I\_META\_RES$.
-From this files the previous history of the MTD is read and the MTD is initialized accordingly. \\
-Otherwise, it is possible to restart from the restart file of the MTD, $MTD\_RESTART$.
- This is an unformatted file, which is written whenever the standard CPMD restart file, $RESTART.1$, is also written.
-It contains the number of meta-steps already performed, the number of CV used in the previous run and the information 
-about the position and the size of the hills which have been already located.
-To restart the MTD from this file,  the same keyword is used, and the keyword $RFILE$ is added in the same line, 
-providing that the unformatted restart file is available in the run's directory.
-In this second case the number of performed meta-step is not read from the input file but from the restart file \\.
-Obviously, when a run is restarted, the same number and the same kinds of CV must be used. However masses, force 
-constants, scaling factors, and the width and height of the hills can be changed.
-
-\item{MINSTEPNUM INTERMETA:} The minimum number of MD steps between two
-MTD steps (in general, the MTD step is characterized by the positioning
-of a new hill in the CV-space) is read from the next line,
-$INTER\_HILL$ (default: 100). This is a lower bound because,
-before the construction of a new hill, the displacement in the
-CV-space is checked, and the new step is accepted only if the
-calculated displacement is above a given tolerance.
-
-\item{MOVEMENT CHECK:} The tolerance for the acceptance of a
-new MTD step is read from the next line (default:  0.001D0)
-
-\item{CHECK DELAY:} The number of MD steps to be run, before a
-new check of the displacement is done, is read from the following line (default: 20).
-
-\item{MAXSTEPNUM INTERMETA:} The maximum number of MD steps that can be run,
-before a new MTD step is accepted anyway, is read from the following line (default: 300).
-
-\item{METASTORE [NO TRAJECTORY]:}
-In the following line, three integer numbers are given,
-which indicate respectively how often (in terms of MTD steps)
-the $RESTART.1$ and the $MTD\_RESTART$ files are over-written (default: 50),
-how often the trajectory files are appended (default: 1),
-and how often a quench of the electronic wavefunctions onto the
-BO surface is performed (default: 10000).
-With the additional flag NO TRAJECTORY, the trajectories are
-still written according to the settings as indicated by the
-\refkeyword{TRAJECTORY} keyword in the \&CPMD section. The selection
-of the files (e.g. turning on TRAJEC.xyz via the XYZ flag and turning
-TRAJECOTORY off via a negative value of NTRAJ in combination with
-the SAMPLE flag) is always honored.
-
-\item{MAXKINEN:} From the following line, the maximum electronic
-kinetic energy is given, above which a quench of the
-electronic wavefunctions onto the BO surface is performed
-anyway (by default no quench is done whatever is the kinetic energy).
-
-\item{LAGRANGE TEMPERATURE:} The temperature $T_s$ used to initialize
-the velocities of the ${\bf s}$ CV is read from the next line.
-By default $T_s$ is chosen equal to the temperature of the ions,
-the units are Kelvin. Notice that this keyword causes the
-initialization of the Lagrangian formulation of MTD.
-
-\item{LAGRANGE TEMPCONTROL:} The control of the $T_s$ is activated,
-and the rescaling velocities algorithm is used.
-The average temperature and the permitted range of variation are
-read from the next line. By default $T_s$ is not controlled.
-Notice that this keyword causes the initialization of the extended degrees of freedom of the Lagrangian formulation of MTD. 
-
-\item{LAGRANGE LANGEVIN:} Performs Langevin dynamics for the Lagrangian 
-formulation of MTD. In the next line the Temperature (Kelvin) and the
-friction $\gamma$ (a.u.) are read. The Langevin equation in its standard 
-form writes ($z$ is a CV): 
-\begin{eqnarray}
-M\ddot z=F(z)-\gamma M \dot z+\sqrt{2k_BT\gamma M}\eta(t) 
-\end{eqnarray}
-where $M$ is the CV mass, $F$ a generic force field, $\gamma$ the friction
-coefficient, $T$ the temperature and $\eta$ is a white noise. The integration
-algorithm is a Velocity-Verlet which can be written as:
-\begin{eqnarray}
-& & \dot z_{n+1/2}=\dot z_n+{1\over 2}dt\Big[{F(z_n)\over M}-\gamma\dot z_n\Big]+{1\over2}\sqrt{2k_BT\gamma dt\over M}\xi_n\nonumber \\
-& & z_{n+1}=z_n+\dot z_{n+1}dt\nonumber \\
-& & \dot z_{n+1}=\dot z_{n+1/2}+{1\over 2}dt\Big[{F(z_{n+1})\over M}-\gamma\dot z_{n+1/2}\Big]+{1\over2}\sqrt{2k_BT\gamma dt\over M}\xi_n
-\end{eqnarray}
-the $\xi_n$ are independent Gaussian random numbers with mean zero and 
-variance one.
-
-\item{HILLS:} With this keyword it is defined the shape of $V(t)$.
-If $OFF$ is read in the same line, no hill potential is used.
-The default hills' shape is the Gaussian-like one described above.
-If $SPHERE$ is read from the same line, the second exponential term in equation \ref{eq: hills}
-is not applied. i.e., a normal Gaussian function rather than a Gaussian tube formalism is used.
-If, instead, $LORENZIAN$ is read in the same line as $HILLS$,
-Lorentzian functions are used in place of Gaussians. If, instead,
-$RATIONAL$ is read in the same line as $HILLS$, the rational function
-described in the previous section is used; in this case, if $POWER$ is read,
-the exponents $n$ and $m$, and the boosting factor $f_b$ are also
-read immediately after (defaults: $n=2$, $m=16$, $f_b=1$).
-If, instead, $SHIFT$ is read on the same line as $HILLS$,
-the shifted Gaussians are used, where the tails after a given
-cutoff are set equal to zero; in this case, if $RCUT$ is read,
-the cutoff $rshift$ and the boosting factor $f_b$ are also read
-immediately after (defaults: $rshift = 2$,$f_b=1$). \\
-In all this cases, if the symbol $=$ is read in the same
-line as $HILLS$, the perpendicular width $\Delta s^{\perp}$
-and the height $W$ are read immediately after (defaults:
-$\Delta s^{\perp} = 0.1 \, u.s.$, $W = 0.001 \, Hartree$).
-
-\item{TUNING HHEIGHT:} With this keyword the height of the hills is
-tuned according to the curvature of the underlying potential.
-If the symbol $=$ is read in the same line as $TUNING$ $ HHEIGHT$,
-the lower and upper bounds of $W$ are read immediately after
-(defaults: $W_{min}=0.0001 \, Hartree$, $W_{max}=0.016 \, Hartree$).
-
-\item{HILLVOLUME:} With this keyword the volume of the hills,
-$\sim W\cdot (\Delta s^{\perp})^{NCOLVAR} $, is kept constant
-during the MTD run, i.e. when the height changes due to the
-tuning (see the previous keyword), the width is changed accordingly.
-This option is can be used only if the tuning of the hills' height is active.
-
-\item{CVSPACE BOUNDARIES:} With this keyword the confinement of the
-CV-space is required, in the direction of a selected group of CV.
-The number of dimensions of the CV-space, in which the confinement
-is applied, is read from the next line, $NUMB$ (default: 0).
-The following $NUMB$ lines describe the type of confinement.
-For each line the following parameters are required: index of the
-CV (as from the list given in the definition of the CV),
-the strength of the confinement potential $V_{0}$ in Hartree, two real numbers,
-$C1$ and $C2$, that determine from which value of the CV the
-confining potential is active. Finally, if the keyword $EPS$
-is read in the same line, the real number, which is read
-immediately after, determines how smoothly the confining
-potential is switched on (default $\varepsilon = 0.01$).
-The confining potential can be used with the following CV: \\
-DIST: $V_{conf} = V_{0}\left(\frac{s_{\alpha}}{C1}\right)^{4}$
-and it becomes active only if $s_{\alpha} > C2$. \\
-DIFFER:  $V_{conf} = V_{0}\left(\frac{\vert s_{\alpha}\vert}{C1}\right)^{4}$
-and it becomes active only if $s_{\alpha} > C2$ or $s_{\alpha} < -C2$ . \\
-Coordination numbers: if $(CN-\varepsilon) < C1$, $V_{conf} =
-V_{0} (\frac{C1}{CN})^{10}$, if $(CN+\varepsilon) > C2$,
-$V_{conf} = V_{0} (\frac{CN}{C2})^{10}$.
-
-\item{RESTRAIN VOLUME:} With this keyword a confining potential is
-applied to the volume variations. The option can be used only in
-combination with the NPE/NPT MD. From the next line, the following parameters are
-required: $f_{min}$, $f_{max}$, and $V_0$. The factors $f_{min}$ and $f_{max}$
-multiplied by the initial volume of the cell, give, respectively,
-the lower and upper bounds for the volume, whereas $V_0$ gives the
-strength of the confining potential.
-
-\item{MULTI NUM:} his keyword should be used when a multiple set of
-MTD runs are performed simultaneously on the same system. Here the
-number of separated sets CV for each subsystem has to be given in
-the following line, $NCVSYS_1 \cdots NCVSTS_{NSUBSYS}$.
-This means that the first $NCVSYS_1$ CV, in the list of those
-defined in the $DEFINE $ $ VARIABLES$ section, will belong to
-the first subset, the next  $NCVSYS_2$ to the second,  and so on.
-This option is implemented only together with the extended
-Lagrangian formulation.
-
-\item{MONITOR: } This keyword requires that an additional monitoring of the values
-of the CV is performed along the MD trajectory. This means that the values are written
-on an output file every {\it WCV\_FREQ} MD steps, even if no hill is added at that step.
-The frequency for updating the file is read from the following line, the file name is
-{\it cvmdck\_mtd}, and it is not created if this option is not activated.
-
-\item{RANDWALK: } In the case of multiple walker metadynamics, collective variables of
-all walkers are initialized with different random velocities. 
-
-\end{itemize}
-
-\subsubsection{Output files}
-\label{sub:outmtd}
-During a run of MTD, several output file are updated at each MTD step,
-which are characterized by the extension $\_mtd$. These files contain
-the history of the MTD, the parameters giving the additional potential,
-and other information that can be useful during the analysis of results.
-The first column for all these files is the CPMD step number (NFI) that
-corresponds to this MTD step.
-In the case of $MULTI$ MTD some of the files have a further extension
-$\_s\#$, which indicates the related subsystem.
-
-Extended Lagrangian MTD: \\
-{\it istvar\_mtd}: the first $NCOLVAR$ columns are the $S_{\alpha}(\cdots)$,
-the next $NCOLVAR$ columns are differences $S_{\alpha}(\cdots) - s_{\alpha}$. \\
-{\it colvar\_mtd}: the first $NCOLVAR$ columns are the $s_{\alpha}$,
-the next $NCOLVAR$ columns are the corresponding scaling factors
-$scf_{\alpha}$. \\
-{\it parvar\_mtd}: norm of the total displacement in the CV-space,
-$\Delta s^{||}$, hill's width, $\Delta s^{\perp}$, hill's height, $W$. \\
-{\it disvar\_mtd}: the first $NCOLVAR$ columns are the displacements
-of the $s_{\alpha}$, the next $NCOLVAR$ columns are their diffusivities,
-the final $NCOLVAR$ columns are the coupling constants, $k_\alpha$. \\
-{\it velvar\_mtd}: the velocities of the $s_{\alpha}$. \\
-{\it forfac\_mtd}: the first $NCOLVAR$ columns are the forces
-coming from the coupling potential (sum of harmonic terms, $V_{harm}$),
-the next $NCOLVAR$ columns are the forces coming from $V(t)$,
-the last $NCOLVAR$  are the forces coming from the confining potential. \\
-{\it enevar\_mtd}: ions temperature, electrons kinetic energy,
-${\bf s}$ CV temperature $2 K_{\bf s}/(NCOLVAR k_{B})$,  $V_{harm}$,
-$V(t)$ at the actual position in CV-space, KS energy
-$E_{KS}$, $E_{tot}+ K_{s} + V_{harm}$, $E_{tot}+ K_{s} + V_{harm} + V(t)$.
-{\it cvmdck\_mtd}:  monitoring o the CV along the MD trajectory. This file
-is updated every {it WCV\_FREQ} MD steps (see previous section {\it MONITOR})
-
-Direct MTD: \\
-{\it colvar\_mtd}: the first $NCOLVAR$ columns are the $s(\cdots)_{\alpha}$,
-the next $NCOLVAR$ columns are the corresponding scaling factors
-$scf_{\alpha}$. \\
-{\it sclvar\_mtd}: the first $NCOLVAR$ columns are the scaled
-$s(\cdots)_{\alpha}$, the next $NCOLVAR$ columns are the corresponding
-scaled diffusivities. \\
-{\it parvar\_mtd}: norm of the total displacement in the CV-space,
-$\Delta s^{||}$, hill's width, $\Delta s^{\perp}$, hill's height, $W$. \\
-{\it disvar\_mtd}: the first $NCOLVAR$ columns are the displacements of
-the $s_{\alpha}$, the next $NCOLVAR$ columns are their diffusivities,
-the final $NCOLVAR$ columns are the coupling constants, $k_\alpha$. \\
-{\it forfac\_mtd}: the first $NCOLVAR$ columns are the forces coming
-from $V(t)$, the last $NCOLVAR$  are the forces coming from the
-confining potential. \\
-{\it enevar\_mtd}: ion temperature, electrons kinetic energy,
-$V(t)$ at the actual position in CV-space, KS energy $E_{KS}$, $E_{tot}+ V(t)$.
-
-\subsubsection{Using multiple walker metadynamics}
-\label{sect:mw}
-
-Multiple walker metadynamics is activated using the $MULTIPLE$ $WALKER$ keyword
-in the initial input line of metadynamics (i.~e., after $METADYNAMICS$ keyword).
-%
-Multiple walker using the extended Lagrangian metadynamics in combination with
-the Car--Parrinello type of dynamics is only implemented at the moment.
-%
-From the same line of $MULTIPLE$ $WALKER$ keyword, the number of walkers (NWALK)
-is read as $NW=NWALK$ (without any space in between).
-
-$NWALK$ replicas are created, and for each DFT forces and energy calculations are done
-independently.
-%
-However, all the replicas fill the same free energy surface encompassed
-by the set of reaction coordinates specified~\cite{Raiteri05}.
-%
-Implementation is done in such a way that each replica belongs to a different processor
-group,and each processor group is able to perform independent DFT calculations in parallel;
-if $NPROC$ number of processors are used, each replica is using $NPROC/NWALK$
-number of processors~\cite{Nair-inside-08} for computations.
-%
-See the output file for the details on the division of processors in to corresponding processor groups.
-%
-Note that output of all the walkers are currently dumped in to the (same) standard output file.
-%
-Trajectory, geometry and energy files of each walkers are separately written out
-in files having their usual names augmented with \_$IWALK$, where $IWALK$ is the walker ID.
-
-
-If a multiple walker run has to be started from a single restart file, copy or link it
-$NWALK$ times as RESTART\_1, $\cdots$ RESTART\_$NWALK$ (similarly the MTD\_RESTART file,
-if is also restarted).
-%
-In the procedure of creating new walkers, like above from one restart or increasing walker numbers
-during the run, it is advised to initially run with zero hill height, still keeping all the biasing
-potentials accumulated upto then (i.\,e.  restarting from the MTD\_RESTART file if any previous
-metadynamics runs have been done), and use $RANDWALK$ keyword until the (all) walkers are far apart
-(at least 1.5 x hill width) from each other.
-%
-In the following (restart) run, use the required hill height and remove the $RANDWALK$ keyword.
-%
-Note that the frequency of adding hills will be nearly $NMTD/NWALK$ if $NMTD$ is the number
-of MD steps required to add a hill using 1 walker.
-%
-Thus consider decreasing the $MINSTEPNUM$ $INTERMETA$ appropriately.
-%
-However, it is highly recommended to use the adaptive metadynamics time step using $MOVEMENT$ $CHECK$
-keyword, and the tolerance is typically 1.5 times the hill width parameter~\cite{Nair-jacs-08}; better
-set the $CHECK$ $DELAY$ to 1.
-%
-Displacement tolerance are also forced to satisfy between the walkers when $MOVEMENT$ $CHECK$ is used.
-%
-Note that it is possible to decrease the number of walkers, in a straight forward manner during a
-restart run.
-%
-
-\subsubsection{Shooting from a Saddle}
-Once one reactive trajectory has been found, one may want to
-determine more precisely the position of the transition state region.
-A standard way to do this is to select some points along the trajectory,
-and, by shooting with random velocities a new MD from this point,
-measure the probability to reach the surrounding basins of
-attraction \cite{chandler}.
-The different basins of attraction can be identified by different
-values of a selected  set of CV. One can say that the trajectory
-has fallen in one of the known basins when all the actual CV values
-satisfy the values characterizing that basin, within a certain tolerance.
-Given a set of coordinates, one can start a CPMD run where this check
-is iterated as many times as you like, in order to establish the
-committor distribution.The search for the saddle point region is
-                initialized when in the section \&ATOMS \&END of the input file,
-the keyword $SADDLE$ $POINT$ is found.
-In what follows, a subsection for the description of the selected CV
-is required. It has the same format as the one used for the MTD run.
-\subsubsection{Keywords}
-The list of keyword regarding the shooting needs to be ended by the line \\
-$END$ $SADDLE$ \\
-Other keywords are:
-\begin{itemize}
-\item{KNOWN\_MINIMA} The values of the CV, which characterize the
-known basin of attraction, are read from the following lines. The
-first line after the keyword contains the number of the known
-minima $NCVMIN$. The next $NCVMIN$ lines contain the set of
-values for each of these minima. The list of the values must
-keep the same order used in the definition of the CV.
-If on the same line as $KNOWN\_MINIMA$, the keyword $EXTENDED$ is
-also found, each line contains $NCOLVAR$ more entries, which are
-the tolerances for the acceptance  of the corresponding minimum
-configuration  (the order of the tolerances must be the same as
-the one for the CV values). By using the $EXTENDED$ keyword,
-each minimum configuration can be accepted with different tolerances.
-\item{SADDLE TOLERANCES} If the $EXTENDED$ keyword is not used, one
-single set of tolerances (one for each CV) can be given by using
-this keyword. The tolerances are read from the next line in the
-same order used for the CV definition.
-Otherwise, default values are assigned at each tolerance.
-\item{MAXSEARCH} The maximum number of trials, where a new MD trajectory
-is generated, is read from the next line. At each trial, the MD starts
-from the same initial coordinates, whereas the initial velocities are
-randomly generated at every new restart.
-During one trials, every $NSTEP$ the actual values of the CV are checked
-and compared to the values given for the known minima. If all the
-values of one of these minima are satisfied within the given
-tolerances, the MD is stopped and restarted for the next trial.
-\item{STEPCHECK}  The number of MD steps between two consecutive
-checks is read from the next.
-\item{MAXCHECKS}  The maximum number of checks for each trial is
-read from the next line.
-\end{itemize}
-%---------------------------------------------------------------------
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\subsection{Restricted Open-Shell Calculations}\label{hints:roks}
-
-Molecular dynamics simulations in the first excited state can be performed using Restricted Open-Shell Kohn-Sham (ROKS) 
-theory \cite{Frank98}. The keyword \refkeyword{ROKS} in the \&CPMD section defaults to the first excited singlet state.
-Solving open-shell equations is not simple unless
-\begin{enumerate}
-\item a high-spin state is computed.
-\item the two singly occupied molecular orbitals (SOMOs) have different spatial symmetry. 
-\end{enumerate}
-In these two cases the Goedecker-Umrigar-Algorithm (GOEDECKER) may be used
-which shows the best convergence properties and is applicable in connection
-with Car-Parrinello molecular dynamics.
-Otherwise it is necessary to use a modified variant of the Goedecker-Umrigar-Algorithm and to do Born-Oppenheimer molecular dynamics (unless you know what you are doing).
-In almost all cases,
-the default algorithm (DELOCALIZED) is applicable, whereas
-for example some dissociation reactions require the localized variant to enable localization of the orbitals on the fragments.
-\begin{verbatim}
-      ROKS LOCALIZED
-\end{verbatim}
-In order to make sure that the chosen algorithm works for a certain system, the conservation of energy
-during a molecular dynamics simulation and the shape of the orbitals should always be checked.
-One of the SOMOs should have the same nodal structure
-as the HOMO obtained by a ground state calculation. If using the unmodified Goedecker-Umrigar scheme
-(GOEDECKER), the energy of the singlet may collapse to approximately the triplet energy if the two
-SOMOs do not have different symmetries. The triplet energy can be calculated by specifiying
-\begin{verbatim}
-       ROKS TRIPLET
-\end{verbatim}
-or also
-\begin{verbatim}
-       ROKS TRIPLET GOEDECKER
-\end{verbatim}
-
-See the description of the keywords \refkeyword{LOW SPIN EXCITATION}, \refkeyword{LSE PARAMETERS} and \refkeyword{MODIFIED GOEDECKER} for a description of how to do ROKS calculations using the older input LOW SPIN EXCITATION ROKS.
-ROKS GOEDECKER corresponds to LOW SPIN EXCITATION ROKS whereas ROKS DELOCALIZED corresponds to LOW SPIN EXCITATION ROKS with MODIFIED GOEDECKER. Do not use LOW SPIN EXCITATION in the \&SYSTEM section and ROKS in the \&CPMD section at the same time.\\
-
-ROKS is not implemented with Vanderbilt pseudopotentials.\\
-
-A Slater transition-state density between a singlet ground state and the
-first excited singlet state (or any pair of states described with ROKS) can
-be useful whenever one set of Kohn-Sham states is required which is equally
-well suited for each of the states involved in a transition, e.g., to calculate
-the couplings between the electronic transition and an external influence.
-This method is analogous to state-averaged multiconfigurational SCF
-methods and shares many of their benefits with them.
-In CPMD, it can be used to calculate non-adiabatic couplings between singlet
-states~\cite{nonadiabatic,lsets}, see options \refkeyword{COUPLINGS}.
-
-\subsection{Hints on using FEMD}
-
-  There are several parameters which crucially affect the speed, accuracy and
-robustness of the FEMD method. These are related to: LANCZOS PARAMETERS, STATES
-and ANDERSON MIXING. Less crucially, the ELECTRON TEMPERATURE.
-
-
-\subsubsection{Lanczos Parameters}
-\label{hints:lanczos}
-
-Several parameters related to the Lanczos ( Friesner-Pollard)
-method are given. Generically:
-\begin{verbatim}
-             LANCZOS PARAMETER [N=n]
-                ncycle  nkrylov  nblock  tolerance
-                drhomax(2)    tolerance(n)
-                  .....
-                  .....
-                drhomax(n)    tolerance(n)
-\end{verbatim}
-$Ncycle$ can always be safely set to 50. Similarly, $Nkrylov=8$ is almost
-always a good choice. Exceptionally, for certain d-metallic systems, increasing
-$nkrylov=16$ may be more efficient. $Nblock$ is the dimension of the blocking
-in the evaluation of $H[\psi_1,...,\psi_{nblock}]$. $Nblock$ should be a
-divisor of $NSTATE$ and recommended values lie in the range of 20-100. The
-$tolerance$ specifies the accuracy to be achieved in the Lanczos method. States
-are considered converged if
-\begin{equation}
-   |H\psi-\epsilon\psi|^2 < tolerance
-\end{equation}
-For efficient calculations, the tolerance should vary according to closeness to
-self-consistency ( as measured by DRHOMAX). During initial stages of the SC
-cycle, the tolerance can be loose, gradually tightening until close to SC it is
-high. An example of this might be:
-\begin{verbatim}
-             LANCZOS PARAMETER N=5
-                50  8  20 1.D-9
-                0.05      1.D-11
-                0.01      1.D-13
-                0.0025    1.D-16
-                0.001     1.D-18
-\end{verbatim}
-For accurate forces, a final tolerance of at least 1.D-16 is recommended,
-although accurate energies can be got using a lower tolerance. It is worth
-experimenting how best to tighten the tolerance - it could be system dependent.
-
-\subsubsection{Other important FEMD parameters}
-
-  The keyword STATES defines the dimension of the subspace used in the
-diagonalization. STATES must be greater than or equal to $N_{el}/2$, but it is
-generally good to allow for a number of more or less empty bands (usually 10\%
-or so). Finally, ANDERSON MIXING determines the rate of convergence to
-self-consistency. Properly chosen the convergence can be very fast. Typically
-for bulk systems we use values between 0.2-0.5, smaller values being necessary
-for large systems. For metallic surfaces, small values are necessary (
-typically 0.03-0.05).
-
-  If using k-points, then it is usually a good idea ( and this is done by
-default if using MONKHORST PACK k-points) to exploit symmetries. In this case,
-however, beware of including the POINT GROUP keyword to symmetrise properly the
-density. Finally, if starting from a high-symmetry structure, you may
-nevertheless want to use the full k-point mesh ( apart from time-inversion
-symmetry related k-points), and in this case specify the keyword FULL.
-
-
-\subsection{The Davidson analysis and the shared electron number}\label{hints:pop}
-  The calculation of the shared electron number can have the following input
-section:
-\begin{verbatim}
- &PROPERTIES
-   PROJECT WAVEFUNCTION
-   POPULATION ANALYSIS MULLIKEN DAVIDSON 2-CENT 3-CENT
-     4
-     1
-   WAVEFUNCTION LATEST
- &END
-\end{verbatim}
-Note, that for the hydrogen it is enough to specify one atomic orbital to
-project on, for the elements Li to Ne it is sufficient to specify
-4 atomic orbitals.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% CDFT and FO-DFT documentation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{CDFT Theory}\label{sec:CDFT_FO-DFT}
-We implemented the constrained DFT (CDFT) method as developed by Wu and van Voorhis \cite{Wu05,Wu06jcp,Wu06jctc,Wu06jpca,Wu07}.
-
-\subsubsection{The density constraint}
-Here, one imposes a scleronomic constraint on the electron density to reproduce a certain charge distribution on the atoms,
-\begin{equation}
-\int w(\mathbf{r}) \rho(\mathbf{r})\; d\mathbf{r}-N_\text{c}=0,
-\end{equation}
-with $\rho(r)$ being the electron density $w(r)$ the weight and $\text{N}_\text{c}$ the constraint value.
-The new energy functional:
-\begin{equation}
-W[\rho,V]=E[\rho]+V (\int w(\mathbf{r}) \rho(\mathbf{r})\; d\mathbf{r}-N_\text{c}),
-\end{equation}
-with $E[\rho]$ being the normal Kohn-Sham energy functional.
-
-\subsubsection{The weight}
-We chose the Hirshfeld partitioning scheme \cite{Hirshfeld77} in order to define charges. The weight for imposing a charge difference between a donor $D$ and an acceptor $A$ is then given by:
-\begin{equation}
-w(\mathbf{r})=\frac{\sum_{i \in D} \rho_i(\mathbf{r}-\mathbf{R}_i)-\sum_{i \in A} \rho_i(\mathbf{r}-\mathbf{R}_i)}{\sum_{i=1}^{N} \rho_i(\mathbf{r}-\mathbf{R}_i)},
-\end{equation}
-where the sums in the numerator range over all donor and acceptor atoms, respectively, whereas the sum in the denominator ranges over all $N$ atoms. $\rho_i(r)$ is the unperturbed electron density of atom $i$ which is given by
-\begin{equation}
-\rho_i(r)=\sum_j n_j \frac{\vert \psi_i^j(r)\vert^2}{r^2},
-\end{equation}
-where the sum ranges over all orbitals and $\psi_i^j(r)$ and $n_j$ denote the reference orbitals and $n_j$ their occupation number, respectively.
-
-\subsubsection{Constraint forces}
-Using the Hellmann-Feynman theorem we can express forces on atom $k$ at position $R_k$
-\begin{equation}
-\frac{\partial W}{\partial \mathbf{R}_k}=\langle \psi\vert \frac{\partial \hat{H}}{\partial \mathbf{R}_k}\vert \psi\rangle.
-\end{equation}
-Applying this relation we can calculate the additional forces due to the bias potential:
-\begin{eqnarray}
-\mathbf{F}_{\text{Bias},k}= - V \int \rho(\mathbf{r})\frac{\partial w(\mathbf{r}-\mathbf{R}_k)}{\partial \mathbf{R}_k}\;d\mathbf{r},
-\end{eqnarray}
-with 
-\begin{equation}
-\frac{\partial w(\mathbf{r}-\mathbf{R}_k)}{\partial \mathbf{R}_k}=-\frac{\rho_k^\prime(\vert\mathbf{r}-\mathbf{R}_k\vert)}{\sum \rho_i(\vert\mathbf{r}-\mathbf{R}_k\vert)} G_k(\mathbf{r}-\mathbf{R}_k)
-\end{equation}
-
-\begin{eqnarray}
-G_k(\mathbf{r}-\mathbf{R}_k) = \left\lbrace
-\begin{array}{l c r}
-w(\mathbf{r}-\mathbf{R}_k)-1 & & k \in D\\
-w(\mathbf{r}-\mathbf{R}_k)+1 & & k \in A\\
-w(\mathbf{r}-\mathbf{R}_k) & & k \not\in D\cup A\\
-\end{array}\right.
-\end{eqnarray}
-Finally the derivative of $\rho_i$ is given by
-\begin{eqnarray}
-\rho_k^\prime(\vert\mathbf{r}-\mathbf{R}_k\vert)&=&\frac{\partial\rho_k(\vert\mathbf{r}-\mathbf{R}_k\vert)}{\partial\mathbf{R}_k}= \frac{\partial\rho_k(\vert\mathbf{r}-\mathbf{R}_k\vert)}{\partial \vert\mathbf{r}-\mathbf{R}_k\vert}\frac{\partial\vert\mathbf{r}-\mathbf{R}_k\vert}{\partial\mathbf{R}_k},\nonumber\\
-&=& \frac{\partial\rho_k(\vert\mathbf{r}-\mathbf{R}_k\vert)}{\partial \vert\mathbf{r}-\mathbf{R}_k\vert}\frac{\mathbf{r}-\mathbf{R}_k}{\vert\mathbf{r}-\mathbf{R}_k\vert}.
-\end{eqnarray}
-The radial partial derivative $\rho_i$ of is finally calculated numerically using splines.
-
-For a more thorough treatment of the topic of constrained DFT MD please consult reference \cite{Oberhofer09}.
-
-\paragraph{Cutoff correction}
-In order to avoid integrating over every real space gridpoint we introduced a cutoff $R_c$ in the generation of the weights. $R_c$ is chosen for each atom species such that the total reference density is smaller than $10^{-6}$. 
-
-The action of the cutoff can be described by a Heaviside function $\theta$
-\begin{equation}
-\rho_k(\vert\mathbf{r}-\mathbf{R}_k\vert)\rightarrow\rho_k(\vert\mathbf{r}-\mathbf{R}_k\vert)\theta(R_c-\vert\mathbf{r}-\mathbf{R}_k\vert).
-\end{equation}
-Therefore the derivative of the reference density becomes
-\begin{equation}
-\rho_k^\prime(\vert\mathbf{r}-\mathbf{R}_k\vert)\rightarrow\rho_k^\prime(\vert\mathbf{r}-\mathbf{R}_k\vert)\theta(R_c-\vert\mathbf{r}-\mathbf{R}_k\vert)+\rho_k(\vert\mathbf{r}-\mathbf{R}_k\vert)\delta(R_c-\vert\mathbf{r}-\mathbf{R}_k\vert),
-\end{equation}
-with the Dirac $\delta$ function. Thus the full force splits up into 
-\begin{equation}
-\mathbf{F}_{\text{Full},k}=\mathbf{F}_{\text{Bias},k}+\mathbf{F}_{\text{Bound},k}.
-\end{equation}
-Here $\mathbf{F}_{\text{Bound},k}$ denotes forces due to the finite cutoff. They can be expressed by the following surface integral in spherical coordinates
-\begin{eqnarray}
-\mathbf{F}_{\text{Bound},k}=-V_c \rho_k(R_c) R_c \int \frac{\rho(R_c,\vartheta,\varphi)G(R_c,\vartheta,\varphi)}{\sum \rho_i(R_c,\vartheta,\varphi)}R_c
-\left(
-\begin{array}{c}
-\sin\vartheta\cos\varphi\\
-\sin\vartheta\sin\varphi\\
-\cos\vartheta
-\end{array}
-\right)\sin\vartheta \;d\vartheta d\varphi
-\end{eqnarray}
-As we do have a cartesian grid we need to perform the integral as an integral over a thin shell in
-real space. $R_c$ times the vector is just the position vector of a point on the surface $(x,y,z)$
-and the surface element can be expressed in cartesian coordinates as \begin{equation}
-\sin\vartheta\;d\vartheta d\varphi = \sgn(z) \frac{y\;dx dz-x\;dy dz}{R_c(R_c^2-z^2)}
-\end{equation}
-
-\subsubsection{Transition Matrix Element calculation}
-The following technical description of CDFT matrix element calculations can also be found, together with some test calculation and an investigation of the influence of the choice of the weight function on the results, in ref.~\cite{Oberhofer10acie}.
-
-In order to calculate the electronic transition matrix element we first need to calculate two constrained wave functions $\phi_A$ and $\phi_B$ and write down the Hamiltonian in the non-orthogonal constrained basis spanned by these two states. 
-
-\paragraph{Hamiltonian in the non-orthogonal constrained basis}
-\begin{equation}
-\mathbb{H}_\text{no}=\left(\begin{array}{c c} H_{BB} & H_{BA}\\ H_{AB} & H_{AA}\end{array}\right),
-\end{equation}
-where $A$ and $B$ denote the two states, respectively. Here the diagonal elements are just given by the respective energies of donor and acceptor due to:
-\begin{eqnarray}
-H_{BB}&=&\langle \phi_B \vert H \vert \phi_B \rangle=E_B \\
-H_{AA}&=&\langle \phi_A \vert H \vert \phi_A \rangle=E_A,
-\end{eqnarray}
-while the off-diagonal elements are determined by:
-\begin{eqnarray}
-H_{BA}&=&F_B \langle \phi_B \vert \phi_A \rangle -V_c^B \langle \phi_B \vert W\vert \phi_A \rangle\\
-&=& F_B S_{BA} -V_c^B W_{BA}\\
-H_{AB}&=&F_B S_{AB} -V_c^A W_{AB}.
-\end{eqnarray}
-Here we also introduced the overlap matrix element $S_{AB}$ and the weight matrix element $W_{AB}$. From now on we will only consider one of the off-diagonal elements as the calculation of the other one is analogous.
-Approximating the wave functions of the two states by slater determinants built from Kohn-Sham orbitals we can write in a plane wave basis:
-\begin{eqnarray}
-S_{AB}=\langle \phi_B \vert \phi_A \rangle= \det \left[\sum_G (c_i^A(G))^\star c_j^B(G)\right]=\det \Phi_{ij},
-\end{eqnarray}
-where the $c_{i,j}^{A,B}(G)$ denote the plane wave coefficients of the respective wave function for
-their respective electronic states $i$ and $j$ and $\Phi$ denotes the full overlap matrix. Note that
-the diagonal elements of $\mathbb{S}$ are equal to one due to the normalisation of the two states.
-The off-diagonal $\mathbb{W}$ matrix element is given by:
-\begin{equation}
-\label{eq::wab}
-W_{AB}=\langle \phi_B \vert W \vert \phi_A \rangle=N\sum_{i=1}^N \sum_{j=1}^N \langle \phi^i_B \vert W \vert \phi^j_A \rangle  (-1)^{i+j} \det \Phi_{(i,j)},
-\end{equation}
-with $\Phi_{(i,j)}$ being the $i,j$th minor of $\Phi$ and the integral given by
-\begin{equation}
-\label{eq::gspacetransme}
-\langle \phi^i_B \vert W \vert \phi^j_A \rangle=\sum_{G,G^\prime}(c_i^A(G))^\star c_j^B(G) \tilde{W}(G-G^\prime).
-\end{equation}
-Note that Equ.~\ref{eq::gspacetransme} actually constitutes a convolution in G-space. Therefore the
-most efficient way to calculate the elements $\langle \phi^i_B \vert W \vert \phi^j_A \rangle$ is by
-transforming Equ.~\ref{eq::gspacetransme} back into real-space where the convolution becomes a
-simple multiplication. Additionally CPMD already stores the wavefunctions in real-space (REAL SPACE
-WFN KEEP which is activated automatically by the CDFT HDA calculation) and thus saves us the
-necessary FFTs.  Calculating every minor determinant of the overlap matrix in Equ.~(\ref{eq::wab})
-would be rather costly, therefore we note that the second part of Equ.~(\ref{eq::wab}) is actually
-the cofactor matrix $C$ of $\Phi$.
-\begin{equation}
-(-1)^{i+j} \det \Phi_{(i,j)}=C_{ij},
-\end{equation}
-which can be calculated using the Laplace Expansion of the inverse of $\Phi$:
-\begin{equation}
-C^T=\Phi^{-1}. [\det(\Phi) I ]
-\end{equation}
-Thus we only have to calculate the inverse and the determinant of $\Phi$ instead of all the minors.
-The diagonal elements of $\mathbb{W}$ are just the constraint values $N_c$ for the two states.
-Having performed this calculation we symmetrise $\mathbb{H}_\text{no}$ in order to correct for inaccuracies of the approximations we made.
-
-\paragraph{Full diabatic non-orthogonal Hamiltonian}
-However, the matrix $\mathbb{H}_\text{no}$ is not the full Hamiltonian as it neglects the fact that
-the two diabatic wavefunctions form a non-orthogonal basis ($S_{AB}\neq 0$). Nevertheless, we can
-construct the full Hamiltonian using the overlap matrix element $S_{AB}$: \begin{equation}
-\mathbb{H}_\text{full}=\frac{1}{1-S_{AB}^2}\left(\begin{array}{c c} H_{BB}-S_{AB}H_{AB} & H_{BA}-S_{AB}H_{AA}\\ H_{AB}-S_{AB}H_{BB} & H_{AA}-S_{AB}H_{BA}\end{array}\right),
-\end{equation}
-
-\paragraph{Diabatic orthogonal Hamiltonian}
-In order to compare our matrix elements with other methods an experiments we follow the procedure of Wu and Van Voorhis and first solve the two-dimensional generalised eigenvalue problem
-\begin{equation}
-\mathbb{W} \mathbb{V}=\mathbb{S}\mathbb{V}\mathbb{L},
-\end{equation}
-where $\mathbb{V}$ is the matrix of generalised eigenstates and $\mathbb{L}$ is the diagonal matrix of generalised eigenvalues.
-To calculate the diabatic orthogonal Hamiltonian we then perform the similarity transformation
-\begin{equation}
-\mathbb{H}_\text{diab}=\mathbb{V}^{-1} \mathbb{H}_\text{full} \mathbb{V}.
-\end{equation}
-The off-diagonal elements of $\mathbb{H}_\text{diab}$ --or their average if the two states have been very different-- are then the desired transition matrix element.
-
-\paragraph{Adiabatic Hamiltonian}
-The adiabatic energies of ground and excited state $\varepsilon_{g,e}$ and their mixing coefficients
-$\mathbf{x}_{g,e}$ can be calculated by simply diagonalising the the diabatic Hamiltonian (in
-principle either one as a similarity transform does not change the eigenvalues of a matrix, here we
-use the full Hamiltonian) \begin{equation}
- \mathbb{H}_\text{full}\mathbf{x}_{g,e}=\varepsilon_{g,e}\mathbf{x}_{g,e}
-\end{equation}
-With the matrix $\mathbb{X}$ of mixing coefficients we could then in principle also calculate the adiabatic states themselves via
-\begin{equation}
-\label{eq::adiabS}
-\left( \begin{array}{c} \psi^\text{ad}_a\\ \psi^\text{ad}_b\end{array}\right)=\mathbb{X} \left( \begin{array}{c} \psi_A\\ \psi_B\end{array}\right)
-\end{equation}
-
-
-\paragraph{Projection on reference states}
-Unfortunately, CDFT only constrains a total charge density, thus sometimes one may get a spurious
-delocalisation of the orbitals over both donor and acceptor leading to a too large overlap $S_{AB}$
-of the two diabatic states. One possible way to overcome this is to project the wavefunctions on
-non-interacting reference states and transform the diabatic Hamiltonian into this basis.
-
-The reference states are constructed from four wavefunctions $\Phi_{D^-},\Phi_{D^+},$ $\Phi_{A^+},\Phi_{A^-}$ describing donor and acceptor in the charge states corresponding to the two diabatic states
-\begin{eqnarray}
-\psi_a^0 &=& \Phi_{D^-}\times \Phi_{A^+} \nonumber\\
-\psi_b^0 &= &\Phi_{D^+}\times \Phi_{A^-}.
-\end{eqnarray}
-Then we project the adiabatic states - Equ.~\ref{eq::adiabS} - onto the reference states
-\begin{equation}
-\label{eq::projection}
-\left( \begin{array}{c} \psi^\prime_a\\ \psi^\prime_b\end{array}\right)=\left(
-\begin{array}{c c}
- \langle \psi^\text{ad}_a \vert \psi^0_a\rangle & \langle \psi^\text{ad}_b \vert \psi^0_a\rangle\\
- \langle \psi^\text{ad}_a \vert \psi^0_b\rangle & \langle \psi^\text{ad}_b \vert \psi^0_b\rangle
-\end{array} \right) \left( \begin{array}{c} \psi^\text{ad}_a\\ \psi^\text{ad}_b\end{array}\right) = 
-\mathbb{K} \left( \begin{array}{c} \psi^\text{ad}_a\\ \psi^\text{ad}_b\end{array}\right).
-\end{equation}
-These, so called ``dressed'', states are not yet orthogonal which we rectify using the L\"owdin scheme
-\begin{equation}
-\left( \begin{array}{c} \psi_1\\ \psi_2\end{array}\right)=\mathbb{S}^{-1/2} \left( \begin{array}{c} \psi^\prime_a\\ \psi^\prime_b\end{array}\right),
-\end{equation}
-with the elements of the L\"owdin matrix $\mathbb{S}$ defined as $\mathbb{S}_{j,k}=\langle
-\psi_j^\prime \vert \psi_k^\prime \rangle$ where $j,k \in {a,b}$. Combining this with
-Equ.~\ref{eq::projection} we can then express the new projected diabatic states in terms of the
-adiabatic constrained states: \begin{equation}
-\left( \begin{array}{c} \psi_1\\ \psi_2\end{array}\right)=\mathbb{S}^{-1/2} \mathbb{K} \left( \begin{array}{c} \psi^\text{ad}_a\\ \psi^\text{ad}_b\end{array}\right).
-\end{equation}
-The similarity transformation from the adiabatic Hamiltonian matrix $\mathbb{H}_\text{ad}$ to the projected diabatic Hamiltonian $\mathbb{H}^\text{p}_\text{diab}$ is then simply
-\begin{equation}
-\mathbb{H}^\text{p}_\text{diab}= (\mathbb{S}^{-1/2} \mathbb{K}) \mathbb{H}_\text{ad} (\mathbb{S}^{-1/2} \mathbb{K})^\text{T}.
-\end{equation}
-
-\subsection{Fragment Orbital DFT (FO-DFT)}
-The basic idea of FO-DFT, as formulated by Senthilkumar, Grozema, Bickelhaupt, and Siebbeles
-\cite{Senthilkumar03}, is to construct the two reference states from calculations of the
-non-interacting isolated donor and acceptor groups, respectively. This way one avoids spurious
-delocalisation of electrons over both groups, but also neglects polarisation effects of the donor on
-the acceptor and vice versa. Thus the diabatic states - and therefore the matrix element $H_{AB}$ -
-will in general be slightly different from those calculated with CDFT.
-
-With these diabatic reference states the transition matrix element is then in principle given by:
-\begin{equation}
-H_{AB}= \left\langle \psi^D_\text{HOMO}\left\vert \mathcal{H}_\text{KS} \right\vert\psi^A_\text{HOMO}\right\rangle,
-\end{equation}
-where $\mathcal{H}_\text{KS}$ denotes the Kohn-Sham Hamiltonian and $\psi^{D,A}_\text{HOMO}$ the
-highest occupied molecular orbitals (HOMO's) of donor and acceptor, respectively. Here we make the
-assumption that we can - to a sufficient degree of accuracy - approximate the acceptors LUMO (lowest
-unoccupied molecular orbital) by its HOMO in a system with one more electron. Successful
-applications of our implementation of FO-DFT can be found in ref.\cite{Oberhofer10acie}.
-
-\subsubsection{FODFT with CPMD}
-An FO-DFT calculation in CPMD consists of six different calls to CPMD:
-\begin{description}
-\item[1 and 2:] the respective wavefunction optimisation of donor and acceptor, on positions as they
-would be if they were combined (\textbf{CENTER MOLECULE OFF}). Note that here the calculated
-acceptor state should be the desired acceptor state plus one electron, which is necessary because
-CPMD does not calculate Kohn-Sham matrix elements for unoccupied orbitals. These two calls are the
-only time consuming ones in the procedure.  \item[3 and 4:] the diagonalisation of the two states in
-order to get their respective Kohn-Sham Orbitals (KOHN-SHAM ENERGIES).
-\item[5:] the combination and orthogonalisation of both wavefunctions with keywords COMBINE WAVEFUNCTION and one of the orthogonalisation schemes (ORTHOGONALIZATION LOWDIN of GRAM-SCHMIDT).
-\item[6:] the calculation of the Kohn-Sham matrix for the combined and orthogonalised states (keyword KSHAM).
-\end{description}
-
-
-If both donor and acceptor atoms are set the constraint value $N_\text{c}$ denotes as usual the charge difference between donor and acceptor. If NDON$=0$, $N_\text{c}$ is the desired charge of the acceptor.
-
-\paragraph{TODO's and usage WARNINGS}
-\begin{itemize}
-\item WARNING: don't use diagonalisation schemes (e.g. Lanczos) during the MD because it breaks the force calculation.
-\item WARNING: don't use non-orthogonal supercells, only SYMMETRY 0, 1 or 8 should be used.
-\item WARNING: CDFT and FODFT are not implemented for QM/MM calculations, yet.
-\end{itemize}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% QM/MM documentation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{CPMD/Gromos QM/MM Calculations}\label{sec:qmmm}
-
-\subsubsection{General Overview}
-\label{sec:qmmm-overview}
-An additional interface code ({\bf MM\_Interface} folder) and an adapted
-classical force field code  \cite{gromos96} ({\bf Gromos} folder) are
-needed to run CPMD in fully hamiltonian hybrid QM/MM
-mode\cite{qmmm02}. To use this code a {\it Gromos license} is required
-and therefore it is {\bf not} included in the standard CPMD code. The
-interface code and the adapted classical force field code can be
-obtained by directly contacting the CPMD developers.  
-
-To create a makefile for compilation of a QM/MM enabled CPMD binary,
-you have to copy  the two above folders (or create symbolic links to
-them) in the CPMD source directory and then to add the \texttt{-qmmm}
-flag when executing the \texttt{config.sh} script (see section
-\ref{installation}).  The resulting binary can be used for normal CPMD 
-runs as well as for QM/MM simulations.
-% FIXME: add contact and web reference here (again).
-%
-
-\subsubsection{Input files for QM/MM CPMD}
-\label{sec:qmmm-input}
-A QM/MM run requires a modified CPMD input file, some additional
-input files, and creates the normal CPMD output file and
-some new ones. The input file consists of a standard CPMD input
-with with the \refkeyword{QMMM} keyword in the \&CPMD section, a
-modified \&ATOMS section and a mandatory \&QMMM section. Furthermore
-three files for the classical code are needed (coordinates, topology and
-input file). These can be taken from previous fully classical
-simulations and have to be in Gromos format. Topologies and
-coordinates files created with the Amber\cite{amber7} package are
-also supported. A converter to Gromos format\cite{gromos96} is available.
-
-\subsubsection{Starting a QM/MM run}
-\label{sec:qmmm-start}
-To start a QM/MM simulation, you first do a simulation of your
-system with a regular classical MD-code to get an equilibrated
-configuration. The tricky part in this is usually the treatment
-of (metal-)ion or special molecules, that are not parameterized
-withing a given force field but are in the active center of your
-molecule (one of the prominent reasons why you want to do a QM/MM
-run in the first place). It is usually easiest to keep that part
-rigid throughout the equilibration, until after you have defined
-the QM-subsystem.
-
-Starting from the classically equilibrated structure, you have to
-create a topology, a coordinate and an input file in Gromos format
-(either by using the Gromos tools or a converter). Now you need to
-define your QM system by assigning pseudopotentials to selected
-atoms in your CPMD input file (see \ref{sec:defining-qm-system}).
-
-You can now start to continue the classical equilibration with CPMD
-using \refkeyword{MOLECULAR DYNAMICS} CLASSICAL. Please note, that
-there are several special constraints available to ease the transition
-in case of strong interactions within the QM part or between the QM
-and the MM part. Finally, a wavefunction optimization
-(either directly or via \refkeyword{QUENCH} BO) and a normal
-\refkeyword{MOLECULAR DYNAMICS} CP or BO can be performed.
-%FIXME: some more/comments need to be added here.
-% CAVEATS: - must use AMBER keyword if using converted amber topology.
-%          - must not have isolated positively charged MM-group in
-%            QM-box -> spill-out
-%          - must use rigid water when equilibrated with rigid water
-%            -> amber2gromos (>= v0.5) will detect rigid water if name WAT.
-%            -> waters for QM can be converted to solute via
-%               the FLEXIBLE WATER keyword (use matching BONDTYPE for amber).
-%            -> for all flexible water run already equilibration with
-%               flexible water and rename residues to something else as WAT
-%            -> when using older amber2gromos must convert manually
-%               (not recommended).
-
-\subsubsection{Defining internal Gromos array dimensions}
-\label{sec:defining-arraysizes}
-One rather new feature of this QM/MM interface code is the
-\refkeyword{ARRAYSIZES ... END ARRAYSIZES} block in the \&QMMM section which
-allows to change the internal array dimensions of the Gromos
-part dynamically. Previously one had to change some include
-files and recompile everything to adapt the code for a different
-system.
-
-These settings have to be consistent during a series of calculations,
-or else you may not be able to read your restart files correctly.
-% FIXME: add some text about the NAT/NSX issue
-% comment about what happens when changing MAXNAT
-% i.e. what the warnings mean and what it will lead to.
-% comment about the need to keep MAXATT low for large systems
-%
-%
-%   QUANTUM SYSTEM:
-%   NAX:           6
-%   NSX:           3
-%   FULL SYSTEM:
-%   NAX:          20
-%   NSX:         120
-%
-%
-
-\subsubsection{Defining the QM system}
-\label{sec:defining-qm-system}
-
-For a QM/MM calculation a subset of atoms are selected from the
-classical restart and then for this QM part an isolated system
-(SYMMETRY 0) calculation is performed. The supercell size has
-to follow the requirements of the various Poisson solvers, as
-listed in the hints section (\ref{hints:symm0}).
-
-If not otherwise specified, the QM system (atoms and wavefunction)
-is always re-centered in the given supercell (the current offset of
-the QM cell is recorded in the file MM\_CELL\_TRANS).
-
-The quantum atoms are specified in the \&ATOMS section similar to normal
-CPMD calculations. Instead of explicite coordinates one has to provide
-the atom index as given in the Gromos topology and coordinates files.
-
-
-\subsubsection{List of keywords in the \&QMMM section}
-
-\textbf{\underline{Mandatory keywords:}}\\[-1cm]
-
-\keyword{COORDINATES}{}{}{}{\&QMMM}
-  \desc{On the next line the name of a Gromos96 format coordinate file
-  has to be given. Note, that this file must match the corresponding
-  input and topology files. Note, that in case of hydrogen capping, this
-  file has to be modified to also contain the respective dummy hydrogen atoms.
-}
-
-\keyword{INPUT}{}{}{}{\&QMMM}
-\desc{On the next line the name of a Gromos input file has to be
-  given. A short summary of the input file syntax and some keywords
-  are in section \ref{sec:qmmm-gromos-inp}.
-  Note, that it has to be a correct input file, even though
-  many options do not apply for QM/MM runs.}
-
-\keyword{TOPOLOGY}{}{}{}{\&QMMM}
-\desc{On the next line the name of a Gromos topology
-  file has to be given. Regardless of the force field,
-  this topology file has to be in Gromos format\cite{gromos96}.
-  Topologies created with Amber % or Gromacs (Gromos/OPLS-forcefield)
-  can be converted using the respective conversion tools shipped
-  with the interface code.
-  A short summary of the topology file syntax and some keywords
-  are in section \ref{sec:qmmm-gromos-inp}.}
-
-\vspace{1cm}\textbf{\underline{Other keywords:}}\\[-1cm]
-
-\spekeyword{ADD\_HYDROGEN}{}{}{}{\&QMMM}{ADD-HYDROGEN}
-\desc{ This keyword is used to add hydrogens to the QM system if a
-  united atom topology is used (like in Gromos). On the next line
-  the number of atoms to be ``hydrogenized'' has to be given and in
-  the line following that, the corresponding gromos atom numbers.
-  A number of hydrogens consistent with the hybridization of the
-  ``hydrogenized'' carbons are added.}
-
-\keyword{AMBER}{}{}{}{\&QMMM}
-\desc{An Amber functional form for the classical force field is
-  used. In this case coordinates and topology files as obtained by
-  Amber have to be converted in Gromos format just for input/read
-  consistency. This is done with the tool amber2gromos availabe with
-  the CPMD/QMMM package.\\
-  This keyword is mutually exclusive with the \refkeyword{GROMOS}
-  keyword (which is used by default).}
-
-\keyword{ARRAYSIZES ... END ARRAYSIZES}{}{}{}{\&QMMM}
-\desc{Parameters for the dimensions of various internal arrays
-  can be given in this block. The syntax is one label and the
-  according dimension per line. The suitable parameters can
-  be estimated using the script \texttt{estimate\_gomos\_size}
-  bundled with the QM/MM-code distribution. Example:}
-\begin{verbatim}
- ARRAYSIZES
-   MAXATT 20
-   MAXAA2 17
-   MXEX14 373
- END ARRAYSIZES
-\end{verbatim}
-
-\keyword{BOX TOLERANCE}{}{}{}{\&QMMM}
-\desc{The value for the box tolerance is read from the next line.
-In a QM/MM calculation the size of the QM-box is fixed and
-the QM-atoms must not come to close to the walls of this box. On top of
-always recentering the QM-box around the center of the distribution of
-the atoms, CPMD prints a warning message to the output when the
-distribution extends too much to fit into the QM-box properly anymore.
-This value may need to be adjusted to the requirements of the Poisson
-solver used (see section \ref{hints:symm0}).\\
-{\bf Default} value is 8~a.u.}
-
-
-\keyword{BOX WALLS}{}{}{}{\&QMMM}
-\desc{
-  The thickness parameter for soft, reflecting QM-box walls
-  is read from the next line. This keyword allows to reverse the
-  momentum of the particles (${\bf p}_I \rightarrow -{\bf p}_I$)
-  when they reach the walls of the simulation supercell similar to
-  the full quantum case, but acting along all the three directions
-  $x,y,z$.
-  In the case this keyword is used in the \&QMMM section,QM  particles
-  are reflected back in the QM box. Contrary to the normal procedure of
-  re-centering the QM-box, a soft, reflecting confinement potential
-  is applied if atoms come too close to the border of the QM
-  box~\cite{box-walls}.
-  It is highly recommended to also use \refkeyword{SUBTRACT} COMVEL
-  in combination with this feature. {\bf NOTE:} to have your QM-box
-  properly centered, it is best to run a short MD with this feature
-  turned off and then start from the resulting restart with the soft
-  walls turned on. Since the reflecting walls reverse the sign of
-  the velocities, ${\bf p}_I \to -{\bf p}_I$ ($I$ = QM atom
-  index), be aware that this options affects the momentum conservation
-  in your QM subsystem. \\
-  This feature is {\bf disabled by default}}
-
-\keyword{CAPPING}{}{}{}{\&QMMM}
-\desc{Add (dummy) hydrogen atoms to the QM-system to saturate
-  dangling bonds when cutting between MM- and QM-system. This needs
-  a special pseudopotential entry in the \&ATOMS section (see section
-  \ref{sec:qmmm-cut-bonds} for more details).}
-
-\spekeyword{CAP\_HYDROGEN}{}{}{}{\&QMMM}{CAP-HYDROGEN}
-\desc{same as \refkeyword{CAPPING}.}
-%
-%\keyword{CHARGE...}{}{}{}{\&QMMM}
-%\desc{
-% FIXME: this sets some charge groups for the QM atom, but for what?
-%          ELSE IF(INDEX(LINE,'CHARGE').NE.0) THEN
-%            read(iunit,*)N_CG
-%            read(iunit,*)(atom_qm_cg(i),i=1,N_CG)
-%            read(iunit,*)q_rest,lambda
-%}
-
-\keyword{ELECTROSTATIC COUPLING}{[LONG RANGE]}{}{}{\&QMMM}
-\desc{The electrostatic interaction of the quantum system with the
-  classical system is explicitly kept into account for all classical
-  atoms  at a  distance $r \leq $~\refspekeyword{RCUT\_NN}{RCUT-NN} from any
-  quantum atom and for all the MM  atoms at a distance of
-  \refspekeyword{RCUT\_NN}{RCUT-NN}~$< r \leq$~\refspekeyword{RCUT\_MIX}{RCUT-MIX}
-  and a charge larger than $0.1 e_0$ (NN atoms).\\
-
-  MM-atoms with a charge smaller than $0.1 e_0$ and a distance of
-  \refspekeyword{RCUT\_NN}{RCUT-NN}~$< r \leq$~\refspekeyword{RCUT\_MIX}{RCUT-MIX}
-  and all MM-atoms with
-  \refspekeyword{RCUT\_MIX}{RCUT-MIX}~$< r \leq$~\refspekeyword{RCUT\_ESP}{RCUT-ESP}
-  are coupled  to the QM system by a ESP coupling Hamiltonian (EC atoms).\\
-
-  If the additional \texttt{LONG RANGE} keyword is specified, the
-  interaction of the QM-system with the rest of the classical atoms is
-  explicitly kept into account via interacting with a multipole
-  expansion for the QM-system up to quadrupolar order. A file
-  named \texttt{MULTIPOLE} is produced.
-
-  If \texttt{LONG RANGE} is omitted the quantum system is coupled to the
-  classical atoms not in the NN-area and in the EC-area list via the
-  force-field charges.\\
-
-  If the keyword \texttt{ELECTROSTATIC COUPLING} is omitted, all
-  classical atoms are coupled to the quantum system by the force-field
-  charges (mechanical coupling).\\
-
-  The files INTERACTING.pdb, TRAJECTORY\_INTERACTING, MOVIE\_INTERACTING,
-  TRAJ\_INT.dcd, and ESP (or some of them) are created. The list of NN and
-  EC atoms is updated every 100 MD steps. This can be changed using the
-  keyword \refkeyword{UPDATE LIST}.\\
-
-  The default values for the cut-offs are
-  RCUT\_NN=RCUT\_MIX=RCUT\_ESP=10 a.u..
-  These values can be changed by the keywords
-  \refspekeyword{RCUT\_NN}{RCUT-NN},
-  \refspekeyword{RCUT\_MIX}{RCUT-MIX},
-  and \refspekeyword{RCUT\_ESP}{RCUT-ESP}
-  with $r_{nn} \leq r_{mix} \leq r_{esp}$.}
-
-\keyword{ESPWEIGHT}{}{}{}{\&QMMM}
-\desc{The ESP-charg fit weighting parameter is read from the next line.\\
-   {\bf Default} value is $0.1 e_0$.}
-
-\keyword{EXCLUSION}{\{GROMOS,LIST\{NORESP\}\}}{}{}{\&QMMM}
-\desc{Specify charge interactions that should be excluded
-   from the QM/MM hamiltonian. With the additional flag GROMOS,
-   the exclusions from the Gromos topology are used. With the
-   additional flag LIST, an explicit list is read from following lines.
-   The format of that list has the number of exclusions in the first
-   line and then the exclusions listed in pairs of numbers of the QM
-   atom and the MM atom in Gromos ordering; the optional flag NORESP
-   in this case requests usage of MM point charges for the QM atoms 
-   instead of the D-RESP charges (default).}
-
-
-\keyword{FLEXIBLE WATER}{[ALL,BONDTYPE]}{}{}{\&QMMM}
-\desc{Convert some solven water molecules into solute molecules and
-  thus using a flexible potential.\\
-  With the BONDTYPE flag, the three bond potentials (OH1, OH2, and H1H2)
-  can be given as index in the BONDTYPE section of the Gromos topology
-  file. Note that the {\bf non-bonded} parameters are taken from the
-  SOLVENATOM section of the \refkeyword{TOPOLOGY} file.
-  {\bf Default} is to use the values: 35, 35, 41.\\
-  With the additional flag ALL this applies to all solvent water
-  molecules, otherwise on the next line the number of flexible water
-  molecules has to be given with the Gromos index numbers of their
-  respective Oxygen atoms on the following line(s).\\
-  On successful conversion a new, adapted topology file, MM\_TOPOLOGY,
-  is written that has to be used with the \refkeyword{TOPOLOGY}
-  keyword for subsequent restarts. Also the \refkeyword{INPUT} file
-  has to be adapted: in the SYSTEM section the number of solvent
-  molecules has to be reduced by the number of converted molecules,
-  and in the SUBMOLECULES section the new solute atoms have to be
-  added accordingly.\\ Example:}
-\begin{verbatim}
-     FLEXIBLE WATER BONDTYPE
-      4 4 5
-      26
-        32   101   188   284   308   359   407   476   506   680
-       764   779   926  1082  1175  1247  1337  1355  1607  1943
-      1958  1985  2066  2111  2153  2273
-\end{verbatim}
-
-%_FM[
-\keyword{FORCEMATCH ... END FORCEMATCH}{}{}{}{\&QMMM}
-\desc{Input block for the QM/MM forcematching. A general description is given in section \ref{sec:forcematch-desc}. \\
-   \textbf{READ REF FORCES [FILE,COVALENT]}\\
-Flag to read the QM/MM reference forces directly from the file FM\_REF\_FORCES, i.e. no QM/MM SPs
-are computed. \textbf{Default}: false. An alternative file name can be specified on the next line
-with the option \textbf{FILE}. With the option \textbf{COVALENT} covalent forces are read from the
-file FM\_REF\_COVFORCES. \\ \textbf{READ REF TRAJ [FILE]} \\
-Read reference trajectory from file TRAJECTORY\_REF (or set the \textbf{FILE} option to read a non-default file name from the next line) with a given stride and compute single points on the respective frames. \\
-\textbf{RESTART SP} \\
-If in a previous force matching run not all of the SPs could be computed (e.g. limited wall time)
-this flag indicates cpmd to restart the SP calculations. The FM\_REF* files from the previous run
-have to be present and they will be appended. With this option make sure that the frames contained
-in the already existing FM\_REF* files are consistent. \textbf{Default}: false. \\ \textbf{READ REF
-STRIDE} \\
-Stride to apply when reading the TRAJECTORY\_REF file is read from the next line. Default=1, i.e. every frame is used for the SP calculations. \\
-\textbf{TOPOL OUT} \\
-Filename for the final topology file. \textbf{Default}: FMATCH.top. \\
-\textbf{INITWF [OFF]} \\
-Generate an initial guess for the wfkt for the SP calculations based on AOs (default). With the \textbf{OFF} option the wfkt of the previous frame is used as an intial guess.\\
-\textbf{CHARGES [ONLY,NO],[FIX]} \\
-Charge fitting is on by default and can be switched off with the \textbf{NO} option. In this case
-the charges from the initial topology will not be modified. \textbf{ONLY} will let the program stop
-after the charge fitting and the other parameters are not updated. \\ With the \textbf{FIX} option
-target values for the restraints in the charge fitting on specific atoms can be specified by the
-user. Usually the charges are restraint to the respective Hirschfeld values. On the next line the
-number of charges to be fixed has to be given and then the corresponding number of lines with:
-gromos index \ \ \ \ charge. \\
-\textbf{MV} \\
-Weight on the potential in the charge fitting. \textbf{Default}=0.1.\\
-\textbf{WF} \\
-Weight on the field in the charge fitting. \textbf{Default}=0.0. \\
-\textbf{WQ INDIVIDUAL} \\
-Weights on the charge restraints can be given individually here. From the next line the total number of individual weights is read. Then the lines with: gromos index \ \ \ \ weight.\\
-\textbf{WQ GENERAL} \\
-The weight for all the charge restraints that were not specified by individual weights can be given on the next line. \textbf{Default}=0.1. \\
-\textbf{WTOT} \\
-Weight of the total charge contribution in the charge fitting. \textbf{Default}=1.0E7.}
-% I have to split the desc to avoid problems with the page break!
-\desc{
-\textbf{EQUIV} \\
-Specify equivalent atoms. Syntax: \\
-
-\texttt{EQUIV} \\
-\texttt{  n\_equiv \\
-atom1 \ \ atom4 \\
-atom1 \ \  atom3 \\
-... \\
-atom5 \ \ atom7} \\
-
-There are \texttt{\textit{n\_equiv}} equivalencies specified (\texttt{n\_equiv} lines are read from the input). For each pair of equivalencies the gromos indexes have to be specified on one separate line. The lower index has to be given first!\\
-If an atom is equivalent to more then one other atom. E.g. atom1,atom3 and atom4 are equivalent. Then this has to be encoded by: \\
-
-\texttt{atom1 \ \ atom3 \\
-atom1 \ \  atom4} \\
-
-and not by: \\
-
-\texttt{atom1 \ \ atom4 \\
-atom3 \ \ atom4 }  \\
-
-where atom1 has a lower gromos index then atom3 and atom3 has a lower one then atom4. Per default no equivalencies are assumed. \\
-\textbf{OPT FC ONLY}\\
-Serves as a flag to remove the equilibrium values of the bonded interactions from the list of fitted parameters. I. e. only force constants are fitted for the bonded interactions.\\
-\textbf{NO BONDS} \\
-Do not fit bonds. \textbf{Default}=false. \\
-\textbf{NO ANGLES} \\
-Do not fit angles. \textbf{Default}=false. \\
-\textbf{NO DIHEDRALS} \\
-Do not fit dihedrals. \textbf{Default}=false. \\
-\textbf{NO IMPROPERS} \\
-Do not fit improper dihedrals. \textbf{Default}=false. \\
-\textbf{MAXITER} \\
-Give on the next line the maximal number of iterations for the non-linear fitting procedure of the bonded interactions. \textbf{Default}=500.\\
-\textbf{COMPUTE RMS [NO]}\\
-Per default the RMS on the forces is computed after the fitting has been completed. Switch it off with the \textbf{NO} option.  
-   Example:}
-\begin{verbatim}
- FORCEMATCH
-   READ REF TRAJ FILE
-     TRAJECTORY_REF
-   READ REF STRIDE
-     10
-   WV
-   1.0
-   WOT
-   1000000.0
-   WQ GENERAL
-   0.1    
- END FORCEMATCH
-\end{verbatim}
-%_FM]
-
-\keyword{GROMOS}{}{}{}{\&QMMM}
-\desc{A Gromos functional form for the classical force field is used
-  (this is the default).\\
-  This keyword is mutually exclusive with the \refkeyword{AMBER}
-  keyword.}
-
-\keyword{HIRSHFELD}{[ON,OFF]}{}{}{\&QMMM}
-\desc{With this option, restraints to Hirshfeld charges~\cite{Hirshfeld77}
-  can be turned on or off\\
-   {\bf Default} value is ON.}
-
-\keyword{MAXNN}{}{}{}{\&QMMM}
-\desc{Then maximum number of NN atoms, i.e. the number of atoms
-  coupled to the QM system via \refkeyword{ELECTROSTATIC COUPLING}
-  is read from the next line. (Note: This keyword was renamed from MAXNAT
-  in older versions of the QM/MM interface code to avoid confusion
-  with the MAXNAT keyword in the \refkeyword{ARRAYSIZES ... END ARRAYSIZES}
-  block.)\\
-   {\bf Default} value is 5000.}
-
-\keyword{NOSPLIT}{}{}{}{\&QMMM}
-\desc{If the program is run on more than one node,
- the MM forces calculation is performed on all nodes.
- Since the MM part is not parallelized, this is mostly useful for systems
- with a small MM-part and for runs using only very few nodes. Usually
- the QM part of the calculation needs the bulk of the cpu-time in the QM/MM.\\
-  This setting is the default. See also under \refkeyword{SPLIT}.}
-
-\spekeyword{RCUT\_NN}{}{}{}{\&QMMM}{RCUT-NN}
-\desc{The cutoff distance for atoms in the nearest neighbor region
-  from the QM-system ($ r \leq r_{nn}$) is read from the next line.
-  (see \refkeyword{ELECTROSTATIC COUPLING} for more details).\\
-  {\bf Default} value is 10~a.u.}
-
-\spekeyword{RCUT\_MIX}{}{}{}{\&QMMM}{RCUT-MIX}
-\desc{The cutoff distance for atoms in the intermediate region
-  ($r_{nn} < r \leq r_{mix}$) is read from the next line.
-  (see \refkeyword{ELECTROSTATIC COUPLING} for more details).\\
-  {\bf Default} value is 10~a.u.}
-
-\spekeyword{RCUT\_ESP}{}{}{}{\&QMMM}{RCUT-ESP}
-\desc{The cutoff distance for atoms in the ESP-area ($r_{mix} < r \leq r_{esp}$)
-  is read from the next line. (see \refkeyword{ELECTROSTATIC COUPLING}
-  for more details).\\
-  {\bf Default} value is 10~a.u.}
-
-\keyword{RESTART TRAJECTORY}{[FRAME \{num\},FILE '\{fname\}',REVERSE]}{}{}{\&QMMM}
-\desc{Restart the MD with coordinates and velocities from a previous
-  run. With the additional flag FRAME followed by the frame number the
-  trajectory frame can be selected. With the flag FILE followed by
-  the name of the trajectory file, the filename can be set (Default is
-  TRAJECTORY). Finally the flag REVERSE will reverse the sign of the
-  velocities, so the system will move backwards from the selected point
-  in the trajecory.}
-
-\keyword{SAMPLE INTERACTING}{[OFF,DCD]}{}{}{\&QMMM}
-\desc{The sampling rate for writing a trajectory of the interacting subsystem
-  is read from the next line. With the additional keyword OFF or a
-  sampling rate of 0, those trajectories are not written.
-  The coordinates of the atoms atoms contained in the file INTERACTING.pdb
-  are written, in the same order, on the file TRAJECTORY\_INTERACTING
-  every.  If the \refkeyword{MOVIE} output is turned on, a file
-  MOVIE\_INTERACTING is written as well.  With the
-  additional keyword DCD the file TRAJ\_INT.dcd is also written to.
-  if the sampling rate is negative, then \textbf{only} the TRAJ\_INT.dcd
-  is written.
-\\
-  {\bf Default} value is 5 for MD calculations and OFF for others.}
-
-\keyword{SPLIT}{}{}{}{\&QMMM}
-\desc{If the program is run on more than one node,
-  the MM forces calculation is performed on a separate node.
-  This is mostly useful for systems with a large MM-part and runs with
-  many nodes where the accumulated time used for the classical part has
-  a larger impact on the performace than losing one node for the (in
-  total) much more time consuming QM-part.\\
- {\bf Default} is \refkeyword{NOSPLIT}.}
-
-\keyword{TIMINGS}{}{}{}{\&QMMM}
-\desc{Display timing information about the various parts of the
- QM/MM interface code in the output file. Also a file \texttt{TIMINGS}
- with even more details is written. This option is off by {\bf default}.}
-
-\keyword{UPDATE LIST}{}{}{}{\&QMMM}
-\desc{On the next line the number of MD steps between updates of the
-  various lists of atoms for \refkeyword{ELECTROSTATIC COUPLING}
-  is given. At every list update a file INTERACTING\_NEW.pdb is
-  created (and overwritten).\\
-
-  {\bf Default} value is 100.}
-
-\keyword{VERBOSE}{}{}{}{\&QMMM}
-\desc{The progress of the QM/MM simulation is reported more verbosely
-  in the output. This option is off by {\bf default}.}
-
-\keyword{WRITE LOCALTEMP}{[STEP \{nfi\_lt\}]}{}{}{\&QMMM}
-\desc{The Temperatures of the QM subsystem, the MM solute (without
-  the QM atoms) and the solvent (if present) are calculated
-  separately and writen to the standard output and a file \texttt{QM\_TEMP}.
-  The file has 5 columns containing the QM temperature, the MM temperature,
-  the solvent temperature (or 0.0 if the solvent is part of the solute),
-  and the total temperature in that order.
-  With the optional parameters STEP followed by an integer, this is
-  done only every \texttt{nfi\_lt} timesteps.}
-%
-%%%%%%%%%%%%%%%%5
-% FIXME: AK 2005/07/18 this should be made obsolete and
-                % the functionaliy combined with RHOPRI (if needed).
-%WRITE {DENSITY,POTENTIAL} [STRIDE n_stride] [STEP n_step]
-%
-% The electronic density (resp. the external potential) on the quantum
-% grid at step n_step is written in cube format on the file DENSITY.cube
-% (resp. POTENTIAL.cube) with a stride n_stride on the real space
-% grid. Defaults are n_step=1 n_stride=1. This keyword can be used only
-% if the keyword ELECTROSTATIC COUPLING is specified.
-
-\subsubsection{Keywords in the Gromos Input and Topology files}
-\label{sec:qmmm-gromos-inp}
-For a detailed description of the Gromos file formats please
-have a look at the Gromos documentation\cite{gromos96}. Note, that
-not all keyword are actually active in QM/MM simulations, but the
-files still have to be syntactically correct.
-Both, the input and the topology file are structured in sections
-starting with a keyword in the first column and ending with the
-keyword END. Lines starting with a pound sign '\#' may contain
-comments and are ignored. Both files are required to have a
-TITLE section as the first section. The rest can be in almost
-any order. Here is a short list of some important flags and
-their meaning.
-
-\begin{description}
-\item[Gromos Input File:]~\\
-  \begin{description}
-  \item[TITLE]~\\
-    Text that identifies this input file.
-    Will be copied into the CPMD output.
-  \item[SYSTEM]~\\
-    This section contains two integer numbers. The first
-    is the number of (identical) solute molecules (NPM) and the
-    second the number of (identical) solvent molecules (NSM).
-  \item[BOUNDARY]~\\
-    This section defines the classical simulation cell.
-    It contains 6 numbers. The first (NTB) defines the type
-    of boundary conditions ( NTB $<0$ means truncated octahedron boundary
-    conditions, NTB=0 vacuum, and NTB $>0$ rectangular boundary
-    conditions).\\
-    The next three numbers (BOX(1..3)) define the size of the classical
-    cell. The fifth number (BETA) is the angle between the x- and z-axes
-    and the last number usually determines whether the cell dimensions
-    are taken from the input file (NRDBOX=0) or from the BOX section
-    of the \refkeyword{COORDINATES} file (NRDBOX=1), but is ignored
-    for QM/MM simulations.\\
-    Note: that even for vacuum simulations valid simulation cell
-    sizes must be provided.
-  \item[PRINT]~\\
-    This section determines how often some properties are monitored.
-    Here only the first number (NTPR) matters, as it determines the
-    number of MD steps between printing the various energies to the
-    CPMD output.\\
-    Note many old Gromos input files created by the amber2gromos program
-    default to NTPR=1, which makes the CPMD output huge.
-%  \item[SHAKE]~\\
-% does this work???
-  \item[SUBMOLECULES]~\\
-    Defines number of submolecules in the solute. The first number
-    is the number of submolecules followed by the index number of
-    the last atom of each submolecule. The last number must be identical
-    to the number of atoms in the solute.
-  \item[FORCE]~\\
-    Contains two groups of numbers, that controls the various force
-    component and the partitioning of the resulting energies. The first
-    group of 1/0 flags turn the various force components on or off.
-    The second group defines energy groups (the first number is the
-    number of groups followed by the index number of the last atom
-    in each group). The last number must be identical
-    to the number of all atoms.
-%  \item[LATSUM]~\\
-% ewald sum parameters. are they needed here???
-  \end{description}
-
-\item[Gromos Topology File:]~\\
-  \begin{description}
-  \item[TITLE]~\\
-    Text that identifies this topology file.
-    Will be copied into the CPMD output.
-
-  \item[ATOMTYPENAME]~\\
-    This section contains the number of classical atom types (NRATT)
-    followed by the respective labels, one per line. Note that
-    the \refkeyword{ARRAYSIZES ... END ARRAYSIZES} MAXATT must be large enough
-    to accomodate all defined atom types.
-  \item[RESNAME]~\\
-    This section contains the number of residues in the solute (NRAA2)
-    followed by the respective residue names. % ARRAYSIZE?
-  \item[SOLUTEATOM]~\\
-    This section defines the number (NRP) and sequence of atoms in the
-    solute, their names, residue numbers, non-nonded interaction codes,
-    masses, charges, charge groups and their full + scaled 1-4 exclusions.
-  \item[BONDTYPE]~\\
-    This section contains the list of parameters for bonded
-    interactions. You have to pick the two matching entries from this
-    list for the O-H and H-H potential, when using the the
-    \refkeyword{FLEXIBLE WATER} keyword to convert solvent water back
-    into solute (e.g. to included them into the QM part).
-  \item[SOLVENTATOM]~\\
-    This section defines the number of atoms (NRAM) in the solvent
-    and their respective names, non-bonded interactions types, masses,
-    and charges.
-  \item[SOLVENCONTSTR]~\\
-    This section defines the number (NCONS) and parameters for the
-    distance constraints, that are used to keep the solvent rigid.
-  \end{description}
-\item
-\end{description}
-
-\subsubsection{Files generated by the interface code}
-\label{sec:qmmm-files}
-\begin{itemize}
-
-\item {\bf QMMM\_ORDER}\\
-The first line specifies the total number of atoms (NAT) and the number of quantum
-atoms (NATQ). The subsequent NAT lines contain, for every atom, the gromos atom number,
-the internal CPMD atom number, the CP species number isp and the number in the list
-of atoms for this species NA(isp). The quantum atoms are specified in the first NATQ lines.
-
-\item {\bf CRD\_INI.grm}\\
-Contains the positions of all atoms in the first frame of the simulation in
-Gromos extended format.
-
-\item {\bf CRD\_FIN.grm}\\
-Contains the positions of all atoms in the last frame of the simulation in
-Gromos extended format.
-
-\item {\bf INTERACTING.pdb}\\
-% FIXME: this is _not_ pdb format!
-Contains (in pdb format) all the QM atoms and all the MM atoms in the electrostatic
-coupling NN list. The 5-th column in this file specifies the gromos atom number as
-defined in the topology file and in the coordinates file. The 10-th column specifies
-the CPMD atom number as in the TRAJECTORY file. The quantum atoms are labelled by
-the residue name QUA.
-
-\item {\bf INTERACTING\_NEW.pdb}\\
-The same as INTERACTING.pdb, but it is created if the file INTERACTING.pdb
-is detected in the current working directory of the CPMD run.
-
-\item {\bf TRAJECTORY\_INTERACTING}\\
-Contains the coordinates and the velocities (in TRAJECTORY format) of the atoms
-listed in INTERACTING.pdb. The format is the same as in the files TRAJECTORY and MOVIE,
-hence frames belonging to different runs are separated by the line <<<<< NEW DATA >>>>>.
-
-The atoms in this file do not necessarely coincide with the NN atoms, that are written
-at every update of the pair list in the file INTERACTING\_NEW.pdb.
-
-
-\item {\bf MOVIE\_INTERACTING}\\
-The MOVIE-like file corresponding to TRAJECTORY\_INTERACTING.
-
-%POTENTIAL.cube
-%Created if the keyword WRITE POTENTIAL is specified. Contains, in cube format,
-%thepotential due to the MM atoms on the quantum grid.
-%
-%DENSITY.cube
-%Created if the keyword WRITE DENSITY is specified. Contains, in cube format,
-%the electronic density.
-%
-
-\item {\bf ESP}\\
-Containes the ESP charges of the QM atoms in CPMD order (the corresponding Gromos
-numbers can be found in QMMM\_ORDER). The first column is the frame number.
-
-
-\item {\bf EL\_ENERGY}\\
-Contains the electrostatic interaction energy. First column: frame number.
-Second column: total electrostatic interaction energy.
-Other columns: interaction energy of the NN atoms with the QM system;
-interaction energy with the ESP coupled atoms;
-multipolar interaction energy;
-electrostatic interacion energy evaluated using
-the classical force field charges for the QM atoms.
-
-\item {\bf MULTIPOLE}\\
-Contains, for every frame (specified in the first column), the three components of
-the dipol D(ix) and the five independent components of the quadrupole Q(ix,jx) of
-the quantum system in a.u.  The order is: D(1),D(2),D(3),Q(1,1),Q(2,2),Q(1,2),Q(1,3),Q(2,3).
-
-\item {\bf MM\_CELL\_TRANS}\\
-Contains, the Trajectory of the re-centering offset for the QM-box. The first column
-ist the frame number (NFI) followed by the x-, y-, and z-component of the cell-shift vector.
-%
-%CHJ
-%????
-\end{itemize}
-
-\subsubsection{Hydrogen Capping vs. Link Atoms}
-\label{sec:qmmm-cut-bonds}
-Whenever the QM/MM-boundary cuts through an existing bond, special
-care has to be taken to make sure that the electronic structure of
-the QM-subsystem is a good representation of an all-QM calculation
-and also the structure in the boundary region is preserved. So far,
-two methods methods are available to do this: using special link-atom
-pseudopotentials and hydrogen capping.
-
-{\large Link Atom}\\
-The simplest way is to use a link-atom pseudopotential. In the
-simplest case, this would be a scaled down pseudopotential with the
-required valence change (e.g. ZV=1 when cutting through a single
-carbon-carbon bond). However in this case it is required to constrain
-the distance between the link atom and the (full-QM) neighbor atom
-to the (full-QM) equilibrium distance, to preserve the electronic
-structure in the center of the QM subsystem. You should be aware of
-the fact, that this is a rather crude approximation and that the
-contraint will create a small imbalance in the forces between the QM and
-MM subsystems, that can result in a drift in the total energy, if the
-length of the contraint is badly chosen.
-
-A more rigorous approach would be to use an optimized pseudopotential
-constructed with the method described in ref.~\cite{opt-ecp04}, that
-should take care of the need for the constraint.
-
-{\large Hydrogen Capping}\\
-An alternative way would be to use the \refkeyword{CAPPING} flag in
-order to introduce additional (dummy) hydrogen atoms to saturate the
-dangling bonds. These capping hydrogen atoms have to be hidden from the
-MM hamiltonian so the Gromos \refkeyword{INPUT} and
-\refkeyword{TOPOLOGY} files have to be modified for subsequent runs, in
-addition to adding an explicit \refkeyword{EXCLUSION} LIST to the cpmd
-input. The whole procedure is a bit complicated so here is a short
-protocol of the required steps.
-
-\begin{itemize}
-\item[1a] Set up a normal QM/MM run as for using link atoms with the
-  additional keyword \refkeyword{CAPPING} and instead of the link-atom
-  potential use a hydrogen potential with the additional flag
-  \texttt{ADD\_H}. Note that you have to provide the correct number of
-  hydrogens, but no atom index number.
-\item[1b] Run a short MD (a couple of steps) and use the resulting
-  \texttt{CRD\_FIN.grm} file (under a different name) in the
-  \refkeyword{COORDINATES} section.
-\item[2a] Modify the Gromos input file to match the new coordinate file.
-  \begin{itemize}
-  \item Increase the number of atoms per solute molecule in the
-    SUBMOLECULES section.
-  \item increase the total number of atoms in the FORCE section.
-  \end{itemize}
-\item[2b] Modify the Gromos topology file to match the new coordinate
-  file.
-  \begin{itemize}
-  \item Add a DUM atom type at the end of the ATOMTYPENAME section if
-    not already present (and increase NRATT accordingly).
-  \item if you have added a new atom type, you have to add the
-    corresponding entries in the LJPARAMETERS section as well.
-    Since the capping hydrogen atoms should be invisible from the MM
-    hamiltonian all Lennard-Jones parameters are set to 0.0 for those
-    new entries. This section is a triangular matrix, so you have to
-    add NRATT lines (and increase NRATT2 accordingly).
-  \item Add new residues named DUM (one for each capping hydrogen) to
-    the RESNAME section (and increase NRAA2).
-  \item In the SOLUTEATOM section you have to increase NRP and add the
-     dummy hydrogens at the end of the solute.
-     The structure of the entry is:
-     \verb|<atom nr> <residue nr> <atom type name> <vdw type index> <mass> <charge> 1 0|
-     and a single '0' on the next line. Use a mass of 1.008 and a charge of 0.000.
-  \end{itemize}
-\item [2c] Modify the CPMD input file.
-  \begin{itemize}
-  \item Make sure that the \refkeyword{TOPOLOGY}, \refkeyword{INPUT},
-    and \refkeyword{COORDINATES} keywords in the \&QMMM section match
-    the newly created or modified files.
-  \item Add the capping hydrogens to the \&ATOMS section as normal QM
-    atoms, but add the DUMMY flag to the pseudopotential line.
-  \item Build an \refkeyword{EXCLUSION} LIST entry that lists for each
-    capping atom the respective QM/MM atoms pairs that should be
-    excluded from the electrostatic coupling (all other MM interactions
-    are set to zero already in the topology file). For consistency only
-    full charge groups should be excluded. In the supplementary material
-    should be a script genexcl.tcl which can help you in building that
-    list (it needs the modified Gromos coordinate and topology file as
-    well as the QMMM\_ORDER file as input).
-  \item Update the \refkeyword{ARRAYSIZES ... END ARRAYSIZES} entry to match
-    the new topology.
-  \end{itemize}
-\end{itemize}
-
-With the three modified files you should be able to run a regular QM/MM
-run. Note, that you may have to update the exclusion list occasionally,
-depending on your system and that you should pick the bond(s) to cut very
-carefully.
-
-
-\subsubsection{What type of QM/MM calculations are available?}
-\label{sec:what-type-qmmm}
-The QM/MM interface only supports a subset of the functionality of CPMD.
-Please note, that although there are some tests and warnings included
-into the source code, not every job that runs without a warning will
-be automatically correct. So far, the interface code requires the use of
-norm-conserving pseudopotentials. Tested and supported job types are:
-\refkeyword{MOLECULAR DYNAMICS} (CLASSICAL, CP and BO),
-\refkeyword{OPTIMIZE WAVEFUNCTION},
-\refkeyword{KOHN-SHAM ENERGIES},
-and \refkeyword{ELECTRONIC SPECTRA}.
-Supported are closed shell systems as well as \refkeyword{LSD} and
-\refkeyword{LOW SPIN EXCITATION} calculations.
-
-\refkeyword{OPTIMIZE GEOMETRY} is experimental and currently
-supports optimization of the QM atom positions only. Use of the
-linear scaling geometry optimizer (\refkeyword{LBFGS}) is highly
-recommended and the currently also the default.
-
-\refkeyword{PROPERTIES} calculations with QM/MM are experimental.
-Most properties (WF projection, population analysis, localization)
-that only need the plain QM wavefunction work.
-
-\refkeyword{LINEAR RESPONSE} calculations are currently at an
-twofold experimental status. Both, the isolated system setup
-(\refkeyword{SYMMETRY} 0) and the QM/MM coupling of the response
-calculations itself are not yet fully tested.
-
-Options that are known to be incompatible with \refkeyword{QMMM} are
-\refkeyword{VIBRATIONAL ANALYSIS}, \refkeyword{PATH INTEGRAL}, and all
-calculations that require a wavefunction optimization via a
-diagonalization method at some point.
-
-%_FM[
-\subsubsection{QM/MM Force Matching}
-\label{sec:forcematch-desc}
-This tool allows the automated (re)parametrization of classical force fields from QM/MM reference
-calculations via a force matching protocol as published in \cite{FM-maurer}. Thereby only MM
-parameters among the atoms comprised in the QM subsystem are reparametrized. In this first release
-VdW parameters are excluded from the optimization and kept constant. Fitting of these parameters
-will be a feature of a future release. \\
-The jobs requires a QM/MM reference TRAJECTORY file and the corresponding gromos topology, input and 
-coordinate files and the cpmd input that were used to generate the reference TRAJECTORY file.
- The initial topology can be a reasonable guess and will be refined during the actual
- force matching procedure. Currently the QM/MM reference trajectory 
- has to be generated prior to the force matching job. \\
-The actual forcematching job is envoked by the \refkeyword{FORCEMATCH} in \&CPMD and the
-\refkeyword{FORCEMATCH ... END FORCEMATCH} block in \&QMMM. Besides, the \&CPMD and \&QMMM sections should contain sensible keywords and parameters for high quality reference forces (e.g. convergence orbitals 1.0d-7). \\
-The parametrization protocol consists of a three-step process: First, the reference trajectory is
-read with a given stride. On each of the selected frames QM/MM reference forces (BO) are calculated.
-The forces on the atoms of the QM subsystem are stored (FM\_REF\_FORCES) along with the Hirschfeld
-charges (FM\_REF\_CHJ) as well as the electrostatic potential and field on the nearby MM atoms
-(FM\_REF\_PIP). Second, a set of atomic point charges that reproduce the electrostatic potential and
-forces that the QM system exerts on the surrounding classical atoms is derived. Third, the nonbonded
-contributions, computed with the charges obtained in the second step and given Lennard-Jones
-parameters, are subtracted from the total reference forces on the QM atoms. The remaining forces are
-assumed to be derived from bonded interactions. The parameters for bonded interactions (torsions,
-bending and bonds) are thus adjusted in order to reproduce the remaining forces. See reference
-\cite{FM-maurer} for details. An updated topology file FMATCH.top is written at the end of the run.
-To check the quality of the fitting procedure a section with the absolute and relative force RMS per
-atom is printed at the end to standard output. \\ Files generated by the force matching code (Some
-of the following default filenames can be changed via the respective keywords in the FORCEMATCH
-block):
-\begin{itemize}
-\item \textbf{FMATCH.top} \\
-      Updated topology file at the end of the job.
-\item \textbf{FM\_REF\_CHJ} \\
-      Hirschfeld charges on the QM atoms from the reference force calculations. Format: Two lines
-per frame. First line contains frame index from the original reference trajectory file. Second line
-gives the Hirschfeld charges on the QM atoms in cpmd ordering.  \item \textbf{FM\_REF\_PIP} \\
-      Electrostatic potential and field on the NN atoms from the reference force calculations.
-\item \textbf{FM\_REF\_FORCES} \\            
-      For each frame extracted from the reference TRAJECTORY file and for which QM/MM forces were
-calculated, the QM/MM forces on the QM atoms are dumped into this file. One line per frame with the
-original frame index and the number of QM atoms. Then for each QM atom in cpmd ordering:\\ atom
-index,x,y,z,fx,fy,fz            
-\end{itemize}
-All force matching related information written to standard output are labeled with '  fm '. After
-the initialization the reference trajectory file is parsed and the line 'fm extracting total number
-of frames for SPs' is printed. For each frame you should find the following lines: 'frame number',
-'computing reference forces' and 'Total nr. of iterations:'. The beginning of the second part of the
-force matching protocol is marked with the line 'Reading values for charge fitting from file'. At
-the end the RMS deviation of the charges, electrostatic potential and field are printed. The third
-part starts with 'Will now loop over reference frames again' to compute the non-bonded interactions.
-After 'Done with classical loop' the covalent parameters are fitted and you can monitor the change
-of the absolute and relative RMS deviation from the reference covalent forces during the
-optimization. 'Optimization successful' indicates the end of the fitting of the covalent parameters,
-FMATCH.top is written and, finally, the total (non-bonded plus covalent) forces are calculated with
-the updated topology to get the RMS deviation of the total force. The force matching related output
-ends with a block containing 'computing RMS per atom'.
-%_FM]
-
-%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Gromacs QM/MM documentation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Gromacs/CPMD QM/MM Calculations}\label{sec:gmxqmmm}
-As of version 3.3 the Gromacs\cite{gmx3} classical MD code contains
-a generic API for QM/MM calculations. So far this API has been used to
-QM/MM interfaces for GAMESS, Gaussian, and \dots CPMD. Unlike in the
-Gromos/CPMD QM/MM interface code (see above) the main MD driver is in
-the classical code. The Gromacs/CPMD interface code is based on the
-EGO/CPMD interface and was developed by Pradip Kumar Biswas in the
-group of Valentin Gogonea at Cleveland State University.
-For additional information and downloads see
-\htref{http://comppsi.csuohio.edu/groups/qmmm.html}{http://comppsi.csuohio.edu/groups/qmmm.html},
-and the respective publication~\cite{gmxqmmm}.
-
-\subsubsection{Technical Introduction}
-The whole interface code is divided into two parts: one part is
-embedded in the Gromacs code and the other in CPMD. Both, the modified
-Gromacs and the CPMD codes are compiled independently and communicate
-via files in the current working directory.
-
-Since the Gromacs code acts as the driver, you first have to set up a regular
-Gromacs classical MD simulation in the usual way by building/providing
-a .pdf/.gro file and a .top file. Before running grompp, you also need
-to create an index file (usually named index.ndx) that lists the atoms
-of the QM subsystem and provide further parameters for the CPMD calculation
-like the size of QM-simulation box, plane-wave cutoff for CPMD, Coulomb cutoff,
-if any, etc (for details, see the rgmx script in the QM/MM examples).
-%Grompp switches off the QM/MM Coulomb interactions and creates the environment
-%for energy minimization or mdrun (as per the case).
-
-During mdrun, the interface is controlled by two function  calls:\\
-a) init\_cpmd() prepares the ground for the QM/MM interface. It sets the flags
-for the QM and MM atoms finds LINK atoms from the topology and prepares temporary
-structures to process the QM/MM data etc.\\
-b) call\_cpmd() first creates the CPMD input file "CPMD\_inp.run" using a template
-"CPMD\_inp.tmpl" and then kickstarts the CPMD code via a "fork/exec" or "system" call.
-The interface is set to use "fork". If system call is preferred, you need to set
-the defined variable NOFORK to 1. call\_cpmd() gets forces and energy from CPMD
-and appends them to Gromacs structures. Gromacs then moves the atoms and while
-evaluating the forces, calls CPMD again (this is the QM/MM loop). Thus this interface
-essentially performs a QM/MM Born-Oppenheimer MD simulation.\\
-
-\subsubsection{Compilation of Gromacs}
-In its present state, you need to use CFLAGS = -DGMX\_QMMM\_CPMD
-in configure to include the CPMD interface code into Gromacs.
-In the adapted Gromacs package, a script "build" is provided in the gromacs folder
-that takes care of the QM/MM configuration and compilation. Please adapt
-as needed.
-
-\subsubsection{Execution of QM/MM runs}
-It is like running Gromacs with the additional needs are given by:
-
-a) having an index.ndx file specifying the QM atoms (see example index.ndx file).
-You can create a usual Gromacs index.ndx file and then append to it the QM
-group.
-
-b) specifying other QM informations like planewave cutoff, qmbox size etc
-in the grompp setup (for the mdp file).
-
-c) having a CPMD input file template "CPMD\_inp.tmpl" where essential keywords
-for CPMD run need to be mentioned. "INTERFACE GMX" is essential for QMMM; it
-ensures a single-point calculation inside CPMD each time it is invoked. Inside the
-interface, all the QM \& MM atoms are translated in such a way that the QM system
-be at the center of the QM box. Thus the keyword "MOLECULE CENTER OFF" is required
-to avoid any further movements of the QM atoms.
-
-Right now the \refkeyword{ODIIS} minimizer and \refkeyword{PCG} minimizer
-(including PCG MINIMIZE) are allowed to be used inside CPMD.
-There also is a hybrid scheme where for the MD first step it will  use the
-"PCG MINIMIZE" but for all subsequent steps it will use the faster ODIIS
-minimizer.). Other sections of CPMD input structures need to be kept as usual
-though the final values for the CELL size and CUTOFF will be those provided
-by you in the mdp file.
-
-\subsubsection{QM/MM Examples}
-Example inputs for a H${}_2$O-dimer and an ethane molecule are bundled with the modified
-gromacs distribution from. \\
-\htref{http://comppsi.csuohio.edu/groups/qmmm.html}{http://comppsi.csuohio.edu/groups/qmmm.html},
-
-% FIXME:
-%\subsubsection{Alternative QM/MM interfaces}
-%Ego interface, use ego interface for PES scanning driver.
-%%% QM/(P)MM Interface
-\subsection{QM/(P)MM Interface to IPHIGENIE}
-The interface of CPMD to the PMM-MD program IPHIGENIE\cite{Schwoerer2013,Schwoerer2015} (\url{https://sourceforge.net/projects/iphigenie})
-supersedes the 
-CPMD interface of Eichinger et al.\ \cite{egoqmmm} to the MD program EGO.\cite{ego1}
-It provides a Hamiltonian coupling to polarizable MM force fields (PMM).
-Here, similar to the Eichinger implementation and the derived CPMD/Gromacs coupling\cite{gmxqmmm},
-CPMD is used only to compute energies and forces 
-but the propagation of the equations of motion is done
-externally by IPHIGENIE. 
-
-The implementation is based on a single executable, which links
-CPMD and the interface routines as libraries to the IPHIGENIE MD executable 'iffi'.
-For CPMD-3.17 a patch is provided on \url{www.cpmd.org} with example configurations 
-for the compilation. For CPMD-4.0 and later the interface to IPHIGENIE is provided as a module.
-Here, using the configure.sh script with the option {\tt -iphigenie}  generates
-a makefile which builds the interface library along with a regular cpmd.x executable.
-
-For further instructions on compiling and example inputs for QM/PMM runs please consult
-the main iphigenie page \url{https://sourceforge.net/projects/iphigenie} and the
-associated Wiki pages.
-
-\subsection{CPMD on parallel computers}
-
-There are three different parallel strategies implemented in CPMD.
-The actual strategy has to be chosen at compile time.
-\begin{itemize}
-   \item Shared memory parallelization\\[8pt]
-         This strategy uses the OpenMP library.
-         The code is compiled {\em without} the {\bf PARALLEL}
-         preprocessor flag and compilation and linking need the
-         corresponding OpenMP flags (dependent on compiler). \\
-         Depending on the overhead of the OpenMP system implementation
-         good speedups can be achieved for small numbers of
-         processors (typically 4 to 8). The advantages of this
-         version of the code are small additional memory usage and it
-         can be used in non-dedicated CPU environments.
-
-   \item Distributed memory parallelization\\[8pt]
-         This is the standard parallelization scheme used in CPMD
-         based on MPI message passing library.\\
-         The single processor version of this code typically
-         shows an overhead of ca. 10\% with respect to the optimal
-         serial code. This overhead is due to additional copy and
-         sort operations during the FFTs.\\
-         All the basic system data and many matrices of the size
-         of the number of electrons are replicated on all
-         processors. This leads to considerable additional memory
-         usage (calculated as the sum over the memory of all
-         processors compared to the memory needed on a single
-         processor). For large systems distributed over many
-         processors the replicated data can dominate the memory usage.\\
-         The efficiency of the parallelization depends on the
-         calculated system (e.g. cutoff and number of electrons) and
-         the hardware platform, mostly latency and bandwidth of the
-         communication system. The most important bottleneck in the
-         distributed memory parallelization of CPMD is the
-         load-balancing problem in the FFT. The real space grids
-         are distributed over the first dimension alone (see line
-         {\tt REAL SPACE MESH:} in the output. As the mesh sizes
-         only vary between 20 (very small systems, low cutoffs) and
-         300 (large systems, high cutoff) we have a rather coarse grain
-         parallelisation. To avoid load inbalance the number of processors
-         should be a divisor of the mesh size. It is therefore clear that even
-         for large systems no speedup can be achieved beyond 300 processors.
-         A solution to this problem is provided with the keyword
-         \refspekeyword{CP GROUPS}. This technique, together with optimal mapping,
-         allow to scale from thousands to millions of cores on modern
-         supercomputers such as IBM BG/Q (in particular when running HFX calculations).  To learn more about the
-         distributed memory parallelization of CPMD consult
-         D. Marx and J. Hutter, "Modern Methods and Algorithms of Quantum Chemistry",
-         Forschungszentrum J\"ulich, NIC Series, Vol. 1 (2000), 301-449.
-         For recent developments and for a perspective see \htref{http://www.cpmd.org}{http://www.cpmd.org}.
-
-         When selecting {\bf NSTBLK} for  \refkeyword{BLOCKSIZE STATES} it is important
-         to take into account the granularity of the problem at hand. For example,
-         in cases where the number of  \refkeyword{STATES} is smaller than the total number of
-                   the available processors, one must choose a value for {\bf NSTBLK} such
-         that only a subgroup of the processors participate in the distributed
-         linear algbera calculations. The same argument is also relevant when
-         the number of  \refkeyword{STATES} is only moderately larger than the number of processors.
-
-   \item Mixed shared/distributed memory parallelization\\[8pt]
-         The two parallelization schemes described above are implemented
-         in such a way that they don't interfere. Therefore it is easy
-         to combine them if this is supported by hardware (shared/distributed
-         memory architecture) and software (libraries). Since the MPI
-         parallization is very efficient for a small to medium number of
-         nodes and all modern MPI libraries are able to take advantage
-         from shared memory communication, using the mixed
-         shared/distributed memory parallelization is of most use if
-         you run a job on a large number of SMP nodes, when the
-         distributed memory parallelization has reached its scalability
-         limit (see above). To learn more about the mixed parallelization
-         scheme of CPMD consult \cite{mixed}.
-\end{itemize}
-
-As with all general statements, these are only guidelines. The only
-way to get reliable information is to run benchmarks with the system
-you want to calculate.
-
-\clearpage
-%---------------------------------------------------------------------
-\section{Questions and Answers}\label{faq}
-
-The following section is a slightly edited collection of questions and
-answers from the cpmd mailing list, cpmd-list@cpmd.org.
-
-\subsection{How to Report Problems}
-Up front a few remarks on how to report problems (and how to respond),
-so that the chances to solve the problem (permanently)
-are as high as possible.
-
-If you have compilation problems, please always state what version of
-CPMD you are trying to compile and what kind of machine you are using,
-i.e. what operating system, what compiler (particularly important on
-linux machines), which compilation flags, and what libraries you are
-using. Best you include the first part of your makefile (up to `End of
-Personal Configuration', please \textbf{don't} post the whole makefile)
-as this contains most of the required information. Also include the
-\textbf{relevant} part of the make output (again, the full output
-usually is very long and rarely needed).
-
-If you have problems with a specific calculation, please include your
-input and the output of the run, so that others can try to reproduce
-the error. Again, please state the version of CPMD you are using and
-the platform you are running on.
-
-A good general guide on how to report bugs can be found at:\\
-\htref{http://freshmeat.net/articles/view/149/}{http://freshmeat.net/articles/view/149/},\\
-the corresponding guide for people responding can be found at:\\
-\htref{http://freshmeat.net/articles/view/1082/}{http://freshmeat.net/articles/view/1082/}.\\
-Another useful article about how to ask questions the smart way is at:\\
-\htref{http://www.catb.org/~esr/faqs/smart-questions.html}{http://www.catb.org/\~{}esr/faqs/smart-questions.html}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Explanation of Warnings and Error Messages}
-\label{sec:expl-warn-error}
-
-\iffaqsum
-FAQ on warnings and errors:
-\begin{itemize}
-\item{\reffaqquestion{wannier}{WANNIER CODE WARNING: GRADIENT FOR RESTA
-FUNCTIONAL}\\(during CP molecular dynamics)}
-\item{\reffaqquestion{xcpp}{WARNING! XC FUNCTIONALS INCONSISTENT}}
-\item{\reffaqquestion{lsdgeoopt}{STOPGM! STACK OF MAIN CALLS} (during geometry
-optimization)}
-\item{\reffaqquestion{spline}{Warning! Spline region smaller than maximum
-G-value}\\(during geometry optimization with variable cell)}
-\item{\reffaqquestion{gorder}{GORDER| PROGRAMING ERROR. INFORM THE
-PROGRAMER} (during startup of WAVEFUNCTION or GEOMETRY optimization)}
-\end{itemize}
-\fi
-
-%%%%%%%%%%
-\faqquestion{wannier}
-Could anybody tell me the follwing error in the cpmd output
-during CP Molecular Dynamics runs with the flag
-\refkeyword{WANNIER WFNOUT} LIST DENSITY?
-
-\begin{verbatim}
-WANNIER CODE WARNING: GRADIENT FOR RESTA FUNCTIONAL IS GMAX=0.118E-02
-\end{verbatim}
-Does it mean any serious error in the calculation?
-
-\faqanswer
-The default spreadfunctional used in CPMD is the Vanderbilt type. At the
-end of the calculation the convergence with respect to the Resta type
-functional is also checked.  For large cells both should be converged at
-the same time.  However, for typical application this is not the case
-and you get the warning.  This is not serious and you can ignore it.
-%jgh
-%%%%%%%%%%
-
-\faqquestion{xcpp}
-A warning message appeared in the output file:
-\begin{verbatim}
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ?WARNING! XC FUNCTIONALS INCONSISTENT FOR h.pp
- ?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-\end{verbatim}
-
-Does it mean that my pseudopotential file is wrong? I used fhi98PP
-to create this pp file, and just recast it. So if it is wrong, what
-more should I do to the output file of fhi98PP?
-
-\faqanswer
-It means that the XC functional used to generate the pseudo potential
-and the functional which you want to use in CPMD are not the same; it
-could be more or less serious: Some of the XC functionals in CPMD are
-just minor variations of each others, e.g. the LDA part is evaluated
-using Perdew-Wang'92, Perdew-Zunger'7? or the Pade-interpolation
-formula. If this is the case, the resulting error is usually small,
-however if your pseudos were generated e.g. with PBE and you try to
-use BLYP, the error might become serious. I suggest you to see what
-are the two functionals (pp \& CPMD-input), and look if the difference
-is significant or not.
-% apsi
-%%%%%%%%%%
-
-\faqquestion{lsdgeoopt}
-When I am running a GEOMETRY OPTIMIZATION using the keywords LSD and
-MULTIPLICITY, I get the following output:
-\begin{verbatim}
- ================================================================
- =                  GEOMETRY OPTIMIZATION                       =
- ================================================================
- NFI      GEMAX       CNORM           ETOT        DETOT      TCPU
- EWALD SUM IN REAL SPACE OVER  1* 1* 1 CELLS
- STOPGM! STACK OF MAIN CALLS:
- STOPGM! CALL    FORCEDR
- STOPGM! CALL     FORCES
- STOPGM! CALL    VOFRHOB
- STOPGM! CALL      GCLSD
-
- PROGRAM STOPS IN SUBROUTINE LSD_GGAX| NOT PROGRAMMED
-\end{verbatim}
-I would like to know how to solve this problem?
-
-\faqanswer
-This simply means that the LSD version of this specific
-functional has not been implemented (yet). Feel free to
-implement it yourself and submit a patch.
-
-Possible solutions are:\\
-\begin{enumerate}
-\item you implement it into CPMD (see file lsd\_func.F)\\
-\item you switch to the PBE functional, which is
-   the modern variant of this functional and is
-   implemented both for spin-restricted and unrestricted cases.
-\end{enumerate}
-%jgh
-%%%%%%%%%%
-                
-\faqquestion{spline}
-I am trying to optimize a crystal structure (both ion positions and
-cell volume) using CPMD and get the warning message:\\
-Warning! Spline region smaller than maximum G-value.\\
-The optimization seems to converge nicely but what does this warning
-mean/imply?
-
-\faqanswer
-This in fact touches several points. The following applies
-also to other variable cell calculations with CPMD (e.g. constant
-pressure simulations).
-
-\begin{itemize}
-\item Pseudopotential functions in CPMD are calculated on a
-   radial grid in G-space and then used in spline interpolations.
-   This speeds up variable cell calculations considerably.
-   The maximum grid point is given by the cutoff. With the
-   keyword
-\begin{verbatim}
-   SPLINE RANGE
-     x.xx
-\end{verbatim}
-   you can enlarge the grid to x.xx times the cutoff.
-   Also, you should make sure, that the number of spline points is
-   large enough. Older version of CPMD defaulted to as little as 501.
-   This is at the lower limit for accuracy with a fixed cell.
-   Especially if you have high cutoffs it is better to increase
-   this value, e.g.
-\begin{verbatim}
-   SPLINE POINTS
-     2500
-\end{verbatim}
-   or larger. The current default (5000) should be large enough.
-
-\item  In a variable cell calculation, CPMD uses a constant
-   number of plane waves. Therefore if your cell
-   contracts the cutoff increases, if the cell gets larger
-   the cutoff decreases. So if you have the first case
-   the spline interpolation needs points above the original
-   cutoff and you get a warning.
-   Depending on the amount of change in the cell you expect
-   a value for the \refkeyword{SPLINE} \textbf{RANGE} of 2--5 is needed.
-
-\item Coming back to the constant number of plane waves.
-   If your cell gets larger the effective cutoff decreases.
-   This may have very undesirable effects and it is better
-   to define the plane waves on a box larger than any box
-   you anticipate the simulation will reach.
-   In order to not have to start with an unreasonable cell
-   you can define the plane waves not with the actual box
-   but with a reference cell, use the keyword
-\begin{verbatim}
-   REFERENCE CELL
-     a b c xa xb xc
-\end{verbatim}
-
-\item However, you really want to do a constant cutoff
-   calculation, not a constant number of plane waves.
-   For technical reasons this is not possible and in
-   principle you should do the calculation at a high
-   enough cutoff in order that the calculation is
-   converged all along the simulation path (with the
-   slight changes in cutoff).
-
-   To avoid these very high cutoffs the group in Trieste
-   came up with a method that allows to perform pseudo
-   constant cutoff calculations.
-   This method is implemented in CPMD
-   (keyword \refkeyword{CONSTANT CUTOFF}) and explained
-   in the paper~\cite{bernasconi95}
-\end{itemize}
-%jgh
-
-\faqquestion{gorder}
-I was optimizing wavefunctions for my system. After a successful run I
-modified CELL VECTORS. This latter calculation crashed with the
-following error either when I restarted (only wavefunctions) or if I
-started from scratch.
-\begin{verbatim}
- GORDER| PROGRAMING ERROR. INFORM THE PROGRAMER
-
-PROGRAM STOPS IN SUBROUTINE GORDER| ERROR IN G-VEC ORDERING (NHG) [PROC= 0]
-\end{verbatim}
-Is there something wrong with the code?
-
-\faqanswer
-This is a known problem in CPMD.
-The message comes from a test, which probes whether the G vectors are in a
-``safe'' order, namely such that after a restart with a different number
-of processes or on a different machine the results agree. Usually this
-error only occurs in large systems with a high cut-off energy and/or
-large unit cells, i.\,e. where one gets lots of close-lying G vectors.
-
-There are two possible workarounds:
-\begin{enumerate}
-\item Slightly change your computational box in one dimension
-   e.\,g. from $10.000000$ to $10.000001$.
-   This helps some times.
-\item
-The check is not 100\,\% accurate.
-This means by just ignoring the message you will
-most likely get correct results. The error would
-only appear in restarts where you could see a small
-inconsistency in energy in the first step. Final
-results should not be affected (except for MD if
-you do restarts).
-
-To avoid the stop, comment out the two lines
-at the end of file lodapa.F of the form
-\begin{verbatim}
-        CALL STOPGM('GORDER','ERROR IN G-VEC ORDERING (NHG)')
-\end{verbatim}
-
-However, be sure to check that the results are reasonable.
-\end{enumerate}
-%AK,apsi,jgh,wjq
-%%%%%%%%%%
-
-\subsection{Pseudopotentials}
-\label{sec:FAQPP}
-
-\iffaqsum
-FAQ on pseudopotentials:
-\begin{itemize}
-\item{\reffaqquestion{whichPP}{Which type of pseudopotentials to use?}}
-\item{\reffaqquestion{whichLMAX}{Which is the correct value of LMAX?}}
-\end{itemize}
-\fi
-
-\faqquestion{whichPP}
-I'm confused about how to select a pseudopotential type (Troullier-Martins,
-Goedecker, etc.). What makes one choose say a Goedecker potential instead
-of a Vanderbilt potential?
-
-\faqanswer
-The choice of a pseudopotential in CPMD calculations depends on
-needs, available resources and taste.
-
-Troullier-Martins norm-conserving pseudopotentials are probably the
-most-commonly used type of pseudopotentials in CPMD calculations.
-They work very well for non-problematic elements and they are quite
-easy to create (note, that it is also easy to create a bad pseudopotential).
-When using the Kleinman-Bylander separation, one also has to be
-careful to avoid so called ghost states (e.g. many transition metals
-need LOC=$l$ with $l$ being an angular momentum smaller than default value
-which is highest).
-
-Goedecker pseudopotentials are stored in an analytical form, that
-ensures the separability, but they usually need a higher (sometimes
-much higher) plane wave cutoff than the corresponding Troullier-Martins
-counterparts. Also the creation procedure is more complicated,
-but there is a very large library of tested
-pseudopotentials (mostly LDA but also some GGA pseudopotentials).
-
-Vanderbilt pseudopotentials have the advantage of needing a much
-reduced plane wave cutoff. The drawback is, that
-only a limited subset of the functionality in CPMD is actually implemented
-with uspps (MD, wavefunction/geometry optimization and related stuff and
-only at the gamma point and you have to make sure, that your real space
-grid is tight enough).
-Also due to sacrificing norm-conservation for softer
-pseudopotentials, your wavefunction has very limited meaning, so
-that not all features available for norm-conserving pseudopotentials
-can actually be easily implemented or implemented at all.
-
-For some elements it can
-be rather difficult to generate good (i.e. transferable) pseudopotentials,
-so you should always check out the available literature.
-
-\faqquestion{whichLMAX}
-How do I choose the correct value of LMAX?
-
-\faqanswer
-If you use a Vanderbilt or Goedecker type potential only the format of
-the LMAX-line has to be valid. The actual value is read from the
-pseudopotential file and the value in the input file will be ignored.
-It is highly recommended to still use values that make sense, in case you want
-to do a quick test with a numerical (Troullier-Martins) pseudopotential.
-
-Generally, the highest  possible value of LMAX depends on the highest
-angular momentum for which a ``channel'' was created in the pseudopotential.
-In the pseudopotential file you can see this from the number of coloumns
-in the \&POTENTIAL section. The first is the radius, the next ones are
-the orbital angular momenta (s, p, d, f,\ldots).
-As an example you can determine a potential for carbon using f-electrons
-and set LMAX=F. Since the f-state is not occupied in this case there is
-very little advantage but it costs calculation time. In short, you can use values
-as high as there is data in the pseudopotential file, but you don't have to
-if it is not needed by the physics of the problem.
-
-A fact that causes confusion is that Hamann's code for pseudopotential
-generation always produces output for the d-channel, even if you only
-request channels s and p. You should be cautious if $r_{c}$ and the
-energy eigenvalue of the p- and d-channels are equal. In most of these
-cases LMAX=P should be used.
-
-\subsection{File Formats and Interpretation of Data}
-\label{sec:file-formats}
-
-\iffaqsum
-FAQ on interpretation of data:
-\begin{itemize}
-\item{\reffaqquestion{etot}{Why is my total energy so much
-    different from a Gaussian calculation?}}
-\item{What is the meaning of the \reffaqquestion{energies}{energies} reported
-in a molecular dynamics simulation?}
-\item{What do \reffaqquestion{gnmax}{GNMAX, GNORM, and CNSTR} mean in a
-geometry optimization?}
-\item{All \reffaqquestion{ir-int}{IR intensities are zero} in VIB.LOG when I
-try to calculate the IR of NH$_4^+$ ion by CPMD}
-\item{Why can some atoms move far away from the central box in a long MD
-simulation of \reffaqquestion{liquidpbcs}{bulk liquid using periodic boundary
-conditions}?}
-\item{Why did the \reffaqquestion{eneele}{electron energy continuously increase}
-during the MD simulation of my metal?}
-\item{What is the meaning of the files \reffaqquestion{raman}{APT,
-    POLARIZATION and POLARIZABILITY} resulting from my linear response calculation of Raman spectra?}
-\item{What is the meaning of \reffaqquestion{dipole}{columns 2 to 7 in the
-DIPOLE file}?}
-\item{How do I use the \reffaqquestion{restart}{binary RESTART file across
-different platforms} with different encoding?}
-\end{itemize}
-\fi
-
-\faqquestion{etot}
-Why is my total energy so much different from a Gaussian calculation?
-
-\faqanswer
-With CPMD you are using \textbf{pseudopotentials} to describe the atoms.
-Since the total energy describes only the interactions between the
-pseudocores and the valence electrons (and \textbf{some} core electrons
-in the case of so-called semi-core pseudopotentials), you are missing
-the contribution of the core electrons and the full core charges of a
-regular all-electron calculation.
-\textbf{Energy differences} between two configurations, on the other
-hand, should be comparable, provided you use the same number of atoms,
-the same plane wave cutoff, the same pseudopotentials, and the same
-supercell geometry in the CPMD calculation.
-
-\faqquestion{energies}
-In a molecular dynamics simulation, CPMD prints out a list of
-energies for each integration step. Does anyone know the meaning
-of the individual values.
-
-\faqanswer
-Some explanations to the energy terms:
-
-\begin{description}
-\item[EKINC] fictitious kinetic energy of the electrons in a.u.
-           this quantity should oscillate but not increase during a
-           simulation.
-\item[TEMPP] Temperature of the ions, calculated from the kinetic
-           energy of the ions (EKIONS).
-\item[EKS]   Kohn-Sham energy (the equivalent of the potential energy
-           in classical MD).
-\item[ECLASSIC] = EKS + EKIONS
-\item[EHAM]     = ECLASSIC + EKINC.
-           Hamiltonian energy, this is the conserved
-           quantity, depending on the time step and
-           the electron mass, this might oscillate but
-           should not drift.
-\item[DIS]    mean square displacement of the ions with respect to
-           the initial positions. Gives some information on the diffusion.
-\end{description}
-
-You can modify the list of individual energies to be displayed
-with the \refkeyword{PRINT ENERGY} keyword.
-%jgh
-%%%%%%%%%%
-
-\faqquestion{gnmax}
-What do GNMAX, GNORM and CNSTR in a geometry optimization mean?
-
-\faqanswer
-\begin{description}
-\item[GNMAX] max${}_{I,a}$ ($|F_{Ia}| $) = largest absolute
-  component ($a=x,y,z$) of the force on any atom $I$.
-\item[GNORM] $\left< F_{I}^2\right>_{I}$ = average force on the atoms $I$
-\item[CNSTR] max${}_{I,a} { F^{constr}_{Ia} }$ = largest absolute
-  component ($a=x,y,z$) of force due to constraints on any atom $I$.
-\end{description}
-% apsi
-%%%%%%%%%%
-
-
-\faqquestion{ir-int}
-I found all the IR intensities in VIB.log file are zero when I try to
-calculate the IR of NH${}_4^+$ ion by CPMD.
-
-\begin{verbatim}
- Harmonic frequencies (cm**-1), IR intensities (KM/Mole),
- Raman scattering activities (A**4/AMU), Raman depolarization ratios,
- reduced masses (AMU), force constants (mDyne/A) and normal coordinates:
-                     1                      2                      3
-                    ?A                     ?A                     ?A
- Frequencies --   142.9800               188.9340               237.2614
- Red. masses --     0.0000                 0.0000                 0.0000
- Frc consts  --     0.0000                 0.0000                 0.0000
- IR Inten    --     0.0000                 0.0000                 0.0000
- Raman Activ --     0.0000                 0.0000                 0.0000
- Depolar     --     0.0000                 0.0000                 0.0000
- Atom AN      X      Y      Z        X      Y      Z        X      Y      Z
-   1   7     0.00   0.00   0.00     0.00   0.00   0.00     0.00   0.00   0.00
-   2   1     0.00  -0.35  -0.50    -0.35   0.00   0.00    -0.50   0.00   0.00
-   3   1     0.00  -0.35   0.50    -0.35   0.00   0.00     0.50   0.00   0.00
-   4   1     0.00   0.35   0.00     0.35   0.00   0.50     0.00  -0.50   0.00
-   5   1     0.00   0.35   0.00     0.35   0.00  -0.50     0.00   0.50   0.00
-                     4                      5                      6
-\end{verbatim}
-
-\faqanswer
-That's not a problem of your calculation. The keyword
-\respkeyword{VIBRATIONAL ANALYSIS} does not calculate intensities.
-The calculation of intensities is currently not possible in CPMD.
-The intensities in the 'VIBx.log' files are arbitrarily set to zero.
-The entries have to be there so that visualisation programs, that are
-able to read output of the Gaussian program, can be also used to
-visualize the CPMD results.
-%
-% hlanger
-%%%%%%%%%%
-
-\faqquestion{liquidpbcs}
-I am trying to simulate a bulk liquid in
-CPMD and supposing that periodic
-boundary conditions are built into the program.
-But after several thousand MD steps, I found some
-particles are far away from the central simulation box.
-
-Why it is so if periodic boundary conditions (PBC) on
-particle coordinates are imposed in all three
-directions?
-
-\faqanswer
-If you are not using the
-\begin{verbatim}
-SYMMETRY
-  0
-\end{verbatim}
-options your calculations are actually using periodic boundary
-conditions (PBC). PBC are imposed within CPMD for
-all calculations. However, the particle positions
-are not folded back to the original computational
-box. The reason for this is that most people prefer
-to have ``smooth'' trajectories without jumps of
-particles. This allows for easier tracking of
-special particles and nicer graphics. In addition
-it is easy (with a little script) to apply PBC
-afterwards yourself, if needed.
-%
-% jgh
-%%%%%%%%%%
-
-
-\faqquestion{eneele}
-I am trying to simulate a bulk sodium and
-I found electron energy is increasing
-continuously and it is in the range of 0.07 a.u. at
-the end of 20000 steps.
-
-\faqanswer
-Sodium is a metal, and therefore missing an important
-feature that allows for stable CP dynamics: the band gap.
-Using Nos\'{e} thermostats (on electrons and ions) it
-might still be possible to perform meaningful CP
-simulations~\cite{Blochl92}.
-
-The choice of parameters for the thermostats, however,
-will be nontrivial, highly system dependent and require
-extensive testing.
-Without thermostats you will have strong coupling between
-electronic degrees of freedom and ionic degrees of freedom.
-Adiabaticity is not maintained and a steady increase of the
-fictitious kinetic energy will occur.
-%
-% jgh
-%%%%%%%%%%
-
-
-\faqquestion{raman}
-I have computed RAMAN by LINEAR RESPONSE, and get three files: APT,
-POLARIZATION and POLARIZABILITY with lots of data in these files. I
-want to know the meaning of the data, please give me some answer in
-detail. 
-
-\faqanswer
-The POLARIZABILITY file simply contains the polarizability tensor of the
-whole system in atomic units. The POLARIZATION file contains the
-total dipole moment (electronic + ionic) of the
-whole system in atomic units. As for the file APT, it contains the
-atomic polar tensors for each atom in the system.  The atomic polar
-tensor is the derivative of the forces on the atoms with respect to an
-applied external electric field. Equivalently it is, from a Maxwell
-relation, the derivative of the total dipole of the system with respect
-to the nuclei positions. It is thus an important ingredient of the
-calculation of infrared spectra intensities, for example used in an
-harmonic approximation. The trace of this tensor is the so-called Born
-charge of the considered atom.  The data is arranged in the following
-order (still in a.u.): the APT tensor is
-$\frac{\mathrm{d}F_{I,i}}{\mathrm{d}E_{j}}$ where $F_{I,i}$ is the force
-on atom I along $i=x,y,z$ and $E_j$ is the electric field along
-$j=x,y,z$. $(I,i)$ are the indices of the $3N$ atoms lines in the APT
-file, one atom after the other, and $j$ is the column index in the APT
-file.
-%Rodolphe Vuilleumier
-
-\faqquestion{dipole}
-I was wondering what columns 2 to 7 in the DIPOLE file correspond to?
-When I run CPMD v.3.5.1, columns 2 to 4 come out identical to columns
-5 to 7 respectively. When I run with CPMD v.3.4.1, the columns
-come out different. Is there an explanation for this?
-
-\faqanswer
-Columns 2 to 4 in the DIPOLE file are the electronic
-contribution to the dipole moment, columns 5 to 7 are
-the total (electronic + ionic) dipole moment.
-All dipole moments are divided by the volume of the box.
-
-In CPMD version 3.5.1 we have changed the reference point
-of the calculation. Now the reference point is chosen such
-that the ionic contribution is zero and the electronic
-contribution minimal (=total dipole). This avoids
-a problem that occasionally was seen in older versions.
-The electronic dipole is calculated modulo(2$\pi$/L).
-Now if the electronic dipole became too large, because
-the ionic contribution was large (bad choice of reference
-point) the total dipole made jumps of 2$\pi$.
-%jgh
-
-\faqquestion{restart}
-As you know, the cpmd RESTART file is saved as binary.
-But I want to change it to ASCII and vice versa, because I use several
-machines of different architecture, for example COMPAQ, IBM, and
-LINUX machine. Please help me with any comments.
-
-\faqanswer
-The code to read and write the RESTART file is in the files rv30.F
-and wv30.F. Feel free to implement an ASCII version of the restart,
-but be aware that the file will be \textbf{huge}.
-
-But you may not need to do that. Let's say you decide to use big-endian
-binary encoding (this is what e.g. IBM, Sun and SGI machines do
-natively).\\
-With Compaq machines there is a compiler flag, -convert,
-which you could set to big\_endian (we only have here
-linuxalpha, but the compaq compiler should be essentially the same).
-
-On a Linux PC you can use the use the -Mbyteswapio or
-the -byteswapio flag, if you have the PGI compiler.
-
-For the Intel compiler (ifc/ifort/efc) you simply set the environment
-variable F\_UFMTENDIAN to big (i.e.\\'export F\_UFMTENDIAN=big'\\if you are in
-a bourne/korn shell and\\'setenv F\_UFMTENDIAN big'\\if you are in a (t)csh).
-
-Now even your cpmd executables will read and write big-endian
-restart files.
-
-Check your compiler documentation for more details (search for endian).
-%AK
-
-
-\subsection{Input Parameter Values}
-\label{sec:input-param-valu}
-
-\iffaqsum
-FAQ on input parameters:
-\begin{itemize}
-\item{If I set the keyword \reffaqquestion{systematomrestart}{RESTART
-WAVEFUNCTION COORDINATES}, would I have to
-write the \&SYSTEM and \&ATOM section again?}
-\item{Could anybody tell me \reffaqquestion{cutoff}{how to choose the energy
-cutoff in \&SYSTEM section}?}
-\item{I have a problem with \reffaqquestion{unocc}{visualising unoccupied
-orbitals}. Either I get only occupied orbitals, or, if I add one empty state
-when optimizing wavefunction the program never reaches convergence.}
-\item{Is there any way to force \reffaqquestion{dumpdensity}{CPMD to dump
-DENSITY files every N steps of a molecular dynamics run}?}
-\item{\reffaqquestion{bandstruct}{How do I calculate a Band structure with
-CPMD}?}
-\item{I want to collide fast atoms against surfaces. Why are the
-\reffaqquestion{velocities}{initial velocities given using the VELOCITIES
-keyword} not considered in the calculation?}
-\item{I want to to run CPMD with \reffaqquestion{gaussianbasis}{basis sets
-equivalent to Gaussian} 6-31+G(d) and 6-311+G(2d,p). How do i set up the
-\&BASIS section?}
-\item{\reffaqquestion{newdft}{How do I add support for a new functional?}}
-\end{itemize}
-\fi
-
-\faqquestion{systematomrestart}
-If I set the keyword RESTART WAVEFUNCTION COORDINATES, would I have to
-write the \&SYSTEM and \&ATOM section again?
-
-
-\faqanswer
-Yes, you have to include the \&SYSTEM and \&ATOM sections even if you
-are restarting. If you write RESTART COORDINATES, the coordinates in the
-RESTART file override the ones in the input. RESTART WAVEFUNCTION alone
-does not select the coordinates in the RESTART file, but does use those
-in the \&ATOMS section.
-%
-% srb
-%%%%%%%%%%
-
-\faqquestion{cutoff}
-Could anybody tell me how to choose the energy cutoff in \&SYSTEM section?
-
-\faqanswer
-The best way to choose the cutoff for CPMD calculations
-is by running first a series of tests. Select a test system
-and a representative quantity (bond length, reaction energy,
-etc.), perform a series of calculations with increasing
-cutoff, pick the lowest cutoff with satisfactory results.
-
-It's always a good idea to make checks at some critical points
-of the calculations by increasing the cutoff. See also section \ref{hints:cutoff}.
-%jgh
-%%%%%%%%%%
-
-\faqquestion{unocc}
-I have a problem with visualising unoccupied orbitals. When I use
-\refkeyword{RHOOUT}~BANDS or \refkeyword{CUBEFILE}~ORBITALS after the
-wavefunction optimization I get only occupied orbitals.
-If I add one empty state when optimizing wavefunction
-the program never reaches convergence.
-
-\faqanswer
-The most efficient way to calculate unoccupied orbitals
-is to first optimize the occupied orbitals  and then
-restart the calculation using the run option
-\begin{verbatim}
- KOHN-SHAM ENERGIES
-  n
-\end{verbatim}
-where n ist the number of unoccupied orbitals. This
-will diagonalize the Kohn-Sham Potential (defined
-by the occupied orbitals alone).
-
-To test if everything goes fine, you can check
-the total energy printed at the beginning of this
-job, it should be exactly the one at the end of the
-optimization. In addition, if you don't change the
-default convergence criteria, the number of
-converged Kohn-Sham states should be equal to
-the number of occupied states in the first step.
-%
-% jgh
-%%%%%%%%%%
-
-\faqquestion{dumpdensity}
-Is there any way to force CPMD to dump DENSITY files every N
-steps of molecular dynamics run instead (or except) of the end of
-the job?
-
-\faqanswer
-Short of modifying the source code, you could set the parameter
-\refkeyword{RESTFILE} to a large number and than have CPMD
-write a restart file every N steps via the \refkeyword{STORE} keyword.
-Now you rename each restart in turn from RESTART.\# to RESTART and do
-a single step calculation using the \refkeyword{RESTART} keyword without
-the LATEST modifier which will write the DENSITY file (or run
-a \refkeyword{PROPERTIES} job using \refkeyword{CUBEFILE} DENSITY to get
-the cube file directly).
-
-\faqquestion{bandstruct}
-How do I calculate a Band structure with CPMD?
-   To calculate a band structure with CPMD,
-You first calculate the correct density for your system with
-a Monkhorst-Pack Mesh.
-
-\faqanswer
-Then you use:
-OPTIMIZE WAVEFUNCTIONS
-with MAXSTEP 1 (no self-consistency)
-and RESTART DENSITY.
-
-In the section KPOINTS, you should use for instance a bcc:
-\begin{verbatim}
-   KPOINTS BANDS
-        51   0   0   0      0   0   1             Gamma to H
-        51   0   0   1      0  .5  .5             H to N
-        51   0  .5  .5     .5  .5  .5             N to P
-        51  .5  .5  .5      0   0   0             P to Gamma
-        51   0   0   0     .5  .5   0             Gamma to N
-        51   0   0   1     .5  .5  .5             H to P
-        0    0 0 0  0 0 0
-\end{verbatim}
-
-You say that you want 51 points from (0,0,0) and (0,0,1) and
-so on. The last line with many zeros is to stop.
-
-If the memory of your computer is not enough, you can add in
-the line KPOINTS the option BLOCK=50 that means you want to
-have only 50 kpoints in memory. This options worked some time ago.
-%tdeutsch
-
-\faqquestion{velocities}
-   I've been recently trying to use the VELOCITIES keyword in a molecular
-dynamics run. I want to collide fast atoms against surfaces. Despite the
-code seems to read the input velocities properly, when the run starts the
-initial velocities are always the same (apparently coming from a
-thermal distribution), no matter what is the velocity you specify for the
-                incoming atom. I'm not using QUENCH IONS, so I don't understand why the
-input initial velocities are not considered in the calculation.
-
-\faqanswer
-There is no straightforward way in CPMD to achieve what you
-want. I suggest to follow this procedure:\\
-
-1) Run a single step of MD with the following set up
-\begin{verbatim}
-MOLECULAR DYNAMICS
-MAXSTEP
- 1
-RESTART WAVEFUNCTION COORDINATES
-TEMPERATURE
-  300   <- or whatever your surface should be
-\end{verbatim}
-
-This generates RESTART and GEOMETRY files.
-Now edit the GEOMETRY file to change the velocities
-of the particles according to your experiment.
-Now restart the MD with the options
-\begin{verbatim}
-MOLECULAR DYNAMICS
-MAXSTEP
- 1000
-RESTART WAVEFUNCTION COORDINATES VELOCITIES GEOFILE
-QUENCH ELECTRONS
-\end{verbatim}
-The effect of this is:
-IONIC coordinates and velocities are read from GEOMETRY,
-ELECTRON wavefunctions and velocities are read from RESTART,
-ELECTRON velocities are set to zero.
-% jgh
-%%%%%%%%%%
-
-\faqquestion{gaussianbasis}
-I want to to run CPMD with basis sets equivalent to Gaussian
-6-31+G(d) and 6-311+G(2d,p). How do I set up the \&BASIS section?
-
-\faqanswer
-You should be able to construct
-inputs from the description in this manual (see section~\ref{input:basis}).
-
-Please note, that the basis set generated from the \&BASIS
-section is used in CPMD for two purposes:
-\begin{enumerate}
-\item Analyzing orbitals:\\
-   We usually use the atomic pseudo-wavefunctions to analyze
-   the orbitals from CPMD. The 6-31G type Gaussian basis
-   sets are for all electron calculations. Don't expect
-   very good results when analyzing wavefunctions from a
-   pseudopotential calculation.
-\item Generating orbitals for an initial guess:\\
-   By default we use a Slater minimal basis. In most
-   cases the effort to produce a better initial guess
-   using ``better'' wavefunctions does not pay off.
-\end{enumerate}
-%
-% jgh
-%%%%%%%%%%
-
-\faqquestion{newdft}
-How do I add support for a new functional?
-
-\faqanswer
-Have a look at the file dftin.F, where you can see
-how CPMD reads the \&DFT section and then follow the flow
-of the defined variables through the files, e.g. functionals.F,
-gcener.F, lsd\_func.F, and so on.
-%
-% AK
-%%%%%%%%%%
-
-\cleardoublepage
-%---------------------------------------------------------------------
-%
-
-\section*{References}
-%With section* by default, no entry in the table of contents
-\addcontentsline{toc}{section}{References}
-%Rename Reference name
-\renewcommand{\refname}{}
-
-\begin{thebibliography}{999}
-
-%The empty line is needed after each bibitem for hyperref
-
-\bibitem{codata2006}
-  P.J.~Mohr, B.N.~Taylor, and D.B.~Newell,
-  {\em The 2006 CODATA Recommended Values of the 
-  Fundamental Physical Constants},
-  Web Version 5.1, 2007.
-
-\bibitem{Allen87}
-    M.P.~Allen and D.J.~Tildesley,
-    {\em Computer Simulations of Liquids},
-    Clarendon Press, Oxford, 1987.
-
-\bibitem{CP85}
-    R.~Car and M.~Parrinello,
-    Phys.~Rev.~Lett. {\bf 55}, 2471 (1985).
-
-\bibitem{Vanderbilt}
-    D.~Vanderbilt, Phys.~Rev.~B {\bf 41}, 7892 (1990).
-
-\bibitem{Galli91} G.~Galli and M.~Parrinello, 
-{\it Computer Simulation in Materials Science}, in {\em Proc.\ NATO ASI}, Eds.\ M.~Meyer and V.~Pontikis, 
-    Kluwer, 1991.
-
-\bibitem{Nose84}
-    S.~Nos\'e, J.~Chem.~Phys. {\bf 81}, 511 (1984),
-    Mol.~Phys. {\bf 52}, 255 (1984).
-
-\bibitem{Hoover85}
-    W.~G.~Hoover, Phys.~Rev.~A {\bf 31}, 1695 (1985).
-
-\bibitem{KS}
-    W.~Kohn and L.~J.~Sham, Phys.~Rev. {\bf 140}, A1133, (1965).
-
-\bibitem{Marx94}
-    D. Marx and M. Parrinello,
-    Z.~Phys.~B (Rapid Note) {\bf 95}, 143 (1994).
-
-\bibitem{Marx96}
-    D. Marx and M. Parrinello,
-    J.~Chem.~Phys. {\bf 104}, 4077 (1996).
-
-\bibitem{parrah}
-    M.~Parrinello and A. Rahman,
-    J.~Appl.~Phys. {\bf 52}, 7182 (1981).
-
-\bibitem{parrah2}
-    M.~Parrinello and A. Rahman,
-    Phys.~Rev.~Lett. {\bf 45}, 1196 (1980).
-
-\bibitem{goe_pp}
-    S.~Goedecker, M.~Teter, and J.~Hutter, Phys.~Rev.~B {\bf 54}, 1703 (1996).\\
-    C.~Hartwigsen, S.~Goedecker, and J.~Hutter, Phys.~Rev.~B {\bf 58}, 3641 (1998).
-
-\bibitem{Alavi94}
-    A.~Alavi, J.~Kohanoff, M.~Parrinello, and D.~Frenkel,
-    Phys.~Rev.~Lett. {\bf 73}, 2599 (1994).
-
-\bibitem{Tuckerman96}
-    M.~E. Tuckerman, D. Marx, M.~L. Klein, and M. Parrinello,
-    J.~Chem.~Phys. {\bf 104}, 5579 (1996).
-
-\bibitem{egoqmmm} M.~Eichinger, P.~Tavan, J.~Hutter, and M.~Parrinello,
-    J.~Chem.~Phys. {\bf 110}, 10452 (1999).
-
-\bibitem{LinRes}
-    H.~B.~Callen and R.~F.~Greene, Phys.~Rev. {\bf 86}, 702 (1952).\\
-    R.~Kubo, J.~Phys.~Soc.~Japan {\bf 12}, 570 (1957). 
-
-\bibitem{Marzari97}
-    N.~Marzari and D.~Vanderbilt,
-    Phys.~Rev.~B {\bf 56}, 12847 (1997).
-
-\bibitem{qmmm02}
-    A.~Laio, J.~VandeVondele, and U.~R\"othlisberger
-    J.~Chem.~Phys. {\bf 116}, 6941 (2002).
-
-\bibitem{qmmm03}
-    A.~Laio, J.~VandeVondele, and U.~R\"othlisberger
-    J.~Phys.~Chem.~B {\bf 106}, 7300 (2002).
-
-\bibitem{qmmm04}
-    M.~Boero, {\it Reactive Simulations for Biochemical Processes}
-    in {\em Atomic-Scale Modeling of Nanosystems and
-    Nanostructured materials} p.\~81-98, Springer,
-    Berlin Heidelberg, 2010. ISBN 978-3-642-04650-6
-
-\bibitem{apdsmp} A. Putrino, D. Sebastiani, and M. Parrinello,
-     J.~Chem.~Phys. {\bf 113}, 7102 (2000).
-
-\bibitem{apmp} A. Putrino and M. Parrinello,
-     Phys.~Rev.~Lett. {\bf 88}, 176401 (2002).
-
-\bibitem{dsmp} D. Sebastiani and M. Parrinello,
-     J.~Phys.~Chem.~A {\bf 105}, 1951 (2001).
-
-\bibitem{mimp} M. Iannuzzi and M. Parrinello,
-      Phys.~Rev.~B {\bf 64}, 233104 (2002).
-
-\bibitem{LSCAL}
-    S.~R. Billeter, A.~Curioni, and W.~Andreoni,
-    Comput.~Mat.~Sci. {\bf 27}, 437 (2003).
-
-\bibitem{alaio} A. Laio and M. Parrinello,
-      Proc.~Natl~ Acad.~Sci.~USA {\bf 20}, 12562 (2002).
-
-\bibitem{iannuzzi}  M. Iannuzzi, A. Laio, and M. Parrinello,
-      Phys.~Rev.~Lett. {\bf 90}, 238302 (2003).
-
-\bibitem{Hockney70}
-    R.~W.~Hockney, Methods Comput.~Phys. {\bf 9}, 136 (1970).
-
-\bibitem{Elstner}
-   M. Elstner, P. Hobza, T. Frauneheim, S. Suhai, and
-   E. Kaxiras,  J.~Chem.~Phys. {\bf 114}, 5149 (2001).
-
-\bibitem{Frank98}
-    I. Frank, J. Hutter, D. Marx, and M. Parrinello,
-    J.~Chem.~Phys. {\bf 108}, 4060 (1998).
-
-\bibitem{xcder}
-    D. Egli and S.~R. Billeter,
-    Phys.~Rev.~B {\bf 69}, 115106 (2004).
-
-\bibitem{gmxqmmm} P.~K.~Biswas, V.~Gogonea,
-    J.~Chem.~Phys. {\bf 123},164114 (2005).
-    The corresponding modifications to the Gromacs code are available at
-\htref{http://comppsi.csuohio.edu/groups/}{http://comppsi.csuohio.edu/groups/}
-
-\bibitem{bgl} J. Hutter and A. Curioni,
-     ChemPhysChem {\bf 6}, 1788-1793 (2005).
-
-\bibitem{mixed} J. Hutter and A. Curioni,
-     Parallel Computing {\bf 31}, 1 (2005).
-
-\bibitem{shock}
-    E.J.~Reed, L.E.~Fried and J.D.~Joannopoulos,
-    Phys.~Rev.~Lett. {\bf 90}, 235503 (2003).
-
-\bibitem{GrimmJCP2003}
-    S. Grimm, C. Nonnenberg, and I. Frank, J.~Chem.~Phys. {\bf 119}, 11574 (2003).
-
-\bibitem{Grimme06}
-    S.~Grimme, J.~Comp.~Chem. {\bf 27}, 1787 (2006).
-
-\bibitem{be_cur}
-C. Bekas and A. Curioni
-Comp.~Phys.~Comm.{\bf 181}, 1057 (2010)
-
-\bibitem{ober}
-H ~Oberhofer and J.~Blumberger,
-J.~Chem.~Phys. {\bf 131}, 064101 (2009)
-
-\bibitem{ceriotti}
-M.~Ceriotti, G.~Bussi and M.~Parrinello,
-Phys.~Rev.~Lett.{\bf 102} , 02061 (2009)
-
-\bibitem{Ceriotti10}
-    Ceriotti, M. and Bussi, G. and Parrinello, M.,
-    J.~Chem.~Th.~Comput. {\bf 6}, 1170 (2010).
-
-\bibitem{HSE06a}
-J.~Heyd, G.~E.~Scuseria, and M.~Ernzerhof,
-J.~Chem.~Phys. {\bf 118}, 8207 (2003);
-J.~Chem.~Phys. {\bf 124}, 21990624(E) (2006).
-
-\bibitem{HSE06b}
-A.~V.~Krukau, O.~A.~Vydrov, A.~F.~Izmaylov, and G.~E.~Scuseria,
-J.~Chem.~Phys. {\bf 125}, 224106 (2006).
-
-\bibitem{taver}
-I. ~Tavernelli, B.~Curchod and U.~R\"othlisberger
-J.~Chem.~Phys. {\bf 131}, 196101 (2009).
-
-\bibitem{taver1} 
-I.~Tavernelli
-Phys.~Rev.~B  {\bf 73}, 094204,(2006).
-
-\bibitem{Kerker}
-    G.~P.~Kerker, Phys.~Rev.~B {\bf 23}, 3082 (1981).
-
-\bibitem{Eijnden06}
-    L.~Maragliano, A.~Fischer, E.~Vanden-Eijnden, and G.~Ciccotti, 
-    J.~Chem.~Phys. {\bf 125}, 024106 (2006).
-
-\bibitem{taver_eh}
-    I.~Tavernelli, U.F.~Rohrig, U.~R\"othlisberger
-    Mol.~Phys. {\bf 103}, 963 (2005).
-
-\bibitem{acm0}
-    M. Ernzerhof, {\it Density Functionals: Theory and Applications},
-    in {\em Lecture Notes in Physics}, vol. 500, Eds. D.~P. Joubert,
-    Springer--Verlag, Berlin, 1998.
-
-\bibitem{adamo2000}
-    C. Adamo, A. di Matteo, and V. Barone, {\it From Classical Density
-    Functionals to Adiabatic Connection Methods. The State of the
-    Art.} in {\em Advances in Quantum Chemistry}, Vol. 36, Academic Press
-    (2000).
-
-\bibitem{acm1}
-    A.~D. Becke, J.~Chem.~Phys. {\bf 104} 1040 (1996).
-
-\bibitem{acm3}
-    A.~D. Becke, J.~Chem.~Phys. {\bf 98} 5648 (1993).
-
-\bibitem{Becke88}
-    A.~D.~Becke,
-    Phys.~Rev.~A {\bf 38}, 3098 (1988).
-
-\bibitem{Berendsen84}
-    H.~J.~C.~Berendsen, J.~P.~M.~Postma, W.~F.~van~Gunsteren, 
-    A.~DiNola, and J.~R.~Haak,
-    J.~Chem.~Phys. {\bf 81}, 3684 (1984).
-
-\bibitem{Fletcher80}
-    R.~Fletcher,
-    {\em Practical Methods of Optimizations}, vol. 1, 
-    Wiley,: New York, 1980.
-
-\bibitem{Johnson88}
-    D.~D. Johnson, Phys.~Rev.~B {\bf 38}, 12807 (1988).
-
-\bibitem{Cao93}
-  (a) J. Cao and G.~A. Voth,
-    J.~Chem.~Phys. {\bf 99}, 10070 (1993);
-  (b) J. Cao and G.~A. Voth,
-    J.~Chem.~Phys. {\bf 100}, 5106 (1994).
-
-\bibitem{Martyna96}
-  (a) G.~J. Martyna,
-    J.~Chem.~Phys. {\bf 104}, 2018 (1996);
-  (b) J. Cao and G.~J. Martyna,
-    J.~Chem.~Phys. {\bf 104}, 2028 (1996).
-
-\bibitem{aicmd}
-    D. Marx, M.~E. Tuckerman, and G.~J. Martyna,
-    Comput.~Phys.~Commun. {\bf 118}, 166 (1999).
-
-\bibitem{Hirshfeld77}
-    F.~L.~Hirshfeld,
-    Theoret.~Chim.~Acta {\bf 44}, 129 (1977).
-
-\bibitem{Cox84}
-    S.~R.~Cox and P.~A.~~Kollman,
-    J.~Comput.~Chem. {\bf 5}, 129 (1984).
-
-\bibitem{solve} M. Boero, M. Parrinello, K. Terakura, T. Ikeshoji, and C.~C. Liew,
-     Phys.~Rev.~Lett. {\bf 90}, 226403 (2003).
-
-\bibitem{solve2} M. Boero, J.~Phys.~Chem.~A {\bf 111}, 12248 (2007).
-
-\bibitem{bernasconi95}
-    M. Bernasconi, G.~L. Chiarotti, P. Focher, S. Scandalo, E. Tosatti,
-    and M. Parrinello, J.~Phys.~Chem.~Solids, {\bf 56} 501 (1995).
-
-\bibitem{xray} M. Cavalleri, M. Odelius, A. Nilsson and L. G. Pettersson,
-     J.~Chem.~Phys. {\bf 121}, 10065 (2004).
-
-\bibitem{nonadiabatic}
-    S.~R. Billeter and A.~Curioni,
-    J.~Chem.~Phys. {\bf 122}, 034105 (2005).
-
-\bibitem{davidson75} E.~R. Davidson,
-     J.~Comput.~Phys. {\bf 17}, 87 (1975).
-
-\bibitem{Fosdick66}
-    L.~D. Fosdick and H.~F. Jordan,
-    Phys.~Rev. {\bf 143}, 58 (1966).
-
-\bibitem{vdb_berry}
-     R.~Resta, Ferroelectrics {\bf 136}, 51 (1992). \\
-     R.~D. King--Smith and D. Vanderbilt, Phys.~Rev.~B {\bf 47}, 1651 (1993). \\
-     R.~Resta, Europhys.~ Lett. {\bf 22}, 133 (1993).
-
-\bibitem{resta}
-     R.~Resta, Rev.~Mod.~Phys. {\bf 66}, 899 (1994). \\
-     R.~Resta, Phys.~Rev.~Lett. {\bf 80}, 1800 (1998). \\
-     R.~Resta, Phys.~Rev.~Lett. {\bf 82}, 370 (1999).
-
-\bibitem{PSil99}
-    P.~L.~Silvestrelli, Phys.~Rev.~B {\bf 59}, 9703 (1999).
-
-\bibitem{berghold} G. Berghold, C.~J. Mundy, A.~H. Romero, J. Hutter, and M. Parrinello,
-      Phys.~Rev.~B {\bf 61}, 10040 (2000).
-
-\bibitem{distrib.lanczos.07}
-    C.~Bekas, A.~Curioni and W.~Andreoni,
-    Parallel Computing {\bf 34}, 441 (2008). 
-
-\bibitem{tddft_all}
-     E. Runge and E.~K.~U. Gross, Phys.~Rev.~Lett. {\bf 52}, 997 (1984). \\
-     M.~E. Casida, in {\em Recent Advances in Density Functional Methods}, Vol. 1,
-     edited by D.~P. Chong (World Scientific, Singapore, 1995). \\
-     M.~E. Casida, in {\em Recent Developments and Applications of Modern
-     Density Functional Theory}, Theoretical and Computational Chemistry, Vol. 4,
-     edited by J.~M. Seminario (Elsevier, Amsterdam, 1996). \\
-     C. Jamorski, M.~E. Casida, and D.~R. Salahub, J.~Chem.~Phys. {\bf 104}, 5134 (1996). \\
-     S.~J.~A. van Gisbergen, J.~G. Snijders, and E.~J. Baerends, J.~Chem.~Phys. {\bf 103}, 9347 (1996). \\
-     R. Bauernschmitt and R. Ahlrichs, Chem.~Phys.~Lett. {\bf 256}, 454 (1996). \\
-     K.~B. Wiberg, R.~E. Stratmann, and M.~J. Frisch, Chem.~Phys.~Lett. {\bf 297}, 60 (1998). \\
-     R.~E. Stratmann, G.~E. Scuseria, and M.~J. Frisch, J.~Chem.~Phys. {\bf 109}, 8218 (1998). \\
-     A.~G\"orling, H.~H. Heinze, S.~Ph. Ruzankin, M. Staufer, and N. R\"osch,
-     J.~Chem.~Phys. {\bf 110}, 2785 (1999). \\
-     R. Bauernschmitt, M. H\"aser, O. Treutler, and R. Ahlrichs, Chem.~Phys.~Lett. {\bf 264}, 573 (1997).
-
-\bibitem{tddft_pw} J.~Hutter,
-    J.~Chem.~Phys. {\bf 118}, 3928 (2003).
-
-\bibitem{Becke90}
-    A.~D.~Becke and K.~E.~Edgecombe,
-    J.~Chem.~Phys. {\bf 92}, 5397 (1990).
-
-\bibitem{silsav}
-    B.~Silvi and A.~Savin,
-    Nature {\bf 371}, 683 (1994).
-
-\bibitem{marx-savin-97}
-    D. Marx and A. Savin,
-    Angew.~Chem.~Int.~Ed.~Engl. {\bf 36}, 2077 (1997).
-
-\bibitem{homeofelf}
-    Check the ELF homepage
-    \htref{http://www.cpfs.mpg.de/ELF/}%
-    {http://www.cpfs.mpg.de/ELF/}
-    for lots of useful information in particular on how ELF
-    should be interpreted.
-
-\bibitem{Kohut96}
-    M.~Kohut and A.~Savin,
-    Int.~J.~Quant.~Chem. {\bf 60}, 875--882 (1996)
-
-\bibitem{tavernelli2010}
-    I.~Tavernelli, B.~F.~E.~Curchod, and U.~Rothlisberger,
-    Phys.~Rev.~ A. {\bf 81}, 052508 (2010).
-
-\bibitem{surfhop} N.~L.~Doltsinis, D.~Marx,
-    Phys.~Rev.~Lett. {\bf 88}, 166402 (2002).
-
-\bibitem{PSil}
-    P.~L.~Silvestrelli, A.~Alavi, M.~Parrinello, and D.~Frenkel,
-    Phys.~Rev.~Lett. {\bf 77}, 3149 (1996).
-
-\bibitem{mbaops}
-    M.~Boero, A.~Oshiyama, P.~L.~Silvestrelli, and K.~Murakami,
-    Appl.~Phys.~Lett. {\bf 86}, 201910 (2005).
-
-\bibitem{lsets}
-    S.~R. Billeter and D.~Egli,
-    J.~Chem.~Phys. {\bf 125}, 224103 (2006).
-
-\bibitem{Csaszar84}
-    P.~Cs\'asz\'ar and P.~Pulay,
-    J.~Mol.~Struct. {\bf 114} 31 (1984).
-
-\bibitem{Perdew92}
-    J.~P.~Perdew, J.~A.~Chevary, S.~H.~Vosko, K.~A.~Jackson,
-    M.~R.~Pederson, D.~J.~Singh, and C.~Fiolhais, 
-    Phys.~Rev.~B {\bf 46}, 6671 (1992);
-    {\it Erratum} Phys.~Rev.~B {\bf 48}, 4978 (1993).
-
-\bibitem{Perdew96}
-    J.~P.~Perdew, K.~Burke, and M.~Ernzerhof,  
-    Phys.~Rev.~Lett. {\bf 77}, 3865 (1996).
-
-\bibitem{Zhang98}
-    Y.~Zhang and W.~Yang, Phys.~Rev.~Lett. {\bf 80}, 890 (1998).
-
-\bibitem{Handy98}
-    A.D. Boese, N.L. Doltsinis, N.C. Handy, and M. Sprik,
-    J.~Chem.~Phys. {\bf 112}, 1670 (2000).
-
-\bibitem{Optx}
-    N.~C.~Handy and A.~J.~Cohen, 
-    J.~Chem.~Phys. {\bf 116}, 5411 (2002).
-
-\bibitem{Perdew07}
-    J.~P. Perdew, A. Ruzsinszky, G.~I. Csonka, O.~A. Vydrov, G.~E. Scuseria,
-    L.~A. Constantin, X. Zhou, and K. Burke,
-    Phys.~Rev.~Lett. {\bf 100}, 136406 (2008).
-
-\bibitem{Perdew86}
-    J.~P.~Perdew,
-    Phys.~Rev.~B {\bf 33}, 8822 (1986);
-    {\it Erratum} Phys.~Rev.~B {\bf 34}, 7406 (1986).
-
-\bibitem{Lee88}
-    C.~Lee, W.~Yang and R.~G.~Parr,
-    Phys.~Rev.~B {\bf 37}, 785 (1988).
-
-\bibitem{Tuckerman94}
-    M.~E.~Tuckerman and M.~Parrinello, J.~Chem.~Phys.
-    {\bf 101}, 1302 (1994); {\it ibid.} {\bf 101}, 1316 (1994).
-
-\bibitem{Fischer92}
-    T.~H.~Fischer and J.~Alml\"of,
-    J.~Phys.~Chem. {\bf 96}, 9768 (1992).
-
-\bibitem{Schlegel84}
-    H.~B.~Schlegel, Theo.~Chim.~Acta {\bf 66}, 333 (1984).
-
-\bibitem{ego1} M.~Eichinger, H.~Heller, and H.~Grubm\"uller,
-   in
-   {\em Workshop on Molecular Dynamics on Parallel Computers},
-   p. 154-174, Singapore 912805, World Scientific, (2000).
-
-\bibitem{ego2} M.~Eichinger, H.~Grubm\"uller, H.~Heller, and P.~Tavan,
-    J.~Comp.~Chem. {\bf 18}, 1729 (1997).
-
-\bibitem{gmx3}
-    E.~Lindahl, B.~Hess, and D. van der Spoel,
-    J.~Mol.~Mod. {\bf 7}, 306 (2001).
-
-\bibitem{Liu89}
-    D.~C. Liu and J.~Nocedal,
-    Math.~Prog. {\bf 45}, 503 (1989).
-
-\bibitem{Perdew81}
-    J.~P.~Perdew and A.~Zunger,
-    Phys.~Rev.~B {\bf 23}, 5048 (1981).
-
-\bibitem{Vosko80}
-    S.~H.~Vosko, L.~Wilk and M.~Nusair,
-    Can.~J.~Phys. {\bf 58}, 1200 (1980).
-
-\bibitem{Perdew91}
-    J.~P.~Perdew and Y.~Wang, 
-    Phys.~Rev.~B {\bf 45}, 13244 (1991).
-
-\bibitem{Ceperley80}
-    D.~M.~Ceperley and B.~J.~Alder,
-    Phys.~Rev.~Lett.{\bf 45}, 566 (1980).
-
-\bibitem{Hutter94b}
-    J.~Hutter, M.~Parrinello, and S.~Vogel,
-    J.~Chem.~Phys. {\bf 101}, 3862 (1994).
-
-\bibitem{HutterIP}
-    J.~Hutter, M.~E. Tuckerman, and M.~Parrinello.
-    J.~Chem.~Phys. {\bf 102}, 859 (1995).
-
-\bibitem{cafes02}
-    J.~VandeVondele, and U.~R\"othlisberger
-    J.~Phys.~Chem.~B {\bf 106}, 203 (2002).
-
-\bibitem{Hutter94a}
-    J.~Hutter, H.~P.~L\"uthi, and M.~Parrinello,
-    Comput.~Mat.~Sci. {\bf 2}, 244 (1994).
-
-\bibitem{Martyna94}
-    G.~J.~Martyna, D.~J.~Tobias, and M.~L.~Klein,
-    J.~Chem.~Phys. {\bf 101}, 4177 (1994).
-
-\bibitem{tps}
-     C. Dellago, P.~G. Bolhuis, F.~S. Csajka, D.~J. Chandler, J.~Chem.~Phys. {\bf 108}, 1964 (1998). \\
-     P.~G. Bolhuis, C. Dellago, D.~J. Chandler, Faraday Discuss. {\bf 110}, 42 (1998).
-
-\bibitem{Martyna99} G.J. Martyna and M. E. Tuckerman,
-    J.~Chem.~Phys. {\bf 110}, 2810 (1999).
-
-\bibitem{Davidson67}
-    E.~R.~Davidson, J.~Chem.~Phys. {\bf 46}, 3320 (1967);
-    K.~R.~Roby, Mol.~Phys. {\bf 27}, 81 (1974);
-    R.~Heinzmann and R.~Ahlrichs, Theoret.~Chim.~Acta (Berl.)
-    {\bf 42}, 33 (1976);
-    C.~Ehrhardt and R.~Ahlrichs, Theoret.~Chim.~Acta (Berl.)
-    {\bf 68}, 231 (1985).
-
-\bibitem{Powell71}
-    M.~J.~D. Powell, Math.~Prog. {\bf 1}, 26 (1971).
-
-\bibitem{Banerjee85}
-    A.~Banerjee, N.~Adams, J.~Simons, and R.~Shepard,
-    J.~Phys.~Chem. {\bf 89}, 52 (1985).
-
-\bibitem{Turner99}
-    A.~J. Turner, V.~Moliner and I.~H. Williams,
-    Phys.~Chem.~Chem.~Phys. {\bf 1}, 1323 (1999).
-
-\bibitem{gromos96}
-    W.~F.~van~Gunsteren, S.~R.~Billeter, A.~A.~Eising, P.~H.~H\"unenberger,
-    P.~Kr\"uger, A.~E.~Mark, W.~R.~P.~Scott, I.~G.~Tironi,
-    Biomolecular Simulation: The GROMOS96 Manual and User Guide;
-    Vdf Hochschulverlag AG an der ETH~Z\"urich: Z\"urich, 1996.
-
-\bibitem{amber7}
-    D.~A.~Case, D.~A.~Pearlman, J.~W.~Caldwell, T.~E.~Cheatham~III, J.~Wang,
-    W.~S.~Ross, C.~L.~Simmerling, T.~A.~Darden, K.~M.~Merz, R.~V.~Stanton,
-    A.~L.~Cheng, J.~J.~Vincent, M.~Crowley, V.~Tsui, H.~Gohlke, R.~J.~Radmer,
-    Y.~Duan, J.~Pitera, I.~Massova, G.~L.~Seibel, U.~C.~Singh, P.~K.~Weiner,
-    and P.~A.~Kollman, AMBER~7 (2002), University of California, San Francisco.
-
-\bibitem{qmmm05}
-    F.~J.~Momay,
-    J.~Phys.~Chem. {\bf 82}, 592 (1978).
-
-\bibitem{qmmm06}
-    C.~I.~Bayly, P.~Cieplak, W.~D.~Cornell and P.~A.~Kollman,
-    J.~Phys.~Chem. {\bf 97}, 10269 (1993).
-
-\bibitem{Slater51}
-    J.~C.~Slater, Phys.~Rev. {\bf 81}, 385 (1951).
-
-\bibitem{Laasonen93}
-    K.~Laasonen, M.~Sprik, M.~Parrinello and R.~Car,
-    J.~Chem.~Phys. {\bf 99}, 9081 (1993).
-
-\bibitem{SSIC} J. VandeVondele and M. Sprik,
-     Phys.~Chem.~Chem.~Phys. {\bf 7}, 1363 (2005).
-
-\bibitem{dna_sic} F.~L. Gervasio, M. Boero, and M. Parrinello,
-     Angew.~Chem.~Int.~Ed. {\bf 45}, 5606 (2006).
-
-\bibitem{TDDFT-SH}
-    E.~Tapavicza, I.~Tavernelli, and U.~Rothlisberger,
-    Phys.~Rev.~Lett. {\bf 98}, 023001 (2007).\\
-    I.~Tavernelli, E.~Tapavicza, and U.~Rothlisberger, 
-    J.~Mol.~ Struct.~: THEOCHEM {\bf 914}, 22 (2009).
-
-\bibitem{Landman} R.~N.~Barnett and U.~Landman,
-    Phys.~Rev.~B {\bf 48}, 2081 (1993).
-
-\bibitem{knoll-marx-00} 
-    L. Knoll and D. Marx,
-    Eur.~Phys.~J.~D {\bf 10}, 353 (2000).
-
-\bibitem{mooij:99}
-    W.~T.~M. Mooij, F.~B. van Duijneveldt,J.~G.~C.~M. van Duijneveldt-van de Rijdt,
-    and B.~P. van Eijck, J.~Phys.~Chem~A {\bf 103}, 9872 (1999).
-
-\bibitem{williams-vdw:06}
-    R.~W.~Williams and D.~Malhotra, Chem.~Phys. {\bf 327}, 54 (2006).
-
-\bibitem{KB}
-    L.~Kleinman and D.~M.~Bylander,
-    Phys.~Rev.~Lett. {\bf 48}, 1425 (1982).
-
-\bibitem{NLCC}
-    S.~G.~Louie, S.~Froyen, and M.~L.~Cohen,
-    Phys.~Rev.~B {\bf 26}, 1738 (1982). 
-
-\bibitem{BHS}
-    G.~B.~Bachelet, D.~R.~Hamann and M.Schl\"uter,
-    Phys.~Rev.~B {\bf 26}, 4199 (1982).
-
-\bibitem{SGS}
-    X.~Gonze, R.~Stumpf and M.~Scheffler,
-    Phys.~Rev.~B {\bf 44}, 8503 (1991);
-    R.~Stumpf and M.~Scheffler,
-    Research Report of the Fritz-Haber-Institut (1990).
-
-\bibitem{TM}
-    N.~Troullier and J.~L.~Martins,
-    Phys.~Rev.~B {\bf 43}, 1993 (1991).
-
-\bibitem{GTH}
-    S.~Goedecker, M.~Teter, and J.~Hutter,
-    Phys.~Rev.~B {\bf 54}, 1703 (1996).
-
-\bibitem{Sprik98a}
-    M. Sprik, Faraday Discuss.\ {\bf 110}, 437 (1998).
-
-\bibitem{Sprik98b} M.~Sprik and G.~Ciccotti,
-    J.~Chem.~Phys. {\bf 109}, 7737 (1998).
-
-\bibitem{cco}
-    K.~Kamiya, M.~Boero, M.~Tateno, K.~Shiraishi, and A.~Oshiyama,
-    J.~Am.~Chem.~Soc. {\bf 129}, 9663 (2007).
-
-\bibitem{Frenkel02}
-    D. Frenkel and B. Smit,
-    {\em Understanding Molecular Simulation},
-    Academic Press, San Diego, 2002.
-
-\bibitem{ffmp} F. Filippone and M. Parrinello,
-     Chem.~Phys.~Lett. {\bf 345}, 179 (2001).
-
-\bibitem{fukui} K. Fukui, Science {\bf 217}, 747 (1982).
-
-\bibitem{fukui2} W. Yang and R.~G. Parr,
-     Proc.~Natl.~Acad.~Sci.~USA {\bf 82}, 6723 (1985).
-
-\bibitem{fukui3} E. Chamorro, F. De Proft and P. Geerlings,
-     J.~Chem.~Phys. {\bf 123}, 084104 (2005).
-
-\bibitem{micheletti} C.~Micheletti,  A.~Laio, and M.~Parrinello,
-      Phys.~Rev.~Lett. {\bf 92}, 170601 (2004).
-
-\bibitem{gerlaio} A.~Laio and F.~L.~Gervasio,
-      Rep.~Prog.~Phys. {\bf 71}, 126601 (2008).
-
-\bibitem{michele} A.~Barducci, M.~Bonomi, and M.~Parrinello,
-      Wiley Interdisciplinary Reviews - Computational Molecular Science
-      {\bf 1}, 826 (2011).
-
-\bibitem{andras} A. Stirling, M. Iannuzzi, A. Laio, and M. Parrinello,
-       ChemPhysChem {\bf 5}, 1558 (2004).
-
-\bibitem{gervasio} A. Laio, A. Rodriguez-Fortea, F.~L. Gervasio, M. Ceccarelli,
-       and M. Parrinello, J.~Phys.~Chem.~B {\bf 109}, 6714 (2005).
-
-\bibitem{iannuzzi2} M. Iannuzzi and M. Parrinello,
-         Phys.~Rev.~Lett. {\bf 93}, 025901 (2004).
-
-\bibitem{sergey} S. Churakov, M. Iannuzzi, and M. Parrinello,
-       J.~Phys.~Chem.~B {\bf 108} 11567 (2004).
-
-\bibitem{scwo} M. Boero, T. Ikeshoji, C.~C. Liew, K. Terakura and M. Parrinello,
-      J.~Am.~Chem.~Soc. {\bf 126}, 6280 (2004).
-
-\bibitem{ikeda} T. Ikeda, M. Hirata and T. Kimura,
-      J.~Chem.~Phys. {\bf 122}, 244507 (2005).
-
-\bibitem{rna} M. Boero, M. Tateno, K. Terakura, and A. Oshiyama,
-     J.~Chem.~Theor.~Comput. {\bf 1}, 925 (2005).
-
-\bibitem{Nair-jacs-08} N.~N. Nair, E. Schreiner, and D. Marx,
-     J.~Am.~Chem.~Soc. {\bf 130}, 14148 (2008).
-
-\bibitem{mb11} M.~Boero, J.~Phys.~Chem.~B {\bf 115}, 12276 (2011).
-
-\bibitem{Raiteri05} P.~Raiteri, A.~Laio, F.~L.~Gervasio, C.~Micheletti and M.~Parrinello,
-      J.~Phys.~Chem.~B {\bf 110}, 3533 (2005).
-
-\bibitem{Nair-inside-08} N.~N.~Nair, E.~Schreiner and D.~Marx
-      inSiDE {\bf 6}, 30 (2008).\\
-      http://inside.hlrs.de/htm/Edition$\_02\_08$/article$\_09$.html
-
-\bibitem{chandler} C. Dellago, P.~G. Bolhuis, F.~S.Csajka, and D. Chandler,
-      J.~Chem.~Phys. {\bf 108} 1964 (1998).
-
-\bibitem{Wu05}
-    Q.~Wu and T.~{Van~Voorhis},
-    Phys.~Rev.~A     {\bf 72}, 024502 (2005).
-
-\bibitem{Wu06jcp}
-    Q.~Wu and T.~{Van~Voorhis},
-    J.~Chem.~Phys.  {\bf 125}, 164105 (2006).
-
-\bibitem{Wu06jctc}
-    Q.~Wu and T.~{Van~Voorhis},
-    J.~Chem.~Theory.~Comput. {\bf 2}, 765 (2006).
-
-\bibitem{Wu06jpca}
-    Q.~Wu and T.~{Van~Voorhis},
-    J.~Phys.~Chem.~A  {\bf 110}, 9212 (2006).
-
-\bibitem{Wu07}
-    Q.~Wu and T.~{Van~Voorhis},
-    J.~Chem.~Phys.    {\bf 127}, 164119 (2007).
-
-\bibitem{Oberhofer09}
-    H.~Oberhofer and J.~Blumberger,
-    J.~Chem.~Phys. {\bf 131}, 64101 (2009).
-
-\bibitem{Oberhofer10acie}
-    H.~Oberhofer and J.~Blumberger,
-    Angew.~Chem.~Int.~Ed. {\bf 49}, 3631 (2010).
-
-\bibitem{Senthilkumar03}
-    Senthilkumar, K. and Grozema, F.~C. and Bickelhaupt, F.~M. and Siebbeles, L. D.~A.,
-    J.~Chem.~Phys. {\bf 119}, 9809 (2003).
-
-\bibitem{box-walls}
-    M.~Boero, T.~Ikeda, E.~Ito and K.~Terakura,
-    J.~Am.~Chem.~Soc. {\bf 128}, 16798 (2006)
-
-\bibitem{opt-ecp04}
-    O.~A.~v.~Lilienfeld, D.~Sebastiani, I.~Tavernelli, and U.~Rothlisberger,
-    Phys.~Rev.~Lett. {\bf 93}, 153004 (2004).
-
-\bibitem{FM-maurer}
-    P. Maurer, A. Laio, H.~W. Hugosson, M.~C. Colombo, and U. R\"othlisberger,
-    J.~Chem.~Theor.~Comput. {\bf 3}, 628 (2007).  
-
-\bibitem{Blochl92}
-       P. Bl{\"o}chl and M. Parrinello,
-      Phys.~Rev.~B {\bf 45}, 9413 (1992).
-
-\bibitem{psil1}
-      P.~L.~Silvestrelli, Phys.~Rev.~Lett.~{\bf 100}, 053002 (2008);
-       J.~Phys.~Chem.~A {\bf 113}, 5224 (2009).
-
-\bibitem{psil2}
-     A.~Ambrosetti and P.~L.~Silvestrelli, Phys.~Rev.~B {\bf 85}, 073101 (2012).
-
-\bibitem{molphy}
-     L.~V.~Slipchenko and M.~S.~Gordon, 
-     Mol.~Phys.~{\bf 107}, 999 (2009).
-
-\bibitem{heat1}
-    T.~Luo and J.~R.~Lloyd, J.~Heat Transfer {\bf 130}, 122403 (2008).
-
-\bibitem{heat2}
-    G.~Wu and B.~Li, Phys.~Rev.~B {\bf 76}, 085424 (2007).
-
-\bibitem{Schwoerer2013}
-M.~Schw\"{o}rer, B.~Breitenfeld, P.~Tr\"{o}ster, S.~Bauer, K.~Lorenzen, P.~Tavan, and G.~Mathias,
- J.\ Chem.\ Phys., {\bf 138},  244103  (2013).
-
-\bibitem{Schwoerer2015}
-M.~Schw\"{o}rer, K.~Lorenzen, G.~Mathias, and P.~Tavan,
- J.\ Chem.\ Phys., {\bf 142}   (2015).
-
-%-> References correctly reordered until this point.
-
-%\bibitem{LeSar}
-%   R. Le Sar, J.~Phys.~Chem. {\bf 88}, 4272 (1984);
-%   R. Le Sar, J.~Chem.~Phys. {\bf 86}, 1485 (1987).
-
-\end{thebibliography}
-%
-%---------------------------------------------------------------------
-
-%
-%Index follows...
-%
-\cleardoublepage
-
-%Redefine the environment
-\renewenvironment{theindex}%
-{\newpage%
-\section*{Index}%
-\addcontentsline{toc}{section}{Index}%
-\begin{multicols}{2}%
-\par\bigskip%
-\begin{list}%
-{}%Default item
-{%Set up the different geometrical parameters
-\setlength{\leftmargin}{3em}
-\setlength{\itemindent}{0pt}
-\setlength{\parsep}{0pt}
-\setlength{\itemsep}{0pt}
-\setlength{\itemindent}{-3em}}
-}%definition of \begin{index}
-{\end{list}\end{multicols}}%definition of \end{index}
-
-\printindex
-
-%---------------------------------------------------------------------
-%
-\end{document}
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/inputparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/inputparser.py
deleted file mode 100644
index 0bce7365ae1eb4ace133fada3a44956be476415b..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/inputparser.py
+++ /dev/null
@@ -1,345 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-import os
-import pickle
-import logging
-import numpy as np
-from nomadcore.baseclasses import AbstractBaseParser
-from cpmdparser.generic.inputparsing import metainfo_data_prefix, metainfo_section_prefix
-logger = logging.getLogger("nomad")
-
-
-class CPMDInputParser(AbstractBaseParser):
-    """Parses the CPMD input file.
-    """
-    def __init__(self, parser_context):
-        """
-        """
-        super(CPMDInputParser, self).__init__(parser_context)
-        self.input_tree = None
-
-    def parse(self, filepath):
-        self.setup_input_tree(self.parser_context.version_id)
-        self.collect_input(filepath)
-        self.analyze_input()
-        self.fill_metadata()
-
-    def collect_input(self, filepath):
-        """This function will first go through the input file and gather the
-        information to the input tree.
-
-        The data is not directly pushed to the backend inside this function
-        because it is safer to first validate the whole structure and only then
-        push it.
-        """
-        # The input file should be relatively small so we are better off
-        # loading it into memory all at once.
-        lines = None
-        with open(filepath, "r") as fin:
-            lines = fin.readlines()
-
-        # Read the input line by line
-        section_stack = []
-        section_name = None
-        section_object = None
-        old_keyword_object = None
-        parameters = []
-        input_tree = self.input_tree
-        input_tree.accessed = True
-
-        for line in lines:
-            line = line.strip()
-            keyword_object = None
-
-            # Skip empty lines
-            if len(line) == 0:
-                continue
-            # Section ends
-            if line.upper().startswith('&END'):
-                if parameters:
-                    if old_keyword_object is not None:
-                        old_keyword_object.parameters = "\n".join(parameters)
-                    else:
-                        section_object.default_keyword = "\n".join(parameters)
-                    parameters = []
-                old_keyword_object = None
-                section_stack.pop()
-            # Section starts
-            elif line[0] == '&':
-                section_name = line[1:]
-                section_stack.append(section_name)
-                section_object = input_tree.get_section(section_name)
-                section_object.accessed = True
-            # Keywords, parameters
-            else:
-                # Try to find a keyword object
-                splitted = line.split()
-                current_keyword_name = []
-                i_match = None
-                for i_part, part in enumerate(splitted):
-                    current_keyword_name.append(part)
-                    current_keyword_object = section_object.get_keyword(" ".join(current_keyword_name))
-                    if current_keyword_object is not None:
-                        keyword_object = current_keyword_object
-                        i_match = i_part
-
-                # If multiple keywords with this name exist, choose the correct
-                # one based on switch
-                if isinstance(keyword_object, list):
-                    switch = splitted[i_match]
-                    correct_keyword_object = None
-                    for keyword in keyword_object:
-                        if switch in keyword.available_options:
-                            correct_keyword_object = keyword
-                            break
-                    if correct_keyword_object is None:
-                        raise LookupError("Could not find the correct keyword for '{}' in the input structure.".format(line))
-                    keyword_object = correct_keyword_object
-
-                # If keyword object found, place the options and save any
-                # parameters that were found before
-                if keyword_object is not None:
-                    # print(keyword_object.name)
-                    if parameters:
-                        if old_keyword_object is not None:
-                            old_keyword_object.parameters = "\n".join(parameters)
-                            parameters = []
-                    options = splitted[i_match+1:]
-                    if options:
-                        options = " ".join(options)
-                    else:
-                        options = None
-                    keyword_object.options = options
-                    keyword_object.accessed = True
-                    old_keyword_object = keyword_object
-
-                # If no keyword was found, and a section is open, the line is a
-                # parameter line
-                if keyword_object is None and len(section_stack) != 0:
-                    parameters.append(line)
-
-    def analyze_input(self):
-
-        # Get the trajectory print settings
-        root = self.input_tree
-        cpmd = root.get_section("CPMD")
-        trajectory = cpmd.get_keyword("TRAJECTORY")
-        if trajectory:
-            options = trajectory.options
-            if options:
-                if "RANGE" in options:
-                    self.cache_service["trajectory_range"] = True
-                if "SAMPLE" in options:
-                    self.cache_service["trajectory_sample"] = True
-                    parameters = trajectory.parameters
-                    try:
-                        lines = parameters.split("\n")
-                        print_freq = int(lines[-1])
-                    except (IndexError, ValueError):
-                        self.cache_service["print_freq"] = None
-                    else:
-                        self.cache_service["print_freq"] = print_freq
-
-        # Get the periodicity settings
-        system = root.get_section("SYSTEM")
-        symmetry = system.get_keyword("SYMMETRY")
-        symmetry_parameters = symmetry.parameters.strip()
-        cluster = system.get_keyword("CLUSTER")
-        surface = system.get_keyword("SURFACE")
-        polymer = system.get_keyword("POLYMER")
-
-        # Bulk
-        if symmetry_parameters != "0" and symmetry_parameters != "ISOLATED" and cluster.accessed is False:
-            periodicity = [True, True, True]
-
-        # Surface
-        elif surface.accessed:
-            options = surface.options
-            if options is None:
-                options = "XY"
-            else:
-                options = options.strip()
-            if options == "XY":
-                periodicity = [True, True, False]
-            elif options == "XZ":
-                periodicity = [True, False, True]
-            elif options == "YZ":
-                periodicity = [False, True, True]
-
-        # Polymer
-        elif polymer.accessed:
-            periodicity = [True, False, False]
-
-        # Isolated
-        elif cluster.accessed or symmetry_parameters == "ISOLATED" or symmetry_parameters == "0":
-            periodicity = [False, False, False]
-
-        self.cache_service["configuration_periodic_dimensions"] = np.array(periodicity)
-
-        # Get the XC functional
-        class XCFunctional(object):
-            def __init__(self, name, weight=1, parameters=None):
-                self.name = name
-                self.weight = weight
-                self.parameters = parameters
-
-        xc_list = []
-        dft = root.get_section("DFT")
-        if dft is not None:
-            functional = dft.get_keyword("FUNCTIONAL")
-            if functional is not None:
-                xc = functional.options
-                if xc is not None:
-                    xc = xc.strip()
-
-                    if xc == "LDA":
-                        xc_list.append(XCFunctional("LDA_XC_TETER93"))
-
-                    elif xc == "BLYP":
-                        xc_list.append(XCFunctional("GGA_X_B88"))
-                        xc_list.append(XCFunctional("GGA_C_LYP"))
-
-                    elif xc == "B3LYP":
-                        xc_list.append(XCFunctional("HYB_GGA_XC_B3LYP"))
-
-                    elif xc == "PBE":
-                        xc_list.append(XCFunctional("GGA_X_PBE"))
-                        xc_list.append(XCFunctional("GGA_C_PBE"))
-
-                    elif xc == "OLYP":
-                        xc_list.append(XCFunctional("GGA_X_OPTX"))
-                        xc_list.append(XCFunctional("GGA_C_LYP"))
-
-                    elif xc == "HCTH":
-                        xc_list.append(XCFunctional("GGA_XC_HCTH_120"))
-
-                    elif xc == "PBE0":
-                        xc_list.append(XCFunctional("HYB_GGA_XC_PBEH"))
-
-                    elif xc == "BP":
-                        xc_list.append(XCFunctional("GGA_X_B88"))
-                        xc_list.append(XCFunctional("GGA_C_P86"))
-
-                    elif xc == "XLYP":
-                        xc_list.append(XCFunctional("GGA_XC_XLYP"))
-
-                    elif xc == "PBES":
-                        xc_list.append(XCFunctional("GGA_C_PBE_SOL"))
-                        xc_list.append(XCFunctional("GGA_X_PBE_SOL"))
-
-                    elif xc == "REVPBE":
-                        xc_list.append(XCFunctional("GGA_C_PBE"))
-                        xc_list.append(XCFunctional("GGA_X_PBE_R"))
-
-                    elif xc == "TPSS":
-                        xc_list.append(XCFunctional("MGGA_C_TPSS"))
-                        xc_list.append(XCFunctional("MGGA_X_TPSS"))
-
-                    # This version of OPTX is not yet found on the official list
-                    # elif xc == "OPTX":
-
-                    elif xc == "B1LYP":
-                        xc_list.append(XCFunctional("HYB_GGA_XC_B1LYP"))
-
-                    elif xc == "X3LYP":
-                        xc_list.append(XCFunctional("HYB_GGA_XC_X3LYP"))
-
-                    elif xc == "HSE06":
-                        xc_list.append(XCFunctional("HYB_GGA_XC_HSE06"))
-
-        # Sort the functionals alphabetically by name
-        xc_list.sort(key=lambda x: x.name)
-        xc_summary = ""
-
-        # For every defined functional, stream the information to the
-        # backend and construct the summary string
-        for i, functional in enumerate(xc_list):
-
-            gId = self.backend.openSection("section_XC_functionals")
-            self.backend.addValue("XC_functional_name", functional.name)
-            self.backend.addValue("XC_functional_weight", functional.weight)
-            if functional.parameters is not None:
-                pass
-            self.backend.closeSection("section_XC_functionals", gId)
-
-            if i != 0:
-                xc_summary += "+"
-            xc_summary += "{}*{}".format(functional.weight, functional.name)
-            if functional.parameters is not None:
-                xc_summary += ":{}".format()
-
-        # Stream summary
-        if xc_summary is not "":
-            self.backend.addValue("XC_functional", xc_summary)
-
-    def fill_metadata(self):
-        """Goes through the input data and pushes everything to the
-        backend.
-        """
-        def fill_metadata_recursively(section):
-            """Recursively goes through the input sections and pushes everything to the
-            backend.
-            """
-            if not section.accessed:
-                return
-
-            if section.name != "":
-                section_name = metainfo_section_prefix + "{}".format(section.name)
-            else:
-                section_name = metainfo_section_prefix[:-1]
-            gid = self.backend.openSection(section_name)
-
-            # Keywords
-            for keyword_list in section.keywords.values():
-                for keyword in keyword_list:
-                    if keyword.accessed:
-                        # Open keyword section
-                        keyword_name = metainfo_section_prefix + "{}.{}".format(section.name, keyword.unique_name.replace(" ", "_"))
-                        key_id = self.backend.openSection(keyword_name)
-
-                        # Add options
-                        if keyword.options:
-                            option_name = metainfo_data_prefix + "{}.{}_options".format(section.name, keyword.unique_name.replace(" ", "_"))
-                            self.backend.addValue(option_name, keyword.options)
-
-                        # Add parameters
-                        if keyword.parameters:
-                            parameter_name = metainfo_data_prefix + "{}.{}_parameters".format(section.name, keyword.unique_name.replace(" ", "_"))
-                            self.backend.addValue(parameter_name, keyword.parameters)
-
-                        # Close keyword section
-                        self.backend.closeSection(keyword_name, key_id)
-
-            # # Default keyword
-            default_keyword = section.default_keyword
-            if default_keyword is not None:
-                name = metainfo_data_prefix + "{}_default_keyword".format(section.name)
-                self.backend.addValue(name, default_keyword)
-
-            # Subsections
-            for subsection in section.subsections.values():
-                fill_metadata_recursively(subsection)
-
-            self.backend.closeSection(section_name, gid)
-
-        fill_metadata_recursively(self.input_tree)
-
-    def setup_input_tree(self, version_number):
-        """Loads the version specific pickle file which contains pregenerated
-        input structure.
-        """
-        pickle_path = os.path.dirname(__file__) + "/input_data/cpmd_input_tree.pickle"
-        input_tree_pickle_file = open(pickle_path, 'rb')
-        self.input_tree = pickle.load(input_tree_pickle_file)
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/mdparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/mdparser.py
deleted file mode 100644
index b029247a4ae78afe5e7b6ae4dd3a39c887572363..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/mdparser.py
+++ /dev/null
@@ -1,280 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from __future__ import absolute_import
-import re
-import logging
-import numpy as np
-from .commonparser import CPMDCommonParser
-from nomadcore.simple_parser import SimpleMatcher as SM
-from nomadcore.baseclasses import MainHierarchicalParser
-import nomadcore.csvparsing
-import nomadcore.configurationreading
-LOGGER = logging.getLogger("nomad")
-
-
-class CPMDMDParser(MainHierarchicalParser):
-    """The main parser class that is called for all run types. Parses the CPMD
-    output file.
-    """
-    def __init__(self, parser_context):
-        """
-        """
-        super(CPMDMDParser, self).__init__(parser_context)
-        self.setup_common_matcher(CPMDCommonParser(parser_context))
-        self.sampling_method_gid = None
-        self.frame_refs = []
-        self.energies = []
-
-        # Detect what files are available in the same folder where the main
-        # file is located.
-        self.dcd_filepath = self.file_service.get_absolute_path_to_file("TRAJEC.dcd")
-        self.xyz_filepath = self.file_service.get_absolute_path_to_file("TRAJEC.xyz")
-        self.trajectory_filepath = self.file_service.get_absolute_path_to_file("TRAJECTORY")
-        self.ftrajectory_filepath = self.file_service.get_absolute_path_to_file("FTRAJECTORY")
-        self.energies_filepath = self.file_service.get_absolute_path_to_file("ENERGIES")
-
-        #=======================================================================
-        # Cache levels
-        # self.caching_levels.update({
-            # 'section_run': CachingLevel.ForwardAndCache,
-        # })
-
-        #=======================================================================
-        # Main structure
-        self.root_matcher = SM("",
-            forwardMatch=True,
-            sections=['section_run', "section_frame_sequence", "section_sampling_method",  "section_method"],
-            subMatchers=[
-                self.cm.header(),
-                self.cm.method(),
-                self.cm.atoms(),
-                self.cm.cell(),
-                self.cm.initialization(),
-                SM( " DEGREES OF FREEDOM FOR SYSTEM:",
-                    sections=["x_cpmd_section_md_initialization"],
-                    forwardMatch=True,
-                    subMatchers=[
-                        SM( " DEGREES OF FREEDOM FOR SYSTEM:"),
-                        SM( " RVSCAL| RESCALING IONIC TEMP FROM\s+{0} TO\s+{0}".format(self.regexs.float)),
-                        SM( re.escape(" ==                     FORCES INITIALIZATION                  ==")),
-                        SM( " EWALD\| SUM IN REAL SPACE OVER\s+{0}\*\s+{0}\*\s+{0} CELLS".format(self.regexs.int)),
-                        SM( re.escape(" ==                END OF FORCES INITIALIZATION                ==")),
-                        SM( " TIME FOR INITIALIZATION:\s+{} SECONDS".format(self.regexs.float)),
-                    ]
-                ),
-                SM( "       NFI    EKINC   TEMPP           EKS      ECLASSIC          EHAM         DIS    TCPU"),
-                SM( re.escape(" *                      AVERAGED QUANTITIES                     *"),
-                    sections=["x_cpmd_section_md_averaged_quantities"],
-                    subMatchers=[
-                        SM( re.escape("                              MEAN VALUE       +/-  RMS DEVIATION")),
-                        SM( re.escape("                                     <x>     [<x^2>-<x>^2]**(1/2)")),
-                        SM( " ELECTRON KINETIC ENERGY\s+(?P<x_cpmd_electron_kinetic_energy_mean>{0})\s+(?P<x_cpmd_electron_kinetic_energy_std>{0})".format(self.regexs.float)),
-                        SM( " IONIC TEMPERATURE\s+(?P<x_cpmd_ionic_temperature_mean>{0})\s+(?P<x_cpmd_ionic_temperature_std>{0})".format(self.regexs.float)),
-                        SM( " DENSITY FUNCTIONAL ENERGY\s+(?P<x_cpmd_density_functional_energy_mean>{0})\s+(?P<x_cpmd_density_functional_energy_std>{0})".format(self.regexs.float)),
-                        SM( " CLASSICAL ENERGY\s+(?P<x_cpmd_classical_energy_mean>{0})\s+(?P<x_cpmd_classical_energy_std>{0})".format(self.regexs.float)),
-                        SM( " CONSERVED ENERGY\s+(?P<x_cpmd_conserved_energy_mean>{0})\s+(?P<x_cpmd_conserved_energy_std>{0})".format(self.regexs.float)),
-                        SM( " NOSE ENERGY ELECTRONS\s+(?P<x_cpmd_nose_energy_electrons_mean>{0})\s+(?P<x_cpmd_nose_energy_electrons_std>{0})".format(self.regexs.float)),
-                        SM( " NOSE ENERGY IONS\s+(?P<x_cpmd_nose_energy_ions_mean>{0})\s+(?P<x_cpmd_nose_energy_ions_std>{0})              0.000000              0.00000    ".format(self.regexs.float)),
-                        SM( " CONSTRAINTS ENERGY\s+(?P<x_cpmd_constraints_energy_mean>{0})\s+(?P<x_cpmd_constraints_energy_std>{0})".format(self.regexs.float)),
-                        SM( " RESTRAINTS ENERGY\s+(?P<x_cpmd_restraints_energy_mean>{0})\s+(?P<x_cpmd_restraints_energy_std>{0})".format(self.regexs.float)),
-                        SM( " ION DISPLACEMENT\s+(?P<x_cpmd_ion_displacement_mean>{0})\s+(?P<x_cpmd_ion_displacement_std>{0})".format(self.regexs.float)),
-                        SM( " CPU TIME\s+(?P<x_cpmd_cpu_time_mean>{0})".format(self.regexs.float)),
-                    ]
-                ),
-                self.cm.footer(),
-            ]
-        )
-
-    #===========================================================================
-    # onClose triggers
-    def onClose_section_sampling_method(self, backend, gIndex, section):
-        self.sampling_method_gid = gIndex
-        backend.addValue("sampling_method", "molecular_dynamics")
-        self.cache_service.addValue("ensemble_type")
-
-    def onClose_x_cpmd_section_md_averaged_quantities(self, backend, gIndex, section):
-        cons_mean = section.get_latest_value("x_cpmd_conserved_energy_mean")
-        cons_std = section.get_latest_value("x_cpmd_conserved_energy_std")
-        temp_mean = section.get_latest_value("x_cpmd_ionic_temperature_mean")
-        temp_std = section.get_latest_value("x_cpmd_ionic_temperature_std")
-        pot_mean = section.get_latest_value("x_cpmd_density_functional_energy_mean")
-        pot_std = section.get_latest_value("x_cpmd_density_functional_energy_std")
-
-        self.parse_md()
-
-        if temp_mean is not None and temp_std is not None:
-            backend.addArrayValues("frame_sequence_temperature_stats", np.array([temp_mean, temp_std]), unit="K")
-        if cons_mean is not None and cons_std is not None:
-            backend.addArrayValues("frame_sequence_conserved_quantity_stats", np.array([cons_mean, cons_std]), unit="hartree")
-        if pot_mean is not None and pot_std is not None:
-            backend.addArrayValues("frame_sequence_potential_energy_stats", np.array([pot_mean, pot_std]), unit="hartree")
-
-    #===========================================================================
-    # adHoc
-    def parse_md(self):
-        """Parses all the md step information.
-        """
-        # Decide from which file trajectory is read
-        n_atoms = self.cache_service["number_of_atoms"]
-        trajectory_range = self.cache_service["trajectory_range"]
-        trajectory_sample = self.cache_service["trajectory_sample"]
-        print_freq = self.cache_service["print_freq"]
-        read_trajectory = True
-        traj_file = None
-        traj_step = 1
-        trajec_file_iterator = None
-        if self.dcd_filepath is not None:
-            traj_file = self.dcd_filepath
-        elif self.xyz_filepath is not None:
-            traj_file = self.xyz_filepath
-
-        # Initialize the TRAJEC file iterator
-        if traj_file is not None:
-            try:
-                trajec_file_iterator = nomadcore.configurationreading.iread(traj_file)
-            except ValueError:
-                pass
-
-        # If RANGE is not specified, initialize the TRAJECTORY and FTRAJECTORY
-        # iterators if files available
-        ftrajectory_file_iterator = None
-        trajectory_file_iterator = None
-        if not trajectory_range:
-            if self.ftrajectory_filepath is not None:
-                ftrajectory_file_iterator = nomadcore.csvparsing.iread(self.ftrajectory_filepath, columns=range(10), n_conf=n_atoms)
-            if self.trajectory_filepath is not None:
-                trajectory_file_iterator = nomadcore.csvparsing.iread(self.trajectory_filepath, columns=range(7), n_conf=n_atoms)
-
-        # Initialize the ENERGIES file iterator
-        energies_iterator = None
-        if self.energies_filepath is not None:
-            energies_iterator = nomadcore.csvparsing.iread(self.energies_filepath, columns=range(8))
-
-        # Start reading the frames
-        i_frame = 0
-        n_frames = self.cache_service["n_steps"]
-        time_step = self.cache_service["time_step_ions"]
-        self.backend.addArrayValues("frame_sequence_time", np.array([(x+1)*time_step for x in range(n_frames)]))
-        self.backend.addValue("number_of_frames_in_sequence", n_frames)
-
-        temperatures = []
-        potential_energies = []
-        kinetic_energies = []
-        conserved_quantities = []
-
-        for i_frame in range(n_frames):
-
-            # Open sections
-            scc_id = self.backend.openSection("section_single_configuration_calculation")
-            sys_id = self.backend.openSection("section_system")
-
-            # System
-            self.cache_service.addArrayValues("atom_labels")
-            self.cache_service.addArrayValues("simulation_cell", unit="bohr")
-            self.cache_service.addValue("number_of_atoms")
-
-            if print_freq is not None:
-                if i_frame % print_freq == 0:
-
-                    # TRAJEC file
-                    if trajec_file_iterator is not None:
-                        try:
-                            pos = next(trajec_file_iterator)
-                        except StopIteration:
-                            LOGGER.error("Could not get the next geometries from a TRAJEC file.")
-                        else:
-                            self.backend.addArrayValues("atom_positions", pos, unit="angstrom")
-
-                    # FTRAJECTORY file
-                    if ftrajectory_file_iterator is not None:
-                        try:
-                            values = next(ftrajectory_file_iterator)
-                        except StopIteration:
-                            LOGGER.error("Could not get the next configuration from a FTRAJECTORY file.")
-                        else:
-                            velocities = values[:, 4:7]
-                            self.backend.addArrayValues("atom_velocities", velocities, unit="bohr/(hbar/hartree)")
-
-                            forces = values[:, 7:10]
-                            self.backend.addArrayValues("atom_forces", forces, unit="forceAu")
-
-                            if trajec_file_iterator is None:
-                                pos = values[:, 1:4]
-                                self.backend.addArrayValues("atom_positions", pos, unit="bohr")
-
-                    # TRAJECTORY file
-                    if ftrajectory_file_iterator is None:
-                        if trajectory_file_iterator is not None:
-                            try:
-                                values = next(trajectory_file_iterator)
-                            except StopIteration:
-                                LOGGER.error("Could not get the next configuration from a TRAJECTORY file.")
-                            else:
-                                velocities = values[:, 4:]
-                                self.backend.addArrayValues("atom_velocities", velocities, unit="bohr/(hbar/hartree)")
-
-                                if trajec_file_iterator is None:
-                                    pos = values[:, 1:4]
-                                    self.backend.addArrayValues("atom_positions", pos, unit="bohr")
-
-            # Energies file
-            if energies_iterator is not None:
-                try:
-                    values = next(energies_iterator)
-                except StopIteration:
-                    LOGGER.error("Could not get the next configuration from an ENERGIES file.")
-                else:
-                    potential_energy = values[3]
-                    conserved_quantity = values[5]
-                    ion_total_energy = values[4]
-                    kinetic_energy = ion_total_energy - potential_energy
-                    temperature = values[2]
-                    # electronic_kinetic_energy = values[1]
-                    # msd = values[6]
-                    # i_step = values[0]
-                    tcpu = values[7]
-                    conserved_quantities.append(conserved_quantity)
-                    potential_energies.append(potential_energy)
-                    kinetic_energies.append(kinetic_energy)
-                    temperatures.append(temperature)
-                    self.backend.addRealValue("energy_total", potential_energy, unit="hartree")
-                    self.backend.addValue("time_calculation", tcpu)
-
-            # Close sections
-            self.backend.closeSection("section_single_configuration_calculation", scc_id)
-            self.backend.closeSection("section_system", sys_id)
-
-        # Push the summaries
-        if potential_energies:
-            potential_energies = np.array(potential_energies)
-            self.backend.addArrayValues("frame_sequence_potential_energy", potential_energies, unit="hartree")
-        if kinetic_energies:
-            kinetic_energies = np.array(kinetic_energies)
-            self.backend.addArrayValues("frame_sequence_kinetic_energy", kinetic_energies, unit="hartree")
-
-            # Push the statistics. CPMD prints some statistics at the end, but the
-            # mean and std of kinetic energy are missing
-            kin_mean = kinetic_energies.mean()
-            kin_temp = (kinetic_energies - kin_mean)
-            kin_std = np.sqrt(np.dot(kin_temp, kin_temp)/kinetic_energies.size)
-            kin_temp = None
-            self.backend.addArrayValues("frame_sequence_kinetic_energy_stats", np.array([kin_mean, kin_std]), unit="hartree")
-
-        if conserved_quantities:
-            conserved_quantities = np.array(conserved_quantities)
-            self.backend.addArrayValues("frame_sequence_conserved_quantity", conserved_quantities, unit="hartree")
-        if temperatures:
-            temperatures = np.array(temperatures)
-            self.backend.addArrayValues("frame_sequence_temperature", temperatures, unit="K")
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/propertiesparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/propertiesparser.py
deleted file mode 100644
index e80174278b85a71776c74c88cd8b467cb1ce7ba8..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/propertiesparser.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from __future__ import absolute_import
-from nomadcore.simple_parser import SimpleMatcher as SM
-from nomadcore.baseclasses import MainHierarchicalParser
-import numpy as np
-from .commonparser import CPMDCommonParser
-import re
-import logging
-LOGGER = logging.getLogger("nomad")
-
-
-class CPMDPropertiesParser(MainHierarchicalParser):
-    """The main parser class that is called for all run types. Parses the CPMD
-    output file.
-    """
-    def __init__(self, file_path, parser_context):
-        """
-        """
-        super(CPMDPropertiesParser, self).__init__(file_path, parser_context)
-        self.setup_common_matcher(CPMDCommonParser(parser_context))
-        self.n_frames = 0
-        self.sampling_method_gid = None
-        self.frame_refs = []
-        self.energies = []
-
-        #=======================================================================
-        # Main structure
-        self.root_matcher = SM("",
-            forwardMatch=True,
-            sections=['section_run', "section_method"],
-            subMatchers=[
-                self.cm.header(),
-                self.cm.method(),
-                self.cm.atoms(),
-                self.cm.cell(),
-                self.cm.initialization(),
-                self.cm.footer(),
-            ]
-        )
-
-    #=======================================================================
-    # onClose triggers
-    def onClose_section_system(self, backend, gIndex, section):
-        self.cache_service.addArrayValues("atom_labels")
-        self.cache_service.addArrayValues("simulation_cell", unit="bohr")
-        self.cache_service.addValue("number_of_atoms")
-
-    #=======================================================================
-    # adHoc
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/singlepointparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/singlepointparser.py
deleted file mode 100644
index ec8b73b5c74acb6d7a9d4b3e05b1a0fae82c9372..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/singlepointparser.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from __future__ import absolute_import
-from nomadcore.simple_parser import SimpleMatcher as SM
-from nomadcore.baseclasses import MainHierarchicalParser
-from .commonparser import CPMDCommonParser
-import re
-import logging
-import numpy as np
-LOGGER = logging.getLogger("nomad")
-
-
-class CPMDSinglePointParser(MainHierarchicalParser):
-    """The main parser class that is called for all run types. Parses the CPMD
-    output file.
-    """
-    def __init__(self, parser_context):
-        """
-        """
-        super(CPMDSinglePointParser, self).__init__(parser_context)
-        self.setup_common_matcher(CPMDCommonParser(parser_context))
-        self.n_scf_iterations = 0
-
-        #=======================================================================
-        # Cache levels
-        # self.caching_levels.update({
-            # 'section_run': CachingLevel.ForwardAndCache,
-        # })
-
-        #=======================================================================
-        # SimpleMatchers
-        self.root_matcher = SM("",
-            forwardMatch=True,
-            sections=['section_run', "section_single_configuration_calculation", "section_system", "section_method"],
-            subMatchers=[
-                self.cm.header(),
-                self.cm.method(),
-                self.cm.atoms(),
-                self.cm.cell(),
-                self.cm.initialization(),
-                SM( " NFI      GEMAX       CNORM           ETOT        DETOT      TCPU",
-                    sections=["x_cpmd_section_scf"],
-                    subMatchers=[
-                        SM( "\s+(?P<x_cpmd_scf_nfi>{0})\s+(?P<x_cpmd_scf_gemax>{1})\s+(?P<x_cpmd_scf_cnorm>{1})\s+(?P<x_cpmd_scf_etot__hartree>{1})\s+(?P<x_cpmd_scf_detot__hartree>{1})\s+(?P<x_cpmd_scf_tcpu__s>{1})".format(self.regexs.int, self.regexs.float),
-                            sections=["x_cpmd_section_scf_iteration"],
-                            repeats=True,
-                        ),
-                    ]
-                ),
-                SM( re.escape(" *                        FINAL RESULTS                         *"),
-                    sections=["x_cpmd_section_final_results"],
-                    subMatchers=[
-                        SM( "   ATOM          COORDINATES            GRADIENTS \(-FORCES\)",
-                            adHoc=self.ad_hoc_atom_forces(),
-                        ),
-                        SM( " \(K\+E1\+L\+N\+X\)           TOTAL ENERGY =\s+(?P<energy_total__hartree>{}) A\.U\.".format(self.regexs.float)),
-                        SM( " \(E1=A-S\+R\)     ELECTROSTATIC ENERGY =\s+(?P<energy_electrostatic__hartree>{}) A\.U\.".format(self.regexs.float)),
-                        SM( " \(X\)     EXCHANGE-CORRELATION ENERGY =\s+(?P<energy_XC_potential__hartree>{}) A\.U\.".format(self.regexs.float)),
-                    ]
-                ),
-                self.cm.footer(),
-            ]
-        )
-
-    #=======================================================================
-    # onClose triggers
-    def onClose_x_cpmd_section_scf_iteration(self, backend, gIndex, section):
-        # SCF step energy and energy change
-        scf_id = backend.openSection("section_scf_iteration")
-        energy = section.get_latest_value("x_cpmd_scf_etot")
-        backend.addValue("energy_total_scf_iteration", energy)
-        denergy = section.get_latest_value("x_cpmd_scf_detot")
-        backend.addValue("energy_change_scf_iteration", denergy)
-        backend.closeSection("section_scf_iteration", scf_id)
-        self.n_scf_iterations += 1
-
-    def onClose_x_cpmd_section_scf(self, backend, gIndex, section):
-        backend.addValue("number_of_scf_iterations", self.n_scf_iterations)
-
-    def onClose_section_system(self, backend, gIndex, section):
-        self.cache_service.addArrayValues("atom_positions", "initial_positions", unit="bohr")
-        self.cache_service.addArrayValues("atom_labels")
-        self.cache_service.addArrayValues("simulation_cell", unit="bohr")
-        self.cache_service.addValue("number_of_atoms")
-
-    #=======================================================================
-    # adHoc
-
-    def ad_hoc_atom_forces(self):
-        """Parses the atomic forces from the final results.
-        """
-        def wrapper(parser):
-            # Define the regex that extracts the information
-            regex_string = r"\s+({0})\s+({1})\s+({2})\s+({2})\s+({2})\s+({2})\s+({2})\s+({2})".format(self.regexs.int, self.regexs.word, self.regexs.float)
-            regex_compiled = re.compile(regex_string)
-
-            match = True
-            forces = []
-
-            while match:
-                line = parser.fIn.readline()
-                result = regex_compiled.match(line)
-
-                if result:
-                    match = True
-                    force = [float(x) for x in result.groups()[5:8]]
-                    forces.append(force)
-                else:
-                    match = False
-
-            forces = -np.array(forces)
-
-            # If anything found, push the results to the correct section
-            if len(forces) != 0:
-                parser.backend.addArrayValues("atom_forces", forces, unit="hartree/bohr")
-
-        return wrapper
-
-    #=======================================================================
-    # Misc. functions
diff --git a/parser/parser-cpmd/cpmdparser/versions/cpmd41/vibrationparser.py b/parser/parser-cpmd/cpmdparser/versions/cpmd41/vibrationparser.py
deleted file mode 100644
index e721d610d0800b3410f8779acea75f3d951b898d..0000000000000000000000000000000000000000
--- a/parser/parser-cpmd/cpmdparser/versions/cpmd41/vibrationparser.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#     http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-from __future__ import absolute_import
-from nomadcore.simple_parser import SimpleMatcher as SM
-from nomadcore.baseclasses import MainHierarchicalParser
-import numpy as np
-from .commonparser import CPMDCommonParser
-import re
-import logging
-LOGGER = logging.getLogger("nomad")
-
-
-class CPMDVibrationParser(MainHierarchicalParser):
-    """The main parser class that is called for all run types. Parses the CPMD
-    output file.
-    """
-    def __init__(self, file_path, parser_context):
-        """
-        """
-        super(CPMDVibrationParser, self).__init__(file_path, parser_context)
-        self.setup_common_matcher(CPMDCommonParser(parser_context))
-        self.n_frames = 0
-        self.sampling_method_gid = None
-        self.frame_refs = []
-        self.energies = []
-
-        #=======================================================================
-        # Main structure
-        self.root_matcher = SM("",
-            forwardMatch=True,
-            sections=['section_run', "section_method"],
-            subMatchers=[
-                self.cm.header(),
-                self.cm.method(),
-                self.cm.atoms(),
-                self.cm.cell(),
-                self.cm.initialization(),
-                self.cm.footer(),
-            ]
-        )
-
-    #=======================================================================
-    # onClose triggers
-    def onClose_section_system(self, backend, gIndex, section):
-        self.cache_service.addArrayValues("atom_labels")
-        self.cache_service.addArrayValues("simulation_cell", unit="bohr")
-        self.cache_service.addValue("number_of_atoms")
-
-    #=======================================================================
-    # adHoc
diff --git a/setup.py b/setup.py
index b5fe1092dfa93d2ef6ea34e714eaf180d6608345..91d0874bec6466813ece3b13e1559b201a713d18 100644
--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,11 @@
 # Copyright 2016-2018 Lauri Himanen, Fawzi Mohamed, Ankit Kariryaa
-# 
+#
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
 #   You may obtain a copy of the License at
-# 
+#
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 #   Unless required by applicable law or agreed to in writing, software
 #   distributed under the License is distributed on an "AS IS" BASIS,
 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,7 +23,7 @@ def main():
         author="Lauri Himanen",
         author_email="lauri.himanen@aalto.fi",
         license="GPL3",
-        package_dir={'': 'parser/parser-cpmd'},
+        package_dir={'': './'},
         packages=find_packages(),
         install_requires=[
             'nomadcore',