Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Informative handling of validation script errors #203

Open
SimonBoothroyd opened this issue Apr 20, 2021 · 0 comments
Open

Informative handling of validation script errors #203

SimonBoothroyd opened this issue Apr 20, 2021 · 0 comments

Comments

@SimonBoothroyd
Copy link
Contributor

Description

Currently if the CI validation logic encounters a molecule it cannot successfully parse it fails ungracefully, see here for example.

It would be useful if the try, except logic was expanded to have a case for a default exception whereby the molecule identifier (id / SMILES?) was captured along with a traceback, and the trackback reported on a per failure basis similar to the error cycling report.

Example

QCSubmit Validation Report

submissions/2021-03-29-OpenFF-Aniline-2D-Impropers-v1.0/dataset.json.bz2
Dataset Name OpenFF Aniline 2D Impropers v1.0
... ...
No Exceptions Raised ✖️

Tracebacks (click to expand)
------------------------------------ CCCO ------------------------------------

Traceback (most recent call last):
  File "./management/validation.py", line 347, in <module>
    main()
  File "./management/validation.py", line 333, in main
    comment = main_validation(dataset_paths)
  File "./management/validation.py", line 246, in main_validation
    dataset_validators.update(validate_dataset(data))
  File "./management/validation.py", line 75, in validate_dataset
    dataset.add_molecule(**entry, molecule=None)
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openff/qcsubmit/datasets/datasets.py", line 608, in add_molecule
    **kwargs,
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openff/qcsubmit/datasets/entries.py", line 223, in __init__
    check_linear_torsions(torsion, off_molecule)
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openff/qcsubmit/validators.py", line 233, in check_linear_torsions
    matches = molecule.chemical_environment_matches(linear_smarts)
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openforcefield/topology/molecule.py", line 3956, in chemical_environment_matches
    matches = toolkit_registry.call("find_smarts_matches", self, smirks)
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openforcefield/utils/toolkits.py", line 5799, in call
    raise e
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openforcefield/utils/toolkits.py", line 5795, in call
    return method(*args, **kwargs)
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openforcefield/utils/toolkits.py", line 4579, in find_smarts_matches
    rdmol = self.to_rdkit(molecule, aromaticity_model=aromaticity_model)
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openforcefield/utils/toolkits.py", line 4342, in to_rdkit
    cls._assign_rdmol_bonds_stereo(molecule, rdmol)
  File "/usr/share/miniconda/envs/validation/lib/python3.7/site-packages/openforcefield/utils/toolkits.py", line 4903, in _assign_rdmol_bonds_stereo
    assert stereo_rdbond.GetStereo() == desired_rdk_stereo_code
AssertionError

@dotsdl it would be good to get your thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant