epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
291 stars 100 forks source link

Incorrect validation processing of a substance with a clear indication of the type. #826

Open digitalwert-devs opened 1 year ago

digitalwert-devs commented 1 year ago

Steps to Reproduce Request on /indigo/validate

{
  "data": {
    "type": "validation",
    "attributes": {
      "compound": {
        "structure": "C(#N)C1C(Cl)=C(Cl)C(O)=C(C(O)=N)C=1Cl",
        "format": "molfile"
      },
      "validations": [
        "query"
      ]
    }
  }
}

Expected behavior Error due to format and query string mismatch (smiles vs molfile)

Actual behavior Validation is successful.

Indigo/Bingo version
1.7.0.0-geeba23428-x86_64-linux-gnu-11.2.1

Additional context Also the inchi format is handled incorrectly.

even1024 commented 1 year ago

We'll fix the issue in the future Indigo versions

digitalroll commented 1 year ago
{
  "data": {
    "type": "validation",
    "attributes": {
      "compound": {
        "structure": "",
        "format": "auto"
      },
      "validations": [
        "stereo3D"
      ]
    }
  }
}

The empty substance also passes validation, but it should not.