diff --git a/validation/Dockerfile b/validation/Dockerfile index 725afb403e461fbfb5ef47e19bfdc66c0acc74cb..7ec976fa46679088e7ac4d19cf6cd89245a48892 100644 --- a/validation/Dockerfile +++ b/validation/Dockerfile @@ -7,7 +7,7 @@ ARG VERSION_PYTHON ARG VERSION_BASE_IMAGE ARG VERSION_CPP_DICT_PACK="v2.500" -ARG VERSION_PY_MMCIF="0.76" +ARG VERSION_PY_MMCIF="0.79" ## Set up environment ENV MMCIF_DICTS_DIR="/usr/local/share/mmcif-dict-suite" \ @@ -97,7 +97,7 @@ RUN set -e pipefail; \ gunzip *.gz; \ # ## Fetch the merged ModelCIF dictionary - if test x${USE_DICT_VERSION} == xlatest; then \ + if test x${USE_DICT_VERSION} = xlatest; then \ export _MA_DICT_URL="${_GIT_URL}/dist/mmcif_ma.dic"; \ fi; \ curl ${_MA_DICT_URL} -s -L -o mmcif_ma.dic; \ diff --git a/validation/README.md b/validation/README.md index 5f6407c1fd1bf36f67e45e142adab5efe10a0403..957d0c73fe03cf62c9b2aef0552643f7bbc61732 100644 --- a/validation/README.md +++ b/validation/README.md @@ -1,19 +1,19 @@ -[[_TOC_]] - # ModelCIF validation tool -This is a tool to check that the formatting of ModelCIF files complies with the ModelCIF format declaration (aka "dictionary"). Upon successful validation, a ModelCIF file can be extended with the dictionary version the file was compared to (option [`--extend-validated-file`](#add-validation-dictionary-to-ModelCIF-file)). For more basic mmCIF validation, the dictionary of the underlying PDBx/mmCIF format is also available. +This is a tool to check that the formatting of [ModelCIF](https://mmcif.wwpdb.org/dictionaries/mmcif_ma.dic/Index/) files complies with the ModelCIF format declaration (aka "dictionary"). Upon successful validation, a ModelCIF file can be extended with the dictionary version the file was compared to (option [`--extend-validated-file`](#add-dictionary-information-used-for-validation-to-modelcIF-file)). For more basic [mmCIF](https://mmcif.wwpdb.org) validation, the dictionary of the underlying [PDBx/mmCIF](https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Index/) format is also available. -The easiest way to run validation is from Docker container. +The easiest way to run validation is from [Docker](https://www.docker.com) container. The tool itself is a wrapper around the [`CifCheck`](https://github.com/rcsb/cpp-dict-pack) tool by [RCSB](https://www.rcsb.org/). +[[_TOC_]] + ## How to run the validation tool -This is just a description of the validation tool itself. When running it from inside a container, the command needs to be prefixed with the instructions to start the container. Find information for running the validation container in "[How to run the container](#how-to-run-the-container)". +This is just a description of the [validation tool](./validate-mmcif-file.py) itself. When running it from inside a container, the command needs to be prefixed with the instructions to start the container. Find information for running the validation Docker container in "[How to run the container](#how-to-run-the-container)". -Upon completion, if there hasn't been any error running the command, the validation tool returns a concise report in JSON format. That output is meant to be input to a website or any kind of nicely formatted report. Output can also be stored as a file. If the tested ModelCIF file is fully compliant with the ModelCIF format, the JSON output has +Upon completion, if there hasn't been any error running the command, the validation tool returns a concise report in [JSON](https://www.json.org/json-en.html) format. That output is meant to be input to a website or any kind of nicely formatted report. Output can also be stored as a JSON formatted file. If the tested ModelCIF file is fully compliant with the ModelCIF format, the JSON output has - `status` "completed" - no messages in the `diagnosis` list diff --git a/validation/validate-mmcif-file.py b/validation/validate-mmcif-file.py index c82178cbd74b71ca92bc80fb413fed769faf0a2a..ad9fab4f9d35ba78aa461b657725d04f3db7b0fc 100755 --- a/validation/validate-mmcif-file.py +++ b/validation/validate-mmcif-file.py @@ -476,6 +476,7 @@ class _CifCheck: """Run CifCheck for a given file and catch the output. Returns False if the CifCheck execution itself failed.""" + self.check_results["cifcheck-errors"] = [] try: format_errors = self._execute(cif_file) except _CifCheckFailedError as exc: