Metadata-Version: 2.4
Name: cellppdmod2
Version: 2.0.0
Summary: Prediction and design of cell-penetrating peptides containing natural, chemically modified and non-natural residues
Author-email: "Raghava's Group, Department of Computational Biology, IIIT-Delhi" <raghava@iiitd.ac.in>
Maintainer-email: "Gajendra P. S. Raghava" <raghava@iiitd.ac.in>
License: CellPPD-MOD 2.0
        Copyright (c) 2026 Raghava's Group, Department of Computational Biology,
        Indraprastha Institute of Information Technology (IIIT-Delhi), New Delhi, India.
        All rights reserved.
        
        ACADEMIC AND NON-COMMERCIAL RESEARCH USE LICENCE
        
        Permission is hereby granted, free of charge, to any person or institution
        obtaining a copy of this software and its associated data files (the
        "Software") to use, copy and modify the Software for academic teaching and
        non-commercial research purposes, subject to the following conditions:
        
        1. The above copyright notice and this permission notice shall be included
           in all copies or substantial portions of the Software.
        
        2. Any publication, presentation or other work that makes use of the Software
           shall cite the CellPPD-MOD 2.0 paper and the CellPPD-MOD 2.0 web server at
           https://webs.iiitd.edu.in/raghava/cellppdmod2/
        
        3. Use of the Software for commercial purposes, including incorporation into
           a commercial product or service, or use in work performed for commercial
           gain, requires a separate written agreement. Contact raghava@iiitd.ac.in
        
        4. Redistribution of the Software, modified or unmodified, must retain this
           notice and must not imply endorsement by Raghava's Group or IIIT-Delhi.
        
        5. The Software bundles third-party components that are distributed under
           their own licences. See THIRD-PARTY-NOTICES.md. Nothing in this licence
           restricts rights granted to you under those licences.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        Predictions produced by the Software are computational estimates intended to
        prioritise candidates for experimental testing. They are not a substitute for
        an uptake assay, and the Software is not intended for diagnostic or
        therapeutic use.
        
Project-URL: Homepage, https://webs.iiitd.edu.in/raghava/cellppdmod2/
Project-URL: Documentation, https://webs.iiitd.edu.in/raghava/cellppdmod2/help.html
Project-URL: Download, https://webs.iiitd.edu.in/raghava/cellppdmod2/download.html
Project-URL: Source, https://github.com/raghavagps/cellppdmod2
Project-URL: Bug Tracker, https://github.com/raghavagps/cellppdmod2/issues
Project-URL: Research Group, https://webs.iiitd.edu.in/raghava/
Keywords: cell-penetrating peptide,CPP,peptide,modified peptide,non-natural amino acid,drug delivery,bioinformatics,machine learning,cheminformatics
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: joblib>=1.3
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Requires-Dist: scikit-learn>=1.6
Provides-Extra: chem
Requires-Dist: xgboost>=2.0; extra == "chem"
Provides-Extra: all
Requires-Dist: xgboost>=2.0; extra == "all"
Provides-Extra: dev
Requires-Dist: xgboost>=2.0; extra == "dev"
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4.0; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Dynamic: license-file

# CellPPD-MOD 2.0

Prediction and design of cell-penetrating peptides built from natural,
chemically modified and non-natural amino acid residues.

Cell-penetrating peptides (CPPs) carry cargo across the plasma membrane and are
widely used to deliver drugs, nucleic acids and imaging agents. Most CPPs used
in practice are not purely natural peptides: they carry terminal modifications,
cyclisation, D-amino acids or non-natural residues that a model trained only on
the twenty standard amino acids cannot see. CellPPD-MOD 2.0 is built for those
peptides, and takes them in whichever form you already have — a sequence, a
SMILES string, or a tertiary structure.

Developed by [Raghava's Group](https://webs.iiitd.edu.in/raghava/), Department
of Computational Biology, IIIT-Delhi. Web server:
<https://webs.iiitd.edu.in/raghava/cellppdmod2/>

---

## Modules

| Module | Input | Model | Needs |
| --- | --- | --- | --- |
| `sequence` | peptides in MAP notation or plain one-letter code | Extra Trees over 407 sequence features | nothing beyond pip |
| `chemical` | SMILES | XGBoost over selected PaDEL fingerprints | Java + PaDEL |
| `structure` | PDB / ENT | XGBoost over selected PaDEL fingerprints | Java + PaDEL + Open Babel |
| `design` | one natural peptide | the sequence model | nothing beyond pip |

The sequence and design modules work straight after `pip install`, because the
trained models travel inside the wheel. The chemical and structure modules call
out to PaDEL-Descriptor, which is Java software kept in the `padel/` directory
of this repository rather than inside the wheel.

---

## Install

```bash
pip install cellppdmod2                  # sequence + design
pip install "cellppdmod2[chem]"          # adds xgboost for chemical + structure
```

From a checkout:

```bash
git clone https://github.com/raghavagps/cellppdmod2.git
cd cellppdmod2
pip install -e ".[dev]"
```

Check what the package has found:

```bash
cellppdmod2 info
```

### Extra tools for the chemical and structure modules

* **Java 8 or newer** — runs PaDEL-Descriptor. `java -version` should answer.
* **PaDEL-Descriptor** — ships in `padel/` in this repository. Point to it with
  `--padel-jar`, or set `CELLPPDMOD2_PADEL_JAR` once:

  ```bash
  export CELLPPDMOD2_PADEL_JAR=/path/to/cellppdmod2/padel/PaDEL-Descriptor.jar
  ```

  The descriptor-type configuration the models were trained with travels
  inside the wheel and is passed to PaDEL automatically. It matters: PaDEL's
  bare `-fingerprints` flag computes a much smaller default set, in which 358
  of the 427 selected features never appear, so prediction fails outright
  rather than merely drifting. Override it with `--descriptortypes` only to
  reproduce a different training set-up.

* **Open Babel** — converts PDB to SDF for the structure module:

  ```bash
  conda install -c conda-forge openbabel     # or: apt install openbabel
  ```

---

## Command line

### Sequence prediction

```bash
# peptides on the command line
cellppdmod2 sequence -s GRKKRRQRRRPPQ RKKWFW -o out.csv

# MAP notation: modifications in curly braces, inside the sequence
cellppdmod2 sequence -s "{nt:Acetyl}GRKK{nnr:Aib}RRQRRR{ct:Amide}" -o out.csv

# a file of peptides, one per line
cellppdmod2 sequence -i examples/peptides_map.txt -o out.csv

# plain sequences whose modifications are not written as tags
cellppdmod2 sequence -i peptides.txt -m nt,ct,cyc -o out.csv

# a stricter cut-off than the model default of 0.54
cellppdmod2 sequence -i peptides.txt -t 0.7 -o out.csv
```

### Chemical structure prediction

```bash
cellppdmod2 chemical -i examples/molecules.smi -o chemical.csv \
    --padel-jar padel/PaDEL-Descriptor.jar
```

### Tertiary structure prediction

```bash
cellppdmod2 structure -i examples/peptide.pdb -o structure.csv \
    --padel-jar padel/PaDEL-Descriptor.jar
```

### Design

```bash
# every single-amino-acid substitution: 19 x L + 1 candidates, ranked
cellppdmod2 design -s GRKKRRQRRRPPQ --mode seq -o design_seq.csv

# all 64 combinations of the six modification flags, baseline first
cellppdmod2 design -s GRKKRRQRRRPPQ --mode mod -o design_mod.csv
```

Each subcommand is also installed under its own name — `cellppdmod2-sequence`,
`cellppdmod2-chemical`, `cellppdmod2-structure`, `cellppdmod2-design` — so
scripts written against the original standalone archive keep working.

Run `cellppdmod2 <command> --help` for the full option list.

---

## Python API

```python
from cellppdmod2 import predict_sequences, design

results = predict_sequences([
    "GRKKRRQRRRPPQ",
    "{nt:Acetyl}GRKK{nnr:Aib}RRQRRR{ct:Amide}",
    "R{d}R{d}R{d}R{d}R{d}R{d}R{d}",
])
print(results[["Sequence", "CPP_score", "Prediction"]])

# rank substitutions of one peptide
analogues = design("GRKKRRQRRRPPQ", mode="seq")
print(analogues.head())
```

Loading the model once and reusing it is worthwhile for large batches:

```python
from cellppdmod2 import load_bundle, predict_sequences
from cellppdmod2.paths import SEQUENCE_MODEL

bundle = load_bundle(SEQUENCE_MODEL)
for chunk in chunks:
    predict_sequences(chunk, model=bundle)
```

SMILES and structures work the same way:

```python
from cellppdmod2 import predict_smiles, predict_structures

predict_smiles(["CSCC[C@H](N)C(=O)N..."], padel_jar="padel/PaDEL-Descriptor.jar")
predict_structures("examples/peptide.pdb", padel_jar="padel/PaDEL-Descriptor.jar")
```

---

## Input formats

### MAP notation

A modified peptide is written as a normal one-letter sequence with the
modification annotation in curly braces, placed where it occurs:

```
GRKK{ptm:ORN}RRQRRR
{nt:Acetyl}GRKKRRQRRR{ct:Amide}
KLLK{nnr:Ahx}LLK
R{d}R{d}R{d}R{d}R{d}R{d}R{d}
```

| Tag | Flag | Describes |
| --- | --- | --- |
| `{nt:…}` | NT | N-terminal modification |
| `{ct:…}` | CT | C-terminal modification |
| `{ptm:…}` | PTM | post-translational modification |
| `{nnr:…}` | NNR | non-natural residue |
| `{cyc:…}` | CYC | cyclisation |
| `{d}` or `{d:…}` | D | D-amino acid |

A tag sets its category flag. The value after the colon documents the chemistry
for the reader and for the result table; the model reads the category, the
dipeptide composition and the peptide length. Braces are removed before the
composition is counted, so a non-natural residue's two neighbours become an
adjacent pair.

Where a modification sits in the sequence is not a separate feature, so two
peptides differing only in the position of the same modification receive the
same sequence-based score. Use the chemical or structure module when position
is the question.

### Plain sequences

One peptide per line, using the twenty standard amino acids, with no FASTA
header lines. Modifications that cannot be written as tags are passed with
`-m/--modifications`, which applies them to every peptide in the run.

### SMILES and PDB

One SMILES per line, optionally followed by whitespace and a name; or a CSV
with a `SMILES` column. Structures are `.pdb` or `.ent` files, singly or as a
directory.

---

## Output

Every module writes a CSV with the same core columns:

| Column | Meaning |
| --- | --- |
| `CPP_score` | probability that the peptide is cell-penetrating, 0 to 1 |
| `Threshold` | cut-off applied to the score |
| `Predicted_label` | 1 at or above the threshold, 0 below |
| `Prediction` | `CPP` or `Non-CPP` |

The sequence module adds the input, the cleaned sequence, its length and the
active modification categories; the design module adds the candidate, the
change that produced it and a rank. Scores are comparable within one module but
not across modules, because the three models read different features.

Raising the threshold makes the prediction stricter: fewer peptides are called
CPPs, but each call is made with more confidence. The score itself does not
change, only the label, so the same CSV can be re-read against another cut-off.

---

## What the models read

**Sequence model** — Extra Trees, threshold 0.54, 407 features: 400 normalised
dipeptide frequencies (`AA` to `YY`), six binary modification flags (NT, CT,
PTM, NNR, CYC, D) and the cleaned peptide length.

**Chemical and structure models** — XGBoost over the PaDEL fingerprint bits
selected during training, listed in `src/cellppdmod2/data/chemical_features.csv`
and `structure_features.csv`.

Cargo, concentration, cell line, incubation time, serum conditions and assay
type all affect measured uptake, and none of them is an input. Treat a score as
a way to prioritise candidates, not as a substitute for an uptake assay.

---

## Repository layout

```
cellppdmod2/
├── src/cellppdmod2/        package source
│   ├── cli.py              command-line interface
│   ├── sequence.py         sequence-based prediction
│   ├── chemical.py         SMILES -> PaDEL -> prediction
│   ├── structure.py        PDB -> Open Babel -> PaDEL -> prediction
│   ├── design.py           substitution and modification design
│   ├── encoders.py         MAP parsing and the 407 sequence features
│   ├── core.py             model loading and scoring
│   ├── padel.py            PaDEL-Descriptor runner
│   ├── paths.py            where models and tools are found
│   └── data/               trained models and selected-feature lists
├── padel/                  PaDEL-Descriptor and its Java libraries (LGPL)
├── examples/               example peptides, SMILES and a PDB structure
└── tests/                  test suite
```

---

## Development

```bash
pip install -e ".[dev]"
pytest -q
ruff check .
python -m build          # builds the sdist and wheel into dist/
```

---

## Citing

The manuscript describing CellPPD-MOD 2.0 is under preparation. Citation
details and the DOI will be added here once it is published; until then, please
refer to the server by name and URL.

Related resources from our group: [CellPPD](https://webs.iiitd.edu.in/raghava/cellppd/),
[CPPsite 2.0](https://webs.iiitd.edu.in/raghava/cppsite/),
[PEPstrMOD](https://webs.iiitd.edu.in/raghava/pepstrmod/),
[SATPdb](https://webs.iiitd.edu.in/raghava/satpdb/).

---

## Licence

Free for academic and non-commercial research use. See [LICENSE](LICENSE), and
[THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md) for PaDEL-Descriptor and the
CDK, which carry their own licences.

## Contact

Prof. Gajendra P. S. Raghava — raghava@iiitd.ac.in
Department of Computational Biology, IIIT-Delhi, New Delhi 110020, India
