diff --git a/README.md b/README.md index 4ef46595c6cddc03285dc434df4e2e66668d9712..0fff59352ad0c35e6a80840cf13dfa817110f9b1 100644 --- a/README.md +++ b/README.md @@ -1,95 +1,50 @@ -This is the main repository of the [NOMAD](http://nomad-lab.eu) parser for +This is the main repository of the [NOMAD](https://www.nomad-coe.eu/) parser for [BigDFT](http://bigdft.org/). -# Standalone Installation -The parser is designed to be usable as a separate python package. Here is an -example of the call syntax: - +# Example ```python - from bigdftparser import bigdftparser + from bigdftparser import BigDFTParser import matplotlib.pyplot as mpl - # 0. Initialize a parser by giving a path to the BigDFT output file and a list of - # default units - path = "path/to/main.file" + # 1. Initialize a parser with a set of default units. default_units = ["eV"] - parser = bigdftparser(path, default_units=default_units) + parser = BigDFTParser(default_units=default_units) - # 1. Parse - results = parser.parse() + # 2. Parse a file + path = "path/to/main.file" + results = parser.parse(path) - # 2. Query the results with using the id's created specifically for NOMAD. + # 3. Query the results with using the id's created specifically for NOMAD. scf_energies = results["energy_total_scf_iteration"] mpl.plot(scf_energies) mpl.show() ``` -To install this standalone version, you need to first clone the -*git@gitlab.mpcdf.mpg.de:nomad-lab/python-common.git* repository and the -*git@gitlab.mpcdf.mpg.de:nomad-lab/nomad-meta-info.git* repository into the -same folder. Then install the *python-common* package according to the -instructions found in the README. After that, you can install this package by -running either of the following two commands depending on your python version: +# Installation +The code is python 2 and python 3 compatible. First download and install +the nomadcore package: ```sh -python setup.py develop --user # for python2 -python3 setup.py develop --user # for python3 +git clone https://gitlab.mpcdf.mpg.de/nomad-lab/python-common.git +cd python-common +pip install -r requirements.txt +pip install -e . ``` -# Scala access -The scala layer in the Nomad infrastructure can access the parser functionality -through the scalainterface.py file, by calling the following command: +Then download the metainfo definitions to the same folder where the +'python-common' repository was cloned: -```python - python scalainterface.py path/to/main/file +```sh +git clone https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-meta-info.git ``` -This scala interface is in it's own file to separate it from the rest of the -code. - -# Support of different versions -The parser is designed to support multiple versions of BigDFT with a -[DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) approach: The -initial parser class is based on BigDFT 1.8.0, and other versions will be -subclassed from it. By sublassing, all the previous functionality will be -preserved, new functionality can be easily created, and old functionality -overridden only where necesssary. +Finally download and install the parser: -# Developer Info -This section describes some of the guidelines that are used in the development -of this parser. - -## Documentation -This parser tries to follow the [google style -guide](https://google.github.io/styleguide/pyguide.html?showone=Comments#Comments) -for documenting python code. Documenting makes it much easier to follow the -logic behind your parser. - -## Testing -The parsers can become quite complicated and maintaining them without -systematic testing is impossible. There are general tests that are -performed automatically in the scala layer for all parsers. This is essential, -but can only test that the data is outputted in the correct format and -according to some general rules. These tests cannot verify that the contents -are correct. - -In order to truly test the parser output, regression testing is needed. The -tests for this parser are located in the **regtest** folder. Tests provide one -way to test each parseable quantity and python has a very good [library for -unit testing](https://docs.python.org/2/library/unittest.html). When the parser -supports a new quantity it is quite fast to create unit tests for it. These -tests will validate the parsing, and also easily detect bugs that may rise when -the code is modified in the future. - -## Profiling -The parsers have to be reasonably fast. For some codes there is already -significant amount of data in the NoMaD repository and the time taken to parse -it will depend on the performance of the parser. Also each time the parser -evolves after system deployment, the existing data may have to be reparsed at -least partially. +```sh +git clone https://gitlab.mpcdf.mpg.de/nomad-lab/parser-big-dft.git +cd parser-big-dft +pip install -e . +``` -By profiling what functions take the most computational time and memory during -parsing you can identify the bottlenecks in the parser. There are already -existing profiling tools such as -[cProfile](https://docs.python.org/2/library/profile.html#module-cProfile) -which you can plug into your scripts very easily. +# Notes +The parser is based on BigDFT 1.8. diff --git a/parser/parser-big-dft/bigdftparser/parser.py b/parser/parser-big-dft/bigdftparser/parser.py index 5efab8b340bb3f9da2b94d6a728f835f41c885bd..46703e71bcb2ae0c7c7adf7c982e1362f02a2e58 100644 --- a/parser/parser-big-dft/bigdftparser/parser.py +++ b/parser/parser-big-dft/bigdftparser/parser.py @@ -6,7 +6,6 @@ from nomadcore.baseclasses import ParserInterface logger = logging.getLogger("nomad") -#=============================================================================== class BigDFTParser(ParserInterface): """This class handles the initial setup before any parsing can happen. It determines which version of BigDFT was used to generate the output and then @@ -15,8 +14,8 @@ class BigDFTParser(ParserInterface): After the implementation has been setup, you can parse the files with parse(). """ - def __init__(self, main_file, metainfo_to_keep=None, backend=None, default_units=None, metainfo_units=None, debug=True, log_level=logging.ERROR, store=True): - super(BigDFTParser, self).__init__(main_file, metainfo_to_keep, backend, default_units, metainfo_units, debug, log_level, store) + def __init__(self, metainfo_to_keep=None, backend=None, default_units=None, metainfo_units=None, debug=True, log_level=logging.ERROR, store=True): + super(BigDFTParser, 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 @@ -78,4 +77,4 @@ class BigDFTParser(ParserInterface): except AttributeError: logger.exception("A parser class '{}' could not be found in the module '[]'.".format(class_name, parser_module)) raise - self.main_parser = parser_class(self.parser_context.main_file, self.parser_context) + self.main_parser = parser_class(self.parser_context) diff --git a/parser/parser-big-dft/bigdftparser/scalainterface.py b/parser/parser-big-dft/bigdftparser/scalainterface.py index c602f237345a07d55640d66940e81341efbe93b4..bd2edf21eb9367039eb57dfcc884b2cdbf909e9f 100644 --- a/parser/parser-big-dft/bigdftparser/scalainterface.py +++ b/parser/parser-big-dft/bigdftparser/scalainterface.py @@ -13,5 +13,5 @@ if __name__ == "__main__": # Initialise the parser with the main filename and a JSON backend main_file = sys.argv[1] - parser = BigDFTParser(main_file, backend=JsonParseEventsWriterBackend) - parser.parse() + parser = BigDFTParser(backend=JsonParseEventsWriterBackend) + parser.parse(main_file) diff --git a/parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py b/parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py index 78d7d1091e9f6e7c118cccacfba23e8a6b698a85..e0f8f9deb149e20c8467c9802e7f7ccb4ba086bb 100644 --- a/parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py +++ b/parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py @@ -7,15 +7,14 @@ from bigdftparser.generic.libxc_codes import LIB_XC_MAPPING LOGGER = logging.getLogger("nomad") -#=============================================================================== class BigDFTMainParser(AbstractBaseParser): """The main parser class that is called for all run types. Parses the NWChem output file. """ - def __init__(self, file_path, parser_context): + def __init__(self, parser_context): """ """ - super(BigDFTMainParser, self).__init__(file_path, parser_context) + super(BigDFTMainParser, self).__init__(parser_context) # Map keys in the output to funtions that handle the values self.key_to_funct_map = { @@ -30,7 +29,7 @@ class BigDFTMainParser(AbstractBaseParser): "Energy (Hartree)": lambda x: self.backend.addRealValue("energy_total", float(x), unit="hartree"), } - def parse(self): + def parse(self, filepath): """The output file of a BigDFT run is a YAML document. Here we directly parse this document with an existing YAML library, and push its contents into the backend. This function will read the document in @@ -39,7 +38,7 @@ class BigDFTMainParser(AbstractBaseParser): """ self.prepare() self.print_json_header() - with open(self.file_path, "r") as fin: + with open(filepath, "r") as fin: try: # Open default sections and output default information section_run_id = self.backend.openSection("section_run") diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/forces_posinp.xyz b/regtests/bigdft_1.8/periodicity/free/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/forces_posinp.xyz rename to regtests/bigdft_1.8/periodicity/free/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/input_minimal.yaml b/regtests/bigdft_1.8/periodicity/free/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/input_minimal.yaml rename to regtests/bigdft_1.8/periodicity/free/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/output.out b/regtests/bigdft_1.8/periodicity/free/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/output.out rename to regtests/bigdft_1.8/periodicity/free/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/posinp.xyz b/regtests/bigdft_1.8/periodicity/free/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/posinp.xyz rename to regtests/bigdft_1.8/periodicity/free/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/time.yaml b/regtests/bigdft_1.8/periodicity/free/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/free/time.yaml rename to regtests/bigdft_1.8/periodicity/free/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/forces_posinp.xyz b/regtests/bigdft_1.8/periodicity/periodic/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/forces_posinp.xyz rename to regtests/bigdft_1.8/periodicity/periodic/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/input_minimal.yaml b/regtests/bigdft_1.8/periodicity/periodic/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/input_minimal.yaml rename to regtests/bigdft_1.8/periodicity/periodic/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/output.out b/regtests/bigdft_1.8/periodicity/periodic/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/output.out rename to regtests/bigdft_1.8/periodicity/periodic/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/posinp.xyz b/regtests/bigdft_1.8/periodicity/periodic/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/posinp.xyz rename to regtests/bigdft_1.8/periodicity/periodic/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/time.yaml b/regtests/bigdft_1.8/periodicity/periodic/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/periodic/time.yaml rename to regtests/bigdft_1.8/periodicity/periodic/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/forces_posinp.xyz b/regtests/bigdft_1.8/periodicity/surface/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/forces_posinp.xyz rename to regtests/bigdft_1.8/periodicity/surface/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/input_minimal.yaml b/regtests/bigdft_1.8/periodicity/surface/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/input_minimal.yaml rename to regtests/bigdft_1.8/periodicity/surface/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/output.out b/regtests/bigdft_1.8/periodicity/surface/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/output.out rename to regtests/bigdft_1.8/periodicity/surface/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/posinp.xyz b/regtests/bigdft_1.8/periodicity/surface/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/posinp.xyz rename to regtests/bigdft_1.8/periodicity/surface/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/time.yaml b/regtests/bigdft_1.8/periodicity/surface/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/periodicity/surface/time.yaml rename to regtests/bigdft_1.8/periodicity/surface/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/forces_posinp.xyz b/regtests/bigdft_1.8/single_point/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/forces_posinp.xyz rename to regtests/bigdft_1.8/single_point/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/input_minimal.yaml b/regtests/bigdft_1.8/single_point/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/input_minimal.yaml rename to regtests/bigdft_1.8/single_point/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/output.out b/regtests/bigdft_1.8/single_point/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/output.out rename to regtests/bigdft_1.8/single_point/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/posinp.xyz b/regtests/bigdft_1.8/single_point/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/posinp.xyz rename to regtests/bigdft_1.8/single_point/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/time.yaml b/regtests/bigdft_1.8/single_point/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/single_point/time.yaml rename to regtests/bigdft_1.8/single_point/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_1/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_1/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/input.dft b/regtests/bigdft_1.8/xc_functionals/abinit_1/input.dft similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/input.dft rename to regtests/bigdft_1.8/xc_functionals/abinit_1/input.dft diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_1/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_1/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_1/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_1/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_1/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_1/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_1/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_1/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_1/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_100/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_100/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_100/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_100/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_100/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_100/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_100/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_100/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_100/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_100/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_100/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_100/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_100/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_100/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_100/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_11/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_11/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_11/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_11/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_11/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_11/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_11/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_11/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_11/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_11/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_11/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_11/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_11/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_11/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_11/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_12/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_12/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_12/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_12/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_12/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_12/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_12/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_12/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_12/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_12/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_12/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_12/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_12/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_12/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_12/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_15/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_15/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_15/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_15/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_15/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_15/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_15/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_15/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_15/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_15/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_15/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_15/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_15/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_15/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_15/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_16/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_16/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_16/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_16/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_16/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_16/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_16/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_16/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_16/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_16/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_16/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_16/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_16/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_16/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_16/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_17/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_17/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_17/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_17/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_17/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_17/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_17/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_17/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_17/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_17/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_17/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_17/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_17/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_17/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_17/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_26/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_26/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_26/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_26/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_26/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_26/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_26/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_26/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_26/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_26/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_26/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_26/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_26/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_26/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_26/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_27/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_27/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/input.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_27/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/input.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_27/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_27/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_27/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/output.out b/regtests/bigdft_1.8/xc_functionals/abinit_27/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/output.out rename to regtests/bigdft_1.8/xc_functionals/abinit_27/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/abinit_27/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/abinit_27/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/psppar.N b/regtests/bigdft_1.8/xc_functionals/abinit_27/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/psppar.N rename to regtests/bigdft_1.8/xc_functionals/abinit_27/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/time.yaml b/regtests/bigdft_1.8/xc_functionals/abinit_27/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/abinit_27/time.yaml rename to regtests/bigdft_1.8/xc_functionals/abinit_27/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/input.dft b/regtests/bigdft_1.8/xc_functionals/input.dft similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/input.dft rename to regtests/bigdft_1.8/xc_functionals/input.dft diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_001/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_001/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/input.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_001/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/input.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_001/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_001/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_001/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/output.out b/regtests/bigdft_1.8/xc_functionals/libxc_001/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/output.out rename to regtests/bigdft_1.8/xc_functionals/libxc_001/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_001/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_001/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/psppar.N b/regtests/bigdft_1.8/xc_functionals/libxc_001/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/psppar.N rename to regtests/bigdft_1.8/xc_functionals/libxc_001/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/time.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_001/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_001/time.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_001/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_010/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_010/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/input.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_010/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/input.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_010/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_010/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_010/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/output.out b/regtests/bigdft_1.8/xc_functionals/libxc_010/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/output.out rename to regtests/bigdft_1.8/xc_functionals/libxc_010/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_010/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_010/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/psppar.N b/regtests/bigdft_1.8/xc_functionals/libxc_010/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/psppar.N rename to regtests/bigdft_1.8/xc_functionals/libxc_010/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/time.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_010/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_010/time.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_010/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_101/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_101/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/input.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_101/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/input.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_101/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_101/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_101/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/output.out b/regtests/bigdft_1.8/xc_functionals/libxc_101/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/output.out rename to regtests/bigdft_1.8/xc_functionals/libxc_101/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_101/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_101/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/psppar.N b/regtests/bigdft_1.8/xc_functionals/libxc_101/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/psppar.N rename to regtests/bigdft_1.8/xc_functionals/libxc_101/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/time.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_101/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101/time.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_101/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/forces_posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_101130/forces_posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/forces_posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_101130/forces_posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/input.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_101130/input.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/input.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_101130/input.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/input_minimal.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_101130/input_minimal.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/input_minimal.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_101130/input_minimal.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/output.out b/regtests/bigdft_1.8/xc_functionals/libxc_101130/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/output.out rename to regtests/bigdft_1.8/xc_functionals/libxc_101130/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/posinp.xyz b/regtests/bigdft_1.8/xc_functionals/libxc_101130/posinp.xyz similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/posinp.xyz rename to regtests/bigdft_1.8/xc_functionals/libxc_101130/posinp.xyz diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/psppar.N b/regtests/bigdft_1.8/xc_functionals/libxc_101130/psppar.N similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/psppar.N rename to regtests/bigdft_1.8/xc_functionals/libxc_101130/psppar.N diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/time.yaml b/regtests/bigdft_1.8/xc_functionals/libxc_101130/time.yaml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/xc_functionals/libxc_101130/time.yaml rename to regtests/bigdft_1.8/xc_functionals/libxc_101130/time.yaml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/data.yml b/regtests/bigdft_1.8/yaml_test/data.yml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/data.yml rename to regtests/bigdft_1.8/yaml_test/data.yml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/node_data.yml b/regtests/bigdft_1.8/yaml_test/node_data.yml similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/node_data.yml rename to regtests/bigdft_1.8/yaml_test/node_data.yml diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/node_reader.py b/regtests/bigdft_1.8/yaml_test/node_reader.py similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/node_reader.py rename to regtests/bigdft_1.8/yaml_test/node_reader.py diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/output.out b/regtests/bigdft_1.8/yaml_test/output.out similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/output.out rename to regtests/bigdft_1.8/yaml_test/output.out diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/yaml_creator.py b/regtests/bigdft_1.8/yaml_test/yaml_creator.py similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/yaml_creator.py rename to regtests/bigdft_1.8/yaml_test/yaml_creator.py diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/yaml_reader.py b/regtests/bigdft_1.8/yaml_test/yaml_reader.py similarity index 100% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/yaml_test/yaml_reader.py rename to regtests/bigdft_1.8/yaml_test/yaml_reader.py diff --git a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/run_tests.py b/regtests/regtests.py similarity index 74% rename from parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/run_tests.py rename to regtests/regtests.py index 75f1d7e838862798f1175a6043d1b321d256c13e..294f523445594b5b0555937b0685b08a9ae6acb6 100644 --- a/parser/parser-big-dft/bigdftparser/regtest/bigdft_1.8/run_tests.py +++ b/regtests/regtests.py @@ -1,15 +1,3 @@ -""" -This is a module for unit testing the BigDFT parser. The unit tests are run with -a custom backend that outputs the results directly into native python object for -easier and faster analysis. - -Each property that has an enumerable list of different possible options is -assigned a new test class, that should ideally test through all the options. - -The properties that can have non-enumerable values will be tested only for one -specific case inside a test class that is designed for a certain type of run -(MD, optimization, QM/MM, etc.) -""" import os import unittest import logging @@ -18,41 +6,32 @@ from bigdftparser import BigDFTParser from nomadcore.unit_conversion.unit_conversion import convert_unit -#=============================================================================== -def get_results(folder, metainfo_to_keep=None): - """Get the given result from the calculation in the given folder by using - the Analyzer in the nomadtoolkit package. Tries to optimize the parsing by - giving the metainfo_to_keep argument. +def get_result(folder, metaname=None): + """Get the results from the calculation in the given folder. By default goes through different Args: folder: The folder relative to the directory of this script where the parsed calculation resides. - metaname: The quantity to extract. + metaname(str): Optional quantity to return. If not specified, returns + the full dictionary of results. """ dirname = os.path.dirname(__file__) - filename = os.path.join(dirname, folder, "output.out") - parser = BigDFTParser(filename, None, debug=True, log_level=logging.WARNING) - results = parser.parse() - return results + filename = os.path.join("bigdft_{}".format(VERSION), dirname, folder, "output.out") + parser = BigDFTParser(None, debug=True, log_level=logging.CRITICAL) + results = parser.parse(filename) - -#=============================================================================== -def get_result(folder, metaname, optimize=True): - if optimize: - results = get_results(folder, None) + if metaname is None: + return results else: - results = get_results(folder) - result = results[metaname] - return result + return results[metaname] -#=============================================================================== class TestSinglePoint(unittest.TestCase): """Tests that the parser can handle single point calculations. """ @classmethod def setUpClass(cls): - cls.results = get_results("single_point", "section_run") + cls.results = get_result("single_point") # cls.results.print_summary() def test_program_name(self): @@ -177,42 +156,40 @@ class TestSinglePoint(unittest.TestCase): # self.assertEqual(kind["method_atom_kind_label"][0], "H") -#=============================================================================== class TestPeriodicity(unittest.TestCase): """Tests that the parser can handle different boundary conditions. """ def test_periodic(self): - results = get_results("periodicity/periodic") + results = get_result("periodicity/periodic") result = results["configuration_periodic_dimensions"] self.assertTrue(np.array_equal(result, np.array([True, True, True]))) def test_surface(self): - results = get_results("periodicity/surface") + results = get_result("periodicity/surface") result = results["configuration_periodic_dimensions"] self.assertTrue(np.array_equal(result, np.array([True, False, True]))) def test_free(self): - results = get_results("periodicity/free") + results = get_result("periodicity/free") result = results["configuration_periodic_dimensions"] self.assertTrue(np.array_equal(result, np.array([False, False, False]))) -#=============================================================================== class TestXCFunctionals(unittest.TestCase): """Tests that the parser can handle different XC functional codes. """ def test_abinit_1(self): - results = get_results("xc_functionals/abinit_1") + results = get_result("xc_functionals/abinit_1") result = results["XC_functional"] self.assertEqual(result, "1.0*LDA_XC_TETER93") def test_abinit_11(self): - results = get_results("xc_functionals/abinit_11") + results = get_result("xc_functionals/abinit_11") result = results["XC_functional"] self.assertEqual(result, "1.0*GGA_C_PBE_1.0*GGA_X_PBE") def test_abinit_12(self): - results = get_results("xc_functionals/abinit_12") + results = get_result("xc_functionals/abinit_12") result = results["XC_functional"] self.assertEqual(result, "1.0*GGA_X_PBE") @@ -247,37 +224,40 @@ class TestXCFunctionals(unittest.TestCase): # self.assertEqual(result, "1.0*GGA_XC_HCTH_407") def test_abinit_100(self): - results = get_results("xc_functionals/abinit_100") + results = get_result("xc_functionals/abinit_100") result = results["XC_functional"] self.assertEqual(result, "1.0*HF_X") def test_libxc_001(self): - results = get_results("xc_functionals/libxc_001") + results = get_result("xc_functionals/libxc_001") result = results["XC_functional"] self.assertEqual(result, "1.0*LDA_X") def test_libxc_010(self): - results = get_results("xc_functionals/libxc_010") + results = get_result("xc_functionals/libxc_010") result = results["XC_functional"] self.assertEqual(result, "1.0*LDA_C_PZ_MOD") def test_libxc_101(self): - results = get_results("xc_functionals/libxc_101") + results = get_result("xc_functionals/libxc_101") result = results["XC_functional"] self.assertEqual(result, "1.0*GGA_X_PBE") def test_libxc_101130(self): - results = get_results("xc_functionals/libxc_101130") + results = get_result("xc_functionals/libxc_101130") result = results["XC_functional"] self.assertEqual(result, "1.0*GGA_C_PBE_1.0*GGA_X_PBE") -#=============================================================================== if __name__ == '__main__': - suites = [] - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestSinglePoint)) - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestPeriodicity)) - suites.append(unittest.TestLoader().loadTestsFromTestCase(TestXCFunctionals)) - alltests = unittest.TestSuite(suites) - unittest.TextTestRunner(verbosity=0).run(alltests) + VERSIONS = ["1.8"] + + for VERSION in VERSIONS: + suites = [] + suites.append(unittest.TestLoader().loadTestsFromTestCase(TestSinglePoint)) + suites.append(unittest.TestLoader().loadTestsFromTestCase(TestPeriodicity)) + suites.append(unittest.TestLoader().loadTestsFromTestCase(TestXCFunctionals)) + + alltests = unittest.TestSuite(suites) + unittest.TextTestRunner(verbosity=0).run(alltests)