Skip to main content

Python wrapper for alvaDesc software

Project description

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.

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).

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

alvadescpy-0.1.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

alvadescpy-0.1.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file alvadescpy-0.1.3.tar.gz.

File metadata

  • Download URL: alvadescpy-0.1.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for alvadescpy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 dc88579178542ae990a99b26a7c2976efdc87b43c2b3d864978779fbe1df3c54
MD5 c683423909a066f44c94704c19b376fd
BLAKE2b-256 e4e4cff68d0add3cfd3dc1f4152e991458bcca7b059f7a6c63724218546e23c0

See more details on using hashes here.

File details

Details for the file alvadescpy-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: alvadescpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for alvadescpy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a08b716005a4b98a41e8fbd4cc869cac2bdc594a756ac3a47efe872e786b95c6
MD5 f07d0a8dc3cc1092007fbe44130c2ffd
BLAKE2b-256 d3679b585a6e8c113f2cb16c38bf8fd627324fcf5b5e24dfc4f28713fbeed6ca

See more details on using hashes here.

Supported by

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