Metadata-Version: 2.4
Name: amberNPS
Version: 0.1.6
Summary: A python api to make lethal blood concentrations using amberNPS
Home-page: https://github.com/dpasin/amberNPS-api
Author: Daniel Pasin
Author-email: daniel.pasin@hyperiondata.org
License: MIT
Keywords: amberNPS,chemistry,toxicology
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Programming Language :: Python
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: rdkit
Requires-Dist: mordredcommunity
Requires-Dist: scikit-learn==1.6.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary


# amberNPS-api


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

[amberNPS](https://ambernps.streamlit.app/) 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](https://www.sciencedirect.com/science/article/pii/S2667118224000151)

## Installation

Install the latest version of amberNPS with pip:

```shell
pip install amberNPS
```

## Example usage

Import the amberNPS class, instatiate it then call the predict method with the SMILES string:
```pycon
>>> 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:

```pycon
>>> 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:
```pycon
>>> a.lbc_preds
[1.0843620906924618, 0.36667941118940295, -0.3932936005597203]
```
Or using properties:
```pycon
>>> 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):
```pycon
a.structure
```
![example structure](assets/example.png)

## 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](https://github.com/dpasin/amberNPS/issues).
- Fork the [source code](https://github.com/dpasin/amberNPS) on GitHub, make changes and file a pull request.

## License

PubChemPy is licensed under the [MIT license](https://github.com/dpasin/amberNPS/LICENSE).


