-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from OpenFreeEnergy/update_docs
Update docs
- Loading branch information
Showing
28 changed files
with
348 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
================================ | ||
konnektor.network\_planner | ||
konnektor.network\_analysis | ||
================================ | ||
|
||
.. automodule:: konnektor.network_planners | ||
.. automodule:: konnektor.network_analysis.network_analysis | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
================================ | ||
konnektor.data | ||
================================ | ||
|
||
.. automodule:: konnektor.data | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
================================ | ||
konnektor.network\_planner | ||
================================ | ||
|
||
|
||
konnektor.network\_planners.generators | ||
------------------------------------------------------- | ||
|
||
.. automodule:: konnektor.network_planners.generators.maximal_network_generator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_planners.generators.heuristic_maximal_network_generator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_planners.generators.explicit_network_generator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_planners.generators.star_network_network_generator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_planners.generators.minimal_spanning_tree_network_generator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_planners.generators.cyclic_network_generator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_planners.generators.clustered_network_generator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
|
||
konnektor.network\_planners.concatenators | ||
------------------------------------------------------- | ||
|
||
.. automodule:: konnektor.network_planners.concatenators.mst_concatenator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
================================ | ||
konnektor.network\_tools | ||
================================ | ||
|
||
konnektor.network\_tools.clustering | ||
------------------------------------------------------- | ||
|
||
.. automodule:: konnektor.network_tools.clustering.charge_clustering | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_tools.clustering.component_diversity_clustering | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
konnektor.network\_tools.network\_handling | ||
------------------------------------------------------- | ||
|
||
.. automodule:: konnektor.network_tools.network_handling.merge | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_tools.network_handling.concatenate | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
.. automodule:: konnektor.network_tools.network_handling.delete | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
================================ | ||
konnektor.utils | ||
================================ | ||
|
||
.. automodule:: konnektor.utils.toy_data | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
================================ | ||
konnektor.visualization | ||
================================ | ||
|
||
konnektor.network\_visualiztion.visualization | ||
------------------------------------------------------- | ||
|
||
.. automodule:: konnektor.visualization.visualization | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
konnektor.network\_visualiztion.widget | ||
------------------------------------------------------- | ||
|
||
.. automodule:: konnektor.visualization.widget | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,4 @@ | ||
Guide to Konnektor | ||
===================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Applications: | ||
|
||
guide/application_free_energies_system_representations | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Algorithms: | ||
|
||
guide/mst_network_planner | ||
|
||
More will be here soon! |
5 changes: 0 additions & 5 deletions
5
docs/guide/application_free_energies_system_representations.rst
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,56 @@ | ||
building networks | ||
Building Networks | ||
----------------- | ||
In this tutorial, it will be shown, how a `LigandNetwork` can be planned using Konnektor. | ||
Please be aware, that the openfe package is required in your python environment. | ||
You can easily install it with: `pip install openfe`. | ||
|
||
In the first step, we will create some small molecules, that we want to plan our `LigandNetwork` with and we will generate an `AtomMapper` and `AtomMappingScorer`. | ||
The `AtomMapper` will generate all possible alchemical transformations for the set of molecules, translating to the network edges. | ||
Next, the `AtomMappingScorer` will add the weights to the edges, by expressing on how difficult the transformation will be. This score is between 0, very hard to compute, and 1 for easy to compute:: | ||
|
||
# Build Small Molecules | ||
from konnektor.data import get_benzene_ligands | ||
compounds = list(filter(lambda x: not x.name in ["lig_2", "lig_3", "lig_4", "lig_7"], | ||
get_benzene_ligands())) | ||
|
||
# Build Atom Mapper and AtomMappingScorer | ||
from openfe.setup import KartografAtomMapper, lomap_scorers | ||
mapper = KartografAtomMapper() | ||
scorer = lomap_scorers.default_lomap_score | ||
|
||
After having the components setup, we can go and plan our network! Here we use the `CylicNetworkGenerator`. | ||
But of course you can use any `NetworkGenerator` from Konnektor in exactly the same way.:: | ||
|
||
# Plan the Network | ||
from konnektor.network_planners import CyclicNetworkGenerator | ||
|
||
networker = CyclicNetworkGenerator(mapper=mapper, | ||
scorer=scorer, | ||
n_processes=1) | ||
|
||
network = networker.generate_ligand_network(compounds) | ||
|
||
In Order to visualize the Network Konnektor provides you several options. | ||
First, you can translate the network into a `matplotlib.pyplot.Figure` with the function `draw_ligand_network`.:: | ||
|
||
# Visualize the generated network | ||
from konnektor.visualization import draw_ligand_network | ||
fig = draw_ligand_network(network=network, title=network.name) | ||
|
||
fig.show() | ||
|
||
This yields the following visualization: | ||
|
||
.. image:: ../_static/img/cyclic_graph_pyplot_fig.png | ||
|
||
As alternative, Konnektor offers an interactive IPython widget, that allows you interactivley to explore your network.:: | ||
|
||
# Visualize the generated network in a widget | ||
from konnektor.visualization import draw_network_widget | ||
widget = draw_network_widget(network=network) | ||
widget | ||
|
||
This yields the following visualization: | ||
|
||
.. image:: ../_static/img/cyclic_graph_ipy_widget.png | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from .clustering.charge_clustering import ChargeClusterer | ||
from .clustering.component_diversity_clustering import \ | ||
ComponentsDiversityClusterer | ||
from .concatenate import concatenate_networks, append_node | ||
from .merge import merge_two_networks | ||
from .misc import delete_transformation, delete_component | ||
|
||
from .network_handling import merge_networks, concatenate_networks, \ | ||
append_component, delete_component, delete_transformation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This code is part of OpenFE and is licensed under the MIT license. | ||
# For details, see https://github.com/OpenFreeEnergy/konnektor | ||
|
||
from .concatenate import concatenate_networks, append_component | ||
from .delete import delete_transformation, delete_component | ||
from .merge import merge_networks, merge_two_networks |
Oops, something went wrong.