Use leruli.com from command line and Python code.
Project description
Use leruli.com from both command line and within Python code: a convenience wrapper around the corresponding API.
Features
Cheminformatics
graph-to-solvation-energy: Estimate the free energy of solvation in kcal/mol.
graph-to-geometry: Returns an approximate 3D geometry from a given graph input.
graph-to-formula: Calculates the chemical formula in the Hill system given a graph representation like SMILES.
canonical-formula: Expands nested or ill-ordered chemical formulas to conform to the Hill system.)
canonical-graph: Returns a canonical version of the input graph-based representation.
Chemical space
formula-to-graphs: Returns a list of up to 12 known molecules that are relevant for the given sum formula.
graph-to-name: SMILES string to IUPAC name
name-to-graph: IUPAC or trivial name to SMILES
Compute
formula-to-cost: Estimates the resources required for a single point calculation of a given sum formula and basis set.
graph-to-boiling-point: Predicts a boiling point in deg C.
graph-to-logD: Predicts logD.
graph-to-logP: Predicts logP.
graph-to-melting-point: Predicts a melting point in deg C.
graph-to-pKa: Predicts the pKa.
Images
graph-to-image: Renders a molecule as SVG, PNG, or PDF
Arguments and usage are explained in the documentation.
Examples for command line usage
$ leruli name-to-graph acetone
CC(=O)C
$ leruli graph-to-geometry "CC(=O)C"
10
Generated with https://api.leruli.com/latest/references/BCE2020,BEG2019,rdkit/bibtex
C -1.27026192165113 0.14084775426444 0.00476447523142
C 0.02515865734774 -0.50330451875543 -0.42395679691615
C 1.2579793305529 0.10253815475833 0.20100853006798
O 0.07157373218152 -1.42176383766864 -1.19973295254716
H -1.22116019071807 1.21731682582838 -0.14125628889309
H -1.4330436431626 -0.04892803967934 1.06432799065161
H -2.10110516465872 -0.27062142792271 -0.56236052059465
H 1.38126815602784 1.12055904935252 -0.16250100941439
H 2.13759306261 -0.4780527025027 -0.06252115184424
H 1.15199798147051 0.14140874232516 1.28222772425865
$ leruli graph-to-formula "CC(=O)C"
C3H6O
$ leruli graph-to-solvation-energy CC water 298,300,400,200
Temperature [K] Energy of solvation [kcal/mol]
----------------- --------------------------------
200 N/A
298 0.8636409650058766
300 0.902919806812065
400 1.9950388437192126
Examples for usage in Python
Load the library
>>> import leruli
Get a SMILES string from a molecule name.
>>> leruli.name_to_graph("acetone")
{'graph': 'CC(=O)C', 'reference': 'wikidata'}
Get a geometry for given molecular graph.
>>> print(leruli.graph_to_geometry('CC(=O)C', "XYZ")['geometry'])
10
Generated with https://api.leruli.com/latest/references/BCE2020,BEG2019,rdkit/bibtex
C -1.27026192165113 0.14084775426444 0.00476447523142
C 0.02515865734774 -0.50330451875543 -0.42395679691615
C 1.2579793305529 0.10253815475833 0.20100853006798
O 0.07157373218152 -1.42176383766864 -1.19973295254716
H -1.22116019071807 1.21731682582838 -0.14125628889309
H -1.4330436431626 -0.04892803967934 1.06432799065161
H -2.10110516465872 -0.27062142792271 -0.56236052059465
H 1.38126815602784 1.12055904935252 -0.16250100941439
H 2.13759306261 -0.4780527025027 -0.06252115184424
H 1.15199798147051 0.14140874232516 1.28222772425865
Get the sum formula from a molecular graph.
>>> leruli.graph_to_formula("CC=O")
{'formula': 'C2H4O', 'reference': 'M2013,rdkit'}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file leruli-22.1.6.tar.gz
.
File metadata
- Download URL: leruli-22.1.6.tar.gz
- Upload date:
- Size: 201.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cb89f745600a4b5ead0d5a2260ffdf2ef37ef955f047ff71aa9359fbda1a61d |
|
MD5 | 1b5359456248a0067778501810c18b8c |
|
BLAKE2b-256 | bec0ce056cd131ba5d274a56f95c5569fe6da73b6c441bb35e713d932d35b2a1 |
File details
Details for the file leruli-22.1.6-py2.py3-none-any.whl
.
File metadata
- Download URL: leruli-22.1.6-py2.py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73851c8d8c515b8d3c371941a7fa87353e0226775af4f3c7433e619e535574a1 |
|
MD5 | f70f370ac98b62a909cdf642bf4c0edc |
|
BLAKE2b-256 | 122931fc514273ddcef548328b51d380066104c8b107e069e22f4ea53dcdf83a |