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

Add resource for basic and acid PKA calculations #789

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

khyurri
Copy link
Collaborator

@khyurri khyurri commented Jul 19, 2022

This PR fixes Issue #709

Added new resource "/indigo/pka",
Currently for correct pka calculation user is required to pass pka_model_build object:

{
    sdf: string,
    max_level: int,
    threshold: float
}

Example can be found in this test: https://github.com/epam/Indigo/pull/789/files#diff-bd881ed8307e3a0d774f9e48c79acb01efa5cb3a28c0fa766ba82755dbe4a6f1R193

@khyurri
Copy link
Collaborator Author

khyurri commented Jul 19, 2022

@IuriiPuzanov

Could you please clarify, why I always get pka acid and basic 100%.

I used this example for implementations: https://lifescience.opensource.epam.com/indigo/api/index.html#pka

Example request:

{
  "data": {
    "type": "pka",
    "attributes": {
      "compound": {
        "structure": "C1=C(C(=C(C(=C1Cl)Cl)Cl)O)Cl",
        "format": "auto"
      },
      "pka_model": "advanced",
      "pka_type": "acid",
      "pka_model_level": 0,
      "pka_model_min_level": 0
    }
  }
}

Response:

{
  "data": {
    "type": "pkaResult",
    "attributes": {
      "mappings": [
        {
          "index": 0,
          "symbol": "C",
          "value": 100
        },
        {
          "index": 1,
          "symbol": "C",
          "value": 100
        },
        {
          "index": 2,
          "symbol": "C",
          "value": 100
        },
        {
          "index": 3,
          "symbol": "C",
          "value": 100
        },
        {
          "index": 4,
          "symbol": "C",
          "value": 100
        },
        {
          "index": 5,
          "symbol": "C",
          "value": 100
        },
        {
          "index": 6,
          "symbol": "Cl",
          "value": 100
        },
        {
          "index": 7,
          "symbol": "Cl",
          "value": 100
        },
        {
          "index": 8,
          "symbol": "Cl",
          "value": 100
        },
        {
          "index": 9,
          "symbol": "O",
          "value": 100
        },
        {
          "index": 10,
          "symbol": "Cl",
          "value": 100
        }
      ]
    }
  }
}

I took this compound from here.

Also, could you please clarify, how rdkit calculates exp_pKa for whole molecule. Do we need same functionality in REST service?

@khyurri khyurri requested a review from mkviatkovskii July 19, 2022 10:03
@khyurri khyurri force-pushed the hotfix/indigo_service_descriptors branch 2 times, most recently from 49e965a to ac2f9bd Compare July 20, 2022 14:47
@khyurri khyurri changed the title WIP: Add resource for basic and acid PKA calculations Add resource for basic and acid PKA calculations Jul 20, 2022
@khyurri khyurri requested a review from MysterionRise July 20, 2022 15:12
@khyurri khyurri force-pushed the hotfix/indigo_service_descriptors branch 5 times, most recently from 9899037 to a5421b9 Compare July 25, 2022 08:59
@khyurri khyurri force-pushed the hotfix/indigo_service_descriptors branch from a5421b9 to aa026a9 Compare July 25, 2022 09:44
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

Successfully merging this pull request may close these issues.

1 participant