A package for converting peptide FASTA to SMILES strings and calculating molecular properties.
Project description
p2smi: Peptide FASTA-to-SMILES Conversion and Molecular Property Tools
p2smi is a Python package for generating and modifying peptide SMILES strings from FASTA input and computing molecular properties. It supports cyclic and linear peptides, noncanonical amino acids, and common chemical modifications (e.g., N-methylation, PEGylation).
This package was released in its current form to support work on the PeptideCLM model, described in our Publication.
If you use this tool, please cite the PeptideCLM paper. A JOSS publication is forthcoming.
Manuscript
Directory
Features
- Convert peptide FASTA files into valid SMILES strings
- Automatically handle peptide cyclizations (disulfide, head-to-tail, side-chain to N-term, side-chain to C-term, side-chain to side-chain)
- Modify peptide SMILES with customizable N-methylation and PEGylation
- Evaluate synthesis feasibility with defined synthesis rules
- Compute molecular properties: logP, TPSA, molecular formula, and Lipinski rule evaluation
Installation
pip install p2smi
For development:
git clone <your-repo-url>
cd p2smi
pip install -e .[dev]
Command-Line Tools
| Command | Description |
|---|---|
generate-peptides |
Generate random peptide sequences based on user-defined constraints and modifications |
fasta2smi |
Convert a FASTA file of peptide sequences into SMILES format |
modify-smiles |
Apply modifications (N-methylation, PEGylation) to existing SMILES strings |
smiles-props |
Compute molecular properties (logP, TPSA, formula, Lipinski rules) from SMILES |
synthesis-check |
Check synthesis constraints for peptides (currently only functional for natural amino acids) |
Run each command with
--helpto view usage and options:
generate-peptides --help
fasta2smi --help
modify-smiles --help
smiles-props --help
synthesis-check --help
Example Usage
Convert a FASTA file to SMILES:
fasta2smi -i peptides.fasta -o output.smi
Modify existing SMILES strings (N-methylation/PEGylation):
modify-smiles -i input.smi -o modified.smi --peg_rate 0.3 --nmeth_rate 0.2 --nmeth_residues 0.25
Compute properties of a SMILES string:
smiles-props "C1CC(NC(=O)C2CC2)C1"
Future Work
- Expand support for additional post-translational modifications
- Enhance synthesis-check with rules for noncanonical amino acid and modified peptides
License
MIT License
Citation
If you use this tool, please cite:
- Peptide-Aware Chemical Language Model Successfully Predicts Membrane Diffusion of Cyclic Peptides (JCIM)
A JOSS paper will follow.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file p2smi-0.1.0.tar.gz.
File metadata
- Download URL: p2smi-0.1.0.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff2a9eb1bf2c6767f8e26fca4ea81649cd14dad226d0d858e886f3c71b9886a4
|
|
| MD5 |
d07065c7b68055d6aa42f5ce99c3d924
|
|
| BLAKE2b-256 |
2f41ae3b91d3b461f115ed0a9e46b97add1892a01bce348df89595d619fae3e3
|
File details
Details for the file p2smi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: p2smi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
148b1da4429dd7e80310db98367df65026d42cb0623fd887293bcfcf81a4d7de
|
|
| MD5 |
bebc5073c338706ad9c55c4b213de25d
|
|
| BLAKE2b-256 |
e4fd8963484fe4b5938f33238d974010f193e002666c21ccf288604bc2f2dd77
|