Skip to main content

UML Energy & Combustion Research Laboratory

alvaDescPy: A Python wrapper for alvaDesc software

GitHub version PyPI version GitHub license

alvaDescPy provides a Python wrapper for the alvaDesc molecular descriptor calculation software. It was created to allow direct access to the alvaDesc command-line interface via Python.

Important Notice:

Please note that alvaDescPy is an independent project and was not developed by Alvascience. You can find the official alvaDesc Python interface on Alvascience website: https://www.alvascience.com/python-alvadesc/.

Installation

Installation via pip:

$ pip install alvadescpy

Installation via cloned repository:

$ git clone https://github.com/ecrl/alvadescpy
$ cd alvadescpy
$ pip install .

There are currently no additional dependencies for alvaDescPy, however it requires a valid, licensed installation of alvaDesc.

Basic Usage

alvaDescPy assumes the location of alvaDesc's command-line interface is located at your OS's default location. If alvaDesc is located in a different location, you can change the path:

from alvadescpy import CONFIG

CONFIG['alvadesc_path'] = '\\path\\to\\alvaDescCLI'

alvaDescPy provides direct access to all alvaDesc command line arguments via the "alvadesc" function:

from alvadescpy import alvadesc

# providing an XML script file
alvadesc(script='my_script.xml')

# supplying a SMILES string returns a list of descriptors
descriptors = alvadesc(ismiles='CCC', descriptors='ALL')

# a Python dictionary is returned if labels are desired
descriptors = alvadesc(ismiles='CCC', descriptors='ALL', labels=True)

# specific descriptors can be calculated
descriptors = alvadesc(ismiles='CCC', descriptors=['MW', 'AMW'], labels=True)

# input/output files (and input type) can be specified
alvadesc(
    input_file='mols.mdl',
    inputtype='MDL',
    descriptors='ALL',
    output='descriptors.txt'
)

# various fingerprints can be calculated
ecfp = alvadesc(ismiles='CCC', ecfp=True)
pfp = alvadesc(ismiles='CCC', pfp=True)
maccsfp = alvadesc(ismiles='CCC', pfp=True)

# fingerprint hash size, min/max fragment length, bits/pattern and other
#   options can be specified
ecfp = alvadesc(
    ismiles='CCC',
    ecfp=True,
    fpsize=2048,
    fpmin=1,
    fpmax=4,
    bits=4,
    fpoptions='- Additional Options -'
)

# alvaDesc uses a number of threads equal to the maximum number of CPUs, but
#   can be changed
descriptors=alvadesc(ismiles='CCC', descriptors='ALL', threads=4)

alvaDescPy also provides the "smiles_to_descriptors" function:

from alvadescpy import smiles_to_descriptors

# returns a list of descriptor values
descriptors = smiles_to_descriptors('CCC', descriptors='ALL')

# returns a dictionary of descriptor labels, values
descriptors = smiles_to_descriptors('CCC', descriptors='ALL', labels=True)

# returns a dictionary containing MW, AMW labels, values
descriptors = smiles_to_descriptors(
    'CCC',
    descriptors=['MW', 'AMW'],
    labels=True
)

Contributing, Reporting Issues and Other Support

To contribute to alvaDescPy, make a pull request. Contributions should include tests for new features added, as well as extensive documentation.

To report problems with the software or feature requests, file an issue. When reporting problems, include information such as error messages, your OS/environment and Python version.

For additional support/questions, contact Travis Kessler (Travis_Kessler@student.uml.edu).

Metadata

Release files for alvadescpy 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alvadescpy 0.1.4
File Size Uploaded Provenance Actions
alvadescpy-0.1.4.tar.gz 5.9 kB Without provenance Details for alvadescpy-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alvadescpy 0.1.4
File Interpreter ABI Platform Actions
alvadescpy-0.1.4-py3-none-any.whl Python 3 none any Details for alvadescpy-0.1.4-py3-none-any.whl

Total release size: 12.9 kB

Release files / alvadescpy-0.1.4.tar.gz

Download URL alvadescpy-0.1.4.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
952e1ecc74ac1dcb5680c9f3b973d5c5e81453d7752f244b7db2a6ca7f5a4ec1
BLAKE2b-256 checksum
How to use checksums
29cc5fb9d0541096f6054ac48ba1e227583e4b1744d1ee2c1806f30375a50a58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / alvadescpy-0.1.4-py3-none-any.whl

Download URL alvadescpy-0.1.4-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d788151218f80b53c739e2efa632b47a58f7000220440b43cd23d0335273a49
BLAKE2b-256 checksum
How to use checksums
c56c8fbc48eae7824b0eac9d4f96105736ef65887165822d1b0f8cf73dcccb1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Security for alvadescpy 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page