Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
ale94mleon committed Jun 13, 2024
1 parent 11d8cc3 commit 8f56c72
Show file tree
Hide file tree
Showing 35 changed files with 3,870 additions and 2,783 deletions.
2 changes: 1 addition & 1 deletion .conda-noarch/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ about:
license: {{ data['license'] }}
dev_url: {{ data['url'] }}
doc_url: {{ data['project_urls']['Documentation'] }}
doc_source_url: https://github.com/ale94mleon/MolDrug/tree/main/docs/source
doc_source_url: https://github.com/ale94mleon/moldrug/tree/main/docs/source
summary: {{ data['description'] }}

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ __pycache__
.ipynb_checkpoints
jupyter_execute
error
*.costfunc_MolDrug*
*.costfunc_moldrug*
.coverage*
coverage.xml
interesting_struct.txt
Expand Down
12 changes: 7 additions & 5 deletions Contrib/MolSkill/fitness_molskill.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from moldrug import utils
from moldrug.fitness import _vinadock
from rdkit import Chem
from typing import Dict, List
from rdkit import RDLogger

from molskill.scorer import MolSkillScorer
from rdkit import Chem, RDLogger

from moldrug import utils
from moldrug.fitness import _vinadock

RDLogger.DisableLog('rdApp.*')


Expand Down Expand Up @@ -74,7 +76,7 @@ def Cost(
constraint_receptor_pdb_path : str, optional
The same as constraint_receptor_pdbqt_path but in pdb format, by default None
constraint_num_conf : int, optional
Maximum number of conformer to be generated internally by MolDrug , by default 100
Maximum number of conformer to be generated internally by moldrug , by default 100
constraint_minimum_conf_rms : int, optional
RMS to filter duplicate conformers, by default 0.01
desirability : dict, optional
Expand Down
6 changes: 3 additions & 3 deletions Contrib/using_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Install dependencies:
pip install sklearn
```

The other dependencies are already inside **MolDrug**. You must have in the same folder the scripts: `train_models.py`, `featurize.py` and then just:
The other dependencies are already inside **moldrug**. You must have in the same folder the scripts: `train_models.py`, `featurize.py` and then just:

```bash
python train_models.py
Expand All @@ -32,9 +32,9 @@ Here is a detailed list of public databases to construct ADME models: [adme](htt

## EGFR data set

This data was retrieved using this [EGFR-kinase tutorial](https://projects.volkamerlab.org/teachopencadd/talktorials/T001_query_chembl.html#Get-target-data-(EGFR-kinase)). The mentioned tutorial should encourage the user to retrieve data for proteins for which the 3D structure is not available and use ML/AI methods like the ones presented in this example and design molecules with MolDrug using those models as fitness functions.
This data was retrieved using this [EGFR-kinase tutorial](https://projects.volkamerlab.org/teachopencadd/talktorials/T001_query_chembl.html#Get-target-data-(EGFR-kinase)). The mentioned tutorial should encourage the user to retrieve data for proteins for which the 3D structure is not available and use ML/AI methods like the ones presented in this example and design molecules with moldrug using those models as fitness functions.

## Run MolDrug from the command line
## Run moldrug from the command line

```bash
moldrug config.yml --fitness /the/path/for/fitness_plus_admes.py
Expand Down
19 changes: 10 additions & 9 deletions Contrib/using_models/fitness_plus_models.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from moldrug import utils
from moldrug.fitness import _vinadock
from rdkit import Chem
import numpy as np
from copy import deepcopy
from typing import Dict, List

import joblib
from rdkit.Chem import AllChem
from rdkit.Chem import Descriptors
from rdkit import RDLogger
from copy import deepcopy
import numpy as np
from rdkit import Chem, RDLogger
from rdkit.Chem import AllChem, Descriptors

from moldrug import utils
from moldrug.fitness import _vinadock

RDLogger.DisableLog('rdApp.*')


Expand Down Expand Up @@ -182,7 +183,7 @@ def Cost(
constraint_receptor_pdb_path : str, optional
The same as constraint_receptor_pdbqt_path but in pdb format, by default None
constraint_num_conf : int, optional
Maximum number of conformer to be generated internally by MolDrug , by default 100
Maximum number of conformer to be generated internally by moldrug , by default 100
constraint_minimum_conf_rms : int, optional
RMS to filter duplicate conformers, by default 0.01
models : dict = None,
Expand Down
18 changes: 10 additions & 8 deletions Contrib/using_models/train_models.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import os
import urllib.request
from io import StringIO
import pandas as pd
from scipy.stats import pearsonr
from urllib.parse import urlparse

import joblib
import numpy as np
import pandas as pd
from featurize import Featurizer
from rdkit import Chem
from scipy.stats import pearsonr
from sklearn.ensemble import RandomForestRegressor
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from featurize import Featurizer
import joblib
from urllib.parse import urlparse
import os
from sklearn.preprocessing import StandardScaler


def is_url(string:str) -> bool:
"""Check if the string is a valid URL
Expand Down Expand Up @@ -85,7 +87,7 @@ def prepare_model(name, source, y_transform = None, scaler = None):
y_pred = model.predict(X_te)
print("Pearson Correlation: {:.3f}".format(pearsonr(y_pred, y_te)[0]))

# Change n_jobs to 1 in order to avoid warnings during MolDrug run.
# Change n_jobs to 1 in order to avoid warnings during moldrug run.
model.n_jobs = 1

joblib.dump(
Expand Down
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MolDrug
moldrug
=======

|logo|
Expand Down Expand Up @@ -29,13 +29,13 @@ MolDrug
Description
-----------

**MolDrug** is a Python package for drug-oriented optimization in the chemical space. It uses a Genetic Algorithm (GA) as a search engine in the chemical space and
**moldrug** is a Python package for drug-oriented optimization in the chemical space. It uses a Genetic Algorithm (GA) as a search engine in the chemical space and
`CReM <https://github.com/DrrDom/crem>`__ library as chemical structure generator.


You can try it out before any installation on `Binder <https://mybinder.org/v2/gh/ale94mleon/moldrug/HEAD?labpath=%2Fdocs%2Fnotebooks%2F>`__.

You can use `MolDrug-Dashboard <https://moldrug-dashboard.streamlit.app/>`__ to process the results.
You can use `moldrug-Dashboard <https://moldrug-dashboard.streamlit.app/>`__ to process the results.

Documentation
-------------
Expand All @@ -50,9 +50,9 @@ If you have found a bug, please open an issue on the `GitHub Issues <https://git
Discussion
----------

If you have questions on how to use **MolDrug**, or if you want to give feedback or share ideas and new features, please head to the `GitHub Discussions <https://github.com/ale94mleon/moldrug/discussions>`_.
If you have questions on how to use **moldrug**, or if you want to give feedback or share ideas and new features, please head to the `GitHub Discussions <https://github.com/ale94mleon/moldrug/discussions>`_.

Citing **MolDrug**
Citing **moldrug**
------------------

Please refer to the `citation page <https://moldrug.readthedocs.io/en/latest/source/citations.html>`__ on the documentation.
Expand All @@ -65,7 +65,7 @@ This project received funding from `Marie Skłodowska-Curie Actions <https://cor
with the pharmaceutical company `Boehringer Ingelheim <https://www.boehringer-ingelheim.com/de/>`__.


.. |logo| image:: https://github.com/ale94mleon/MolDrug/blob/main/docs/source/_static/MolDrug-logo-full.svg?raw=true
.. |logo| image:: https://github.com/ale94mleon/moldrug/blob/main/docs/source/_static/moldrug-logo-full.svg?raw=true
:target: https://github.com/ale94mleon/moldrug/
:alt: logo
.. |docs| image:: https://readthedocs.org/projects/moldrug/badge/?version=latest
Expand All @@ -74,17 +74,17 @@ with the pharmaceutical company `Boehringer Ingelheim <https://www.boehringer-in
.. |binder| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/ale94mleon/moldrug/HEAD?labpath=%2Fdocs%2Fnotebooks%2F
:alt: binder
.. |tests| image:: https://github.com/ale94mleon/MolDrug/actions/workflows/tests.yml/badge.svg
:target: https://github.com/ale94mleon/MolDrug/actions/workflows/tests.yml
.. |tests| image:: https://github.com/ale94mleon/moldrug/actions/workflows/tests.yml/badge.svg
:target: https://github.com/ale94mleon/moldrug/actions/workflows/tests.yml
:alt: tests
.. |codacy-codecove| image:: https://app.codacy.com/project/badge/Coverage/08a3ac7c13df4339b8a1da0e8d31810e
:target: https://app.codacy.com/gh/ale94mleon/MolDrug/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage
:target: https://app.codacy.com/gh/ale94mleon/moldrug/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage
:alt: codacy-codecove
.. |codacy-grade| image:: https://app.codacy.com/project/badge/Grade/08a3ac7c13df4339b8a1da0e8d31810e
:target: https://app.codacy.com/gh/ale94mleon/MolDrug/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
:target: https://app.codacy.com/gh/ale94mleon/moldrug/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
:alt: codacy-grade
.. |CodeQL| image:: https://github.com/ale94mleon/MolDrug/actions/workflows/codeql-analysis.yml/badge.svg
:target: https://github.com/ale94mleon/MolDrug/actions/workflows/codeql-analysis.yml
.. |CodeQL| image:: https://github.com/ale94mleon/moldrug/actions/workflows/codeql-analysis.yml/badge.svg
:target: https://github.com/ale94mleon/moldrug/actions/workflows/codeql-analysis.yml
:alt: CodeQL
.. |pypi-version| image:: https://img.shields.io/pypi/v/moldrug.svg
:target: https://pypi.python.org/pypi/moldrug/
Expand Down
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ about:
license: {{ data['license'] }}
dev_url: {{ data['url'] }}
doc_url: {{ data['project_urls']['Documentation'] }}
doc_source_url: https://github.com/ale94mleon/MolDrug/tree/main/docs/source
doc_source_url: https://github.com/ale94mleon/moldrug/tree/main/docs/source
summary: {{ data['description'] }}

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# -- Project information -----------------------------------------------------

project = 'MolDrug'
project = 'moldrug'
copyright = f"2022-{datetime.now().year}, Alejandro Martínez León"
author = 'Alejandro Martínez León'

Expand Down Expand Up @@ -110,7 +110,7 @@
}
],
}
html_logo = "source/_static/MolDrug-logo.svg"
html_logo = "source/_static/moldrug-logo.svg"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
5,100 changes: 2,996 additions & 2,104 deletions docs/notebooks/advance_topics.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 8f56c72

Please sign in to comment.