Sovereign 8s.is mirror of standardgalactic/legion-scaffold-decorator
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| img | ||
| input | ||
| requirements | ||
| src | ||
| test | ||
| .flake8 | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
Scaffold Decorator for the LEGION Workflow
A Python package for generating molecules by combining molecular scaffolds with decorations.
The code and data to reproduce combinatorial generation of molecular structures from LEGION workflow.
🎯 Quick Start
Installation
# Create and activate environment
conda create -n scaffold_decorator python=3.9.18
conda activate scaffold_decorator
# Install RDKit
conda install -c conda-forge rdkit
# Install package and dependecies
pip install -e .
📁 Input files
All required input data are available in the input/ derictory:
- unique_scaffolds.csv
- unique_left_decorations.csv
- unique_right_decorations.csv
🎲 Decorate scaffolds
# Random generation - N random molecules
generate-random -n 100
# Systematic generation - all combinations with sampling of 64 decorations in every position
generate
⚙️ Custom options
# Random generation with custom parameters
generate-random \
--scaffolds-csv <path to scaffolds csv> \
--left-decorations-csv <path to left decorations csv> \
--right-decorations-csv <path to right decorations csv> \
--n-molecules 100 \
--output <path to output csv> \
--no-randomize-scaffolds \
--no-randomize-decorations
# Systematic generation with custom parameters
generate \
--scaffolds-csv <path to scaffolds csv> \
--left-decorations-csv <path to left decorations csv> \
--right-decorations-csv <path to right decorations csv> \
--output-dir <path to output directory> \
--decorations-sample-size 10 \
--save-every 1 \
--no-shuffle
📋 Parameters
Random Generation (generate_random.py)
| Parameter | Description | Default |
|---|---|---|
--scaffolds-csv |
CSV file with scaffolds | /input/unique_scaffolds.csv |
--left-decorations-csv |
CSV file with left decorations | /input/unique_left_decorations.csv |
--right-decorations-csv |
CSV file with right decorations | /input/unique_right_decorations.csv |
-n, --n-molecules |
Number of molecules to generate | required |
--output |
Output CSV file | output/random_molecules.csv |
--no-randomize-scaffolds |
Use scaffolds systematically | False |
--no-randomize-decorations |
Use decorations systematically | False |
Systematic Generation (generate.py)
| Parameter | Description | Default |
|---|---|---|
--scaffolds-csv |
CSV file with scaffolds | /input/unique_scaffolds.csv |
--left-decorations-csv |
CSV file with left decorations | /input/unique_left_decorations.csv |
--right-decorations-csv |
CSV file with right decorations | /input/unique_right_decorations.csv |
--output-dir |
Output directory | /output |
--decorations-sample-size |
Number of decorations to sample | 64 |
--save-every |
Save results every N scaffolds | 10 |
--no-shuffle |
Don't shuffle scaffolds | False |
📋 Data Format
Input CSV files must contain a smiles column:
smiles
c1ccc([*:1])cc1
[*:1]c1ccc([*:2])cc1
Output CSV files contains:
smiles,scaffold,left_decoration,right_decoration
Cc1ccccc1O,c1ccc([*:1])cc1,[*:1]C,[*:2]O
License:
This project is licensed under the MIT License - see the LICENSE file for details.