Python Library: Chemical_Descriptors
This function generates one of several fingerprint types from the list of molecular fingerprints available, each serving specific tasks in cheminformatics and computational chemistry.
Importance of Fingerprint Types:
-
Distinct Representation: Different fingerprint types capture various aspects of a molecule’s structure, allowing for versatile molecular comparisons.
-
Diverse Applications: Depending on the task (such as similarity searching, classification, or clustering), choosing the right fingerprint type ensures better performance in chemical analysis and predictive modeling.
-
Accuracy in Modeling: The right fingerprint type can significantly improve the accuracy of machine learning models and predictions based on molecular features.
Number of Fingerprints:
Functions
cal_rdkit_descriptor(input_file, output_file, smiles_column)
Description:
This function calculates RDKit molecular descriptors for molecules specified in a CSV file (input_file) using SMILES strings from a specified column (smiles_column). The calculated descriptors are appended as additional columns to the original data and saved in a new CSV file named <input_file_name>_rdkit_descriptor.csv.
Parameters:
input_file(str): Path to the input CSV file containing molecular data in SMILES format.output_file(str): Path where the output CSV file will be saved (optional if using the default naming convention).smiles_column(str): The name of the column in the input CSV file that contains the SMILES strings.
Output:
The output will be saved as a CSV file named <input_file_name>_rdkit_descriptor.csv.
cal_lipinski_descriptors(file_path, smiles_column, verbose=False)
Description:
This function calculates Lipinski descriptors for molecules specified in a CSV file (file_path) using SMILES strings from a specified column (smiles_column). It automatically saves the calculated descriptors to an output file named <input_file_name>_lipinski_descriptors.csv.
Parameters:
file_path(str): Path to the input CSV file containing molecular data in SMILES format.smiles_column(str): The name of the column in the input CSV file that contains the SMILES strings.verbose(bool, optional): IfTrue, the function will print additional processing details. Default isFalse.
Output:
The output will be saved as a CSV file named <input_file_name>_lipinski_descriptors.csv.
cal_morgan_fpts(input_file, smiles_column)
Description:
Calculates Morgan fingerprints for molecules specified in a CSV file (input_file) using SMILES strings from a specified column (smiles_column). The function saves the calculated fingerprints to an output file named <input_file_name>_calculate_morgan_fpts.csv.
Parameters:
input_file(str): Path to the input CSV file containing molecular data in SMILES format.smiles_column(str): The name of the column in the input CSV file that contains the SMILES strings.
Output:
The output will be saved as a CSV file named <input_file_name>_calculate_morgan_fpts.csv.
cal_mordred_descriptors(input_file, smiles_column)
Description:
Computes Mordred descriptors for molecules specified in a CSV file (input_file) using SMILES strings from a specified column (smiles_column). The function saves the computed descriptors to an output file named <input_file_name>_mordred_descriptors.csv.
Parameters:
input_file(str): Path to the input CSV file containing molecular data in SMILES format.smiles_column(str): The name of the column in the input CSV file that contains the SMILES strings.
Output:
The output will be saved as a CSV file named <input_file_name>_mordred_descriptors.csv.
calculate_selected_fingerprints(input_file, smiles_column)
Description:
Before using this function, execute the following code snippet to download and unzip the necessary files:
! wget https://github.com/dataprofessor/padel/raw/main/fingerprints_xml.zip
! unzip fingerprints_xml.zip
## Molecular Fingerprint Calculation
This function calculates 12 different types of molecular fingerprints:
- `AtomPairs2DCount`
- `AtomPairs2D`
- `EState`
- `CDKextended`
- `CDK`
- `CDKgraphonly`
- `KlekotaRothCount`
- `KlekotaRoth`
- `MACCS`
- `PubChem`
- `SubstructureCount`
- `Substructure`
Each enhanced dataset with fingerprints is saved as separate CSV files, appended with the respective fingerprint type name.
### Parameters:
- `input_file` (str): Path to the input CSV file containing molecular data in SMILES format.
- `smiles_column` (str): The name of the column in the input CSV file that contains the SMILES strings.
### Output:
Each fingerprint type will be saved as a separate CSV file with the respective fingerprint type name appended.
For example: `<input_file_name>_AtomPairs2DCount.csv`.
---
## **fps**(filename, smiles_column, fp_type)
**Description:**
This function calculates a specified molecular fingerprint (`fp_type`) for each molecule in a CSV file. The user must provide:
- The CSV file (`filename`)
- The SMILES column name in the file (`smiles_column`)
- One of the following fingerprint types:
- `maccs`
- `avalon`
- `pattern`
- `layered`
- `map4`
- `secfp`
- `erg`
- `estate`
- `avalon-count`
- `ecfp`
- `fcfp`
- `topological`
- `atompair`
- `rdkit`
- `ecfp-count`
- `fcfp-count`
- `topological-count`
- `atompair-count`
- `rdkit-count`
### Parameters:
- `filename` (str): Path to the input CSV file containing molecular data in SMILES format.
- `smiles_column` (str): The name of the column in the input CSV file that contains the SMILES strings.
- `fp_type` (str): The type of molecular fingerprint to calculate (choose from the list of fingerprint types above).
### Output:
The output will be saved as a CSV file named `<input_file_name>_<fp_type>.csv` depending on the fingerprint type chosen.
Ahmed Alhilal
=============
0.0.1 (05/01/2025)
-------------------
- First Release
Metadata
Release files for Chemical-Descriptors 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chemical_descriptors-0.0.1.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Chemical_Descriptors-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / chemical_descriptors-0.0.1.tar.gz
| Download URL | chemical_descriptors-0.0.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74724b9afb9f33566e28f76a38b9bb38be83704446dc73ee823a06e2998507b0
|
|
BLAKE2b-256 checksum How to use checksums |
87f20589fe48d330a62a621344dd074c6c94743937944da92c4c125a3b2b550d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|
Release files / Chemical_Descriptors-0.0.1-py3-none-any.whl
| Download URL | Chemical_Descriptors-0.0.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ee6c8e06212dc31bd8a173df43dd5c64c155c4bd879010055c90b972a931535
|
|
BLAKE2b-256 checksum How to use checksums |
d440f1c1208f40e3ae37d7b5f281a30e58da8f6877c6798d457d6e9ec2451205
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.0
|