Skip to main content

A python api to make lethal blood concentrations using amberNPS

Project description

amberNPS-api

amperNPS-api is a convenient python API to make predictions lethal blood concentrations (LBC) of new psychoactive substances (NPS).

amberNPS is a streamlit application developed by Tarcisio Nascimento Correa. For further details please the publication at A QSAR-based application for the prediction of lethal blood concentration of new psychoactive substances

Installation

Install the latest version of amberNPS with pip:

pip install amberNPS

Example usage

Import the amberNPS class, instatiate it then call the predict method with the SMILES string:

>>> from amberNPS import amberNPS
>>> a = amberNPS()
>>> a = a.predict("Brc1cc2C(=NCc3nnc(C)n3c2cc1)c4ccccc4") # bromazolam
>>> preds
{'Drug Class': 'Benzodiazepines', 'LOLBC': 28.988149644904777,'LBC50': 151.32238377755087, 'HOLBC': 870.7153200659999}

Results are also stored as properties:

>>> a.LOLBC
28.988149644904777
>>> a.LBC50
151.32238377755087
>>> a.HOLBC
870.7153200659999
>>> a.drug_class
'Benzodiazepines'
>>> a.smiles
'Brc1cc2C(=NCc3nnc(C)n3c2cc1)c4ccccc4'

The raw predictions (log10 of concentrations above) can also be accessed.

As a list:

>>> a.lbc_preds
[1.0843620906924618, 0.36667941118940295, -0.3932936005597203]

Or using properties:

>>> a.pLOLBC
1.0843620906924618
>>> a.pLBC50
0.36667941118940295
>>> a.pHOLBC
0.3932936005597203

You can also render the image of the structure (this may or may not work depending on IDE):

a.structure

example structure

Documentation

The API reference is available at https://ambernps-api.readthedocs.io/en/latest/amberNPS.html#module-amberNPS.

Contributing

  • Feature ideas and bug reports are welcome on the Issue Tracker.
  • Fork the source code on GitHub, make changes and file a pull request.

License

PubChemPy is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ambernps-0.1.4.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ambernps-0.1.4-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file ambernps-0.1.4.tar.gz.

File metadata

  • Download URL: ambernps-0.1.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for ambernps-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b89dc0ca1e3e97d9e6c405c9b69019d4794d2b3fcb6256c44f662c38d96910b8
MD5 bd22fac38e934f16197819537d06b6db
BLAKE2b-256 4e3e0b0f826d4f1a8a2cd4ca069f9f005a8d6a36bca96d4f8a66ff503c2a6bb2

See more details on using hashes here.

File details

Details for the file ambernps-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: ambernps-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for ambernps-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 380973db4588f395078fa41148980e1e9f0d91ba4f82bafa417ac5df6bcbaa4e
MD5 2092877c39ce0aa8932ad399a0620ac4
BLAKE2b-256 02156a22a0777d78d8acbf531cf1fe3e3d9d8c6f70693c1faa72fb2e3293caec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page