-
Notifications
You must be signed in to change notification settings - Fork 16
Update README.md #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #162
Changes from 2 commits
5549ef8
352abd2
ac7b1b0
58b77e1
66cc062
3384a8c
cf23cd2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,112 +2,77 @@ | |
| [](https://lomap.readthedocs.io/en/latest/?badge=latest) | ||
| [](https://doi.org/10.5281/zenodo.16898468) | ||
| # Lomap | ||
| Alchemical free energy calculations hold increasing promise | ||
| as an aid to drug discovery efforts. However, applications of | ||
| these techniques in discovery projects have been relatively | ||
| rare, partly because of the difficulty of planning and setting up | ||
| calculations. The lead optimization mapper (LOMAP) was | ||
| introduced as an automated algorithm to plan efficient relative | ||
| free energy calculations between potential ligands within | ||
| a substantial set of compounds. The original LOMAP code was mainly | ||
| based on commercial APIs such as OpenEye and Schrodinger. The aim | ||
| of this project is to develop a new version of LOMAP based on freely | ||
| available APIs such as RDKit offering the scientific community a | ||
| free tool to plan in advance binding free energy calculations. | ||
|
|
||
| ## Prerequisites | ||
| * RDKit Release > 2021 | ||
| * NetworkX | ||
| * Matplotlib | ||
| * python > 3.8 | ||
|
|
||
| Authors | ||
| ------- | ||
|
|
||
| See [AUTHORS.md](https://github.com/OpenFreeEnergy/Lomap/blob/main/AUTHORS.md) | ||
|
|
||
| The Lead Optimization Mapper (LOMAP) is an automated algorithm for planning | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Link to the paper for more details on the method as its missing from the docs landing padge.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this below! |
||
| efficient relative free energy calculation networks across a set of ligands, | ||
| built on freely available tools such as RDKit. | ||
| With the optional [`gufe`](https://github.com/OpenFreeEnergy/gufe) dependency installed, | ||
| it also integrates with the [Open Free Energy](https://openfree.energy) ecosystem. . | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Latest Release | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we just point to the install docs here? It would avoid any issues where we update one but not the other.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pointing to the install docs now! |
||
|
|
||
| You can install using conda (or mamba). Note the package name is `lomap2`: | ||
| `conda install -c conda-forge lomap2` | ||
| From conda-forge (note the package name is `lomap2`): | ||
|
|
||
| ```bash | ||
| conda install -c conda-forge lomap2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think its common for people to use mamba now as well so maybe include that in the readme?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added! |
||
| ``` | ||
|
|
||
| The modern mapping and network API (see below) additionally requires | ||
| [`gufe`](https://github.com/OpenFreeEnergy/gufe): | ||
|
|
||
| ```bash | ||
| conda install -c conda-forge gufe | ||
| ``` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An extra section on the pygraphviz stuff?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this below! |
||
|
|
||
| ### Development Version | ||
| Alternatively, you can install the development version of `lomap` directly from the `main` branch of this repository. | ||
|
|
||
| First install the package dependencies using conda (or mamba) in a virtual environment with: | ||
|
|
||
| ```bash | ||
| conda env create -f environment.yaml | ||
| conda activate lomap-env | ||
| pip install -e . | ||
| ``` | ||
|
|
||
| Then install `lomap` locally with: | ||
|
|
||
| `pip install -e .` | ||
|
|
||
| Usage | ||
| ----- | ||
| As a command line tool, LOMAP can be simply used as: | ||
| ` | ||
| lomap test/basic/ | ||
| ` | ||
| Quickstart | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fine to have, just missing a comment about needing the gufe optional install.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this! |
||
| ---------- | ||
|
|
||
| For a basic example run: | ||
| `python examples/example.py` | ||
|
|
||
| For generating radial graphs with a hub, run: | ||
| `python examples/example_radial.py` | ||
|
|
||
| If you would rather use the API directly, try: | ||
| This example loads two ligands from SDF files and plans a perturbation network between | ||
| them using LOMAP's default mapper and scorer. | ||
|
hannahbaumann marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```python | ||
| import lomap | ||
| import importlib.resources | ||
|
|
||
| # Generate the molecule database starting from a directory containing .mol2 files | ||
|
|
||
| db_mol = lomap.DBMolecules("python string pointing to a directory with mol2 files", output=True) | ||
|
|
||
| #More graphing options: | ||
| # Use the complete radial graph option. The ligand with the most structural similarity to all of the others will be picked as the 'lead compound' and used as the central compound. | ||
| db_mol = lomap.DBMolecules("python string pointing to a directory with mol2 files", output=True, radial=True) | ||
|
|
||
| # Use a radial graph with a manually specified hub compound | ||
| db_mol = lomap.DBMolecules("python string pointing to a directory with mol2 files", output=True, radial=True, hub=filename.mol2) | ||
|
|
||
| # Use a radial graph with a manually specified hub compound and fast graphing option | ||
| #the fast graphing option creates the initial graph by connecting the hub ligand with the possible surrounding ligands and adds surrounding edges based on the similarities across surrounding nodes | ||
| db_mol = lomap.DBMolecules("python string pointing to a directory with mol2 files", output=True, radial=True, hub=filename.mol2, fast=True) | ||
|
|
||
| # Calculate the similarity matrix between the database molecules. Two molecules are generated | ||
| # related to the strict rule and loose rule | ||
|
|
||
| strict, loose = db_mol.build_matrices() | ||
|
|
||
| # Generate the NetworkX graph and output the results | ||
| nx_graph = db_mol.build_graph() | ||
|
|
||
|
|
||
| # Calculate the Maximum Common Subgraph (MCS) between | ||
| # the first two molecules in the molecule database | ||
| # ignoring hydrogens and depicting the mapping in a file | ||
|
|
||
| MC = lomap.MCS.getMapping(db_mol[0].getMolecule(), db_mol[1].getMolecule(), hydrogens=False, fname='mcs.png') | ||
| import lomap | ||
| from gufe import SmallMoleculeComponent | ||
|
|
||
| # Two example ligands ship with the package under lomap.tests.data | ||
| data = importlib.resources.files("lomap.tests.data") | ||
| ligands = [ | ||
| SmallMoleculeComponent.from_sdf_file(data / name) | ||
| for name in ["lig_41.sdf", "lig_74.sdf"] | ||
| ] | ||
|
|
||
| # Build a LigandNetwork using LOMAP's scoring and network-construction rules | ||
| network = lomap.generate_lomap_network( | ||
| ligands=ligands, | ||
| mappers=lomap.LomapAtomMapper(), | ||
| scorer=lomap.default_lomap_score, | ||
| ) | ||
| print(f"{len(network.nodes)} ligands, {len(network.edges)} edges") | ||
| ``` | ||
|
|
||
| ## Deprecated APIs | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't something folks usually do. I would say it's best not to include this section.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed this! |
||
|
|
||
| # Alchemical transformation are usually performed between molecules with | ||
| # the same charges. However, it is possible to allow this transformation | ||
| # manually setting the electrostatic score for the whole set of molecules | ||
| # producing a connected graph. The electrostatic score must be in the | ||
| # range [0,1] | ||
| The legacy `DBMolecules` API and CLI are deprecated | ||
| and will be removed in the next major release; new code should use | ||
| `generate_lomap_network` instead. See | ||
| [issue #138](https://github.com/OpenFreeEnergy/Lomap/issues/138) and the | ||
| [legacy documentation](https://lomap.readthedocs.io/en/latest/legacy.html). | ||
|
|
||
| ## Authors | ||
|
|
||
| db_mol = lomap.DBMolecules("python string pointing to a directory with mol2 files", output=True, ecrscore=0.1) | ||
| strict, loose = db_mol.build_matrices() | ||
| nx_graph = db_mol.build_graph() | ||
| ``` | ||
| See [AUTHORS.md](https://github.com/OpenFreeEnergy/Lomap/blob/main/AUTHORS.md). | ||
|
|
||
| ## History | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the pointer to the newest version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this!