diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 9545b82..507b997 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -51,7 +51,7 @@ jobs: - uses: mamba-org/setup-micromamba@v1 if: ${{ matrix.rdkit-version != 'latest' }} with: - environment-file: devtools/conda-envs/CI_env.yaml + environment-file: environment.yaml cache-environment: true cache-downloads: true cache-environment-key: environment-${{ steps.date.outputs.date }} @@ -64,7 +64,7 @@ jobs: - uses: mamba-org/setup-micromamba@v1 if: ${{ matrix.rdkit-version == 'latest' }} with: - environment-file: devtools/conda-envs/CI_env.yaml + environment-file: environment.yaml cache-environment: true cache-downloads: true cache-environment-key: environment-${{ steps.date.outputs.date }} diff --git a/README.md b/README.md index c629369..655004e 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,23 @@ [![Documentation Status](https://readthedocs.org/projects/lomap/badge/?version=latest)](https://lomap.readthedocs.io/en/latest/?badge=latest) # 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 +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 of compounds. The original LOMAP code was mainly -based on commercial APIs such as OpenEye and Schrodinger. The aim +based on commercial APIs such as OpenEye and Schrodinger. The aim of this project is to develop a new version of LOMAP based on free -avalaible APIs such as RDKit offering the scientific community a +avalaible 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 +* Matplotlib * python > 3.8 Authors @@ -29,16 +29,28 @@ See [AUTHORS.md](https://github.com/OpenFreeEnergy/Lomap/blob/main/AUTHORS.md) ## Installation +### Latest Release + +You can install using conda (or mamba). Note the package name is `lomap2`: `conda install -c conda-forge lomap2` -Alternatively, you can install the prerequisites and then install from source -with: +### 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 +``` + +Then install `lomap` locally with: -`python setup.py install` +`pip install -e .` Usage ----- -As a commandline tool LOMAP can be simply used as: +As a command line tool, LOMAP can be simply used as: ` lomap test/basic/ ` @@ -70,31 +82,31 @@ db_mol = lomap.DBMolecules("python string pointing to a directory with mol2 file 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 betweeen the database molecules. Two molecules are generated -# related to the scrict rule and loose rule +# related to the scrict rule and loose rule strict, loose = db_mol.build_matrices() # Generate the NetworkX graph and output the results -nx_graph = db_mol.build_graph() +nx_graph = db_mol.build_graph() -# Calculate the Maximum Common Subgraph (MCS) between -# the first two molecules in the molecule database +# 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') # 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 scrore must be in the +# manually setting the electrostatic score for the whole set of molecules +# producing a connected graph. The electrostatic scrore must be in the # range [0,1] 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() +nx_graph = db_mol.build_graph() ``` ## History diff --git a/docs/index.rst b/docs/index.rst index 4a09147..5999831 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,12 +6,13 @@ Welcome to Lomap's documentation! ================================= -Lomap (Lead Optimisation Mapper) is a tool for planning perturbation networks for free energy calculations. +Lomap (Lead Optimization Mapper) is a tool for planning perturbation networks for free energy calculations. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Contents: + installation.rst api.rst legacy.rst citing.rst @@ -23,4 +24,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` -* :ref:`search` diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..dd572e8 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,26 @@ +Installation +============ + +Latest Release +-------------- + +You can install lomap using conda (or mamba). Note the package name is ``lomap2``: + +.. parsed-literal:: + conda install -c conda-forge lomap2 + +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: + +.. parsed-literal:: + conda env create -f environment.yaml + conda activate lomap-env + + +Then install ``lomap`` locally with: + +.. parsed-literal:: + pip install -e . diff --git a/devtools/conda-envs/CI_env.yaml b/environment.yaml similarity index 89% rename from devtools/conda-envs/CI_env.yaml rename to environment.yaml index 16e9c23..4cd1dd2 100644 --- a/devtools/conda-envs/CI_env.yaml +++ b/environment.yaml @@ -1,4 +1,4 @@ -name: test +name: lomap-env channels: - conda-forge dependencies: