Skip to content

Commit

Permalink
fix bug and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TieuLongPhan committed Apr 15, 2024
1 parent c97ec88 commit a72fadc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 37 deletions.
47 changes: 11 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,12 @@ SynRBL is a toolkit tailored for computational chemistry, aimed at correcting im


## Table of Contents
- [Repository Structure](#repository-structure)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgments](#acknowledgments)

## Repository Structure

SynRBL is organized into several key components, each dedicated to a specific aspect of chemical data processing:

### Main Components

- `SynRBL/`: Main package directory
- `SynProcessor/`: Data processing module
- `SynRuleImputer/`: Rule-based imputation module
- `SynMCSImputer/`: MCS-based imputation module
- `SynChemImputer/`: MCS-based imputation module
- `SynVis/`: Data visualization module

### Test Suite

- `tests/`: Test scripts and related files
- `SynProcessor/`: Tests for SynExtract module
- `SynRuleImputer/`: Tests for SynRuleImpute module
- `SynMCSImputer/`: Tests for MCS-based imputation module
- `SynChemImputer/`: Tests for MCS-based imputation module
- `SynVis/`: Tests for SynVis module

### Additional Resources

- `License`: License document
- `README.md`: Overview and documentation
- `setup.py`: Installation
- `.gitignore`: Configuration for ignoring certain files and directories

## Installation

Expand Down Expand Up @@ -77,13 +48,11 @@ To install and set up the SynRBL framework, follow these steps. Please ensure yo
conda activate synrbl-env
```

3. **Cloning and Installing SynRBL:**
3. **Install with pip:**
Clone the SynRBL repository from GitHub and install it:

```bash
git clone https://github.com/TieuLongPhan/SynRBL.git
cd SynRBL
pip install .
pip install synrbl
```

4. **Verify Installation:**
Expand All @@ -94,13 +63,19 @@ To install and set up the SynRBL framework, follow these steps. Please ensure yo
```

## Usage

1. **Jupyter Notebook:**
```python
from synrbl import Balancer
```
2. **Command line**
```bash
python -m synrbl run --help
```


TODO
3. **Reproduce the experiment**
```bash
python -m synrbl run -o validation_results.csv -p 4 ./Data/Validation_set/validation_set.csv
```

## Contributing
- [Tieu-Long Phan](https://tieulongphan.github.io/)
Expand Down
3 changes: 2 additions & 1 deletion synrbl/SynUtils/chem_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import rdkit.Chem.AllChem as AllChem
import rdkit.Chem.rdmolfiles as rdmolfiles


from typing import List, Dict
from typing import Union

Expand Down Expand Up @@ -202,7 +203,7 @@ def _fp(mol1, mol2):
fp2 = ffpgen.GetSparseCountFingerprint(mol2)
sim = DataStructs.DiceSimilarity(fp1, fp2)
else:
raise ArgumentError("'{}' is not a valid similarity method.".format(method))
raise ValueError("'{}' is not a valid similarity method.".format(method))
return sim

exp = normalize_smiles(expected_smiles)
Expand Down
1 change: 1 addition & 0 deletions synrbl/SynVis/rxnpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from reportlab.lib.pagesizes import landscape, letter
from synrbl.SynVis.reaction_visualizer import ReactionVisualizer


def save_reactions_to_pdf(
data: List[Dict[str, str]],
old_reaction_col: str,
Expand Down

0 comments on commit a72fadc

Please sign in to comment.