Skip to main content

Library to get functional groups from molecular graphs.

Project description

FGUtils is a collection of utility functions for querying functional groups in molecules from their molecular graph representation.

Dependencies

  • Python (>= 3.11)
  • numpy (>= 1.26.4)
  • networkx (>= 3.2.1)
  • rdkit (>= 2023.09.4 optional)

Installation

You can install FGUtils using pip.

pip install fgutils

Getting Started

A simple example querying the functional groups for acetylsalicylic acid.

>>> from fgutils import FGQuery
>>> 
>>> smiles = "O=C(C)Oc1ccccc1C(=O)O" # acetylsalicylic acid
>>> query = FGQuery(use_smiles=True) # use_smiles requires rdkit to be installed
>>> query.get(smiles)
[('ester', [0, 1, 3]), ('carboxylic_acid', [10, 11, 12])]

The output is a list of tuples containing the functional group name and the corresponding atom indices.

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

fgutils-0.0.17.tar.gz (15.9 kB view hashes)

Uploaded Source

Built Distribution

fgutils-0.0.17-py3-none-any.whl (10.9 kB view hashes)

Uploaded Python 3

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