pydepict 0.1.1.post2

Creator: bigcodingguy24

Last updated:

Add to Cart

Description:

pydepict 0.1.1.post2

A library and accompanying program for parsing SMILES (simplified molecular-input line-entry system) strings and generating 2D depictions of chemical structures from these strings.
It was originally developed as part of a 3rd year computer science dissertation project.

Prerequisites
pydepict requires Python 3.7 or newer, and uses the following packages:

pygame
NetworkX

Specific versions of these libraries can be found in requirements.txt.


Setup
The recommended method of installation is via pip, which installs pydepict as a package:
python3 -m pip install pydepict
Use py -3 instead of python3 if you are on Windows.
Using pip installs the latest release of pydepict. Alternatively, if you want the latest development version, then you can clone the repository from GitHub:
git clone https://github.com/WilliamWFLee/pydepict
cd pydepict
If you want to run the program straight from the cloned repository then you must install pydepict’s package requirements using pip:
python3 -m pip install -r requirements.txt
Or to install the development version as a package:
python3 -m pip install .


Usage
If you have installed pydepict as a package, then you can run the program by simply running:
pydepict
Or you can invoke the module as a program:
python3 -m pydepict
If you want to run the program straight from the cloned repository, then you can execute the script src/main.py:
python3 src/main.py
Executing the program without any command-line arguments opens a GUI allowing SMILES string input. Passing a SMILES string as the first command-line argument only displays the renderer window showing only the corresponding diagram. For example:
python3 src/main.py CCO
parses the SMILES string CCO and displays the corresponding diagram.


Minimal Code Example
from pydepict import depict, parse, render

graph, _ = parse(input("Enter your SMILES string: "))
positions = depict(graph)
render(graph, positions)


License
This library is licensed under the MIT Licence. See LICENSE for license and copyright details. Code files will also include a header explicitly stating that the license and copyright applies.
NetworkX is licensed under the 3-clause BSD license, while pygame is licensed under the GNU Lesser General Public License (LGPL). See LICENSE.networkx and LICENSE.pygame respectively for details.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.