Skip to content

Commit

Permalink
fixing doc-strings - removing unallowed excape seq \s
Browse files Browse the repository at this point in the history
  • Loading branch information
RiesBen committed Sep 18, 2024
1 parent 5c0fcca commit 4c00c73
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions docs/guide/edge_intermediator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Edge Intermediate Generator
To overcome large molecular differences, it can be helpful to create an
intermediate state between two molecules. Classes that perform this task
are called Intermediator in Konnektor. You can provide them with two
`Component`s, and they will attempt to construct intermediate states
between the two `Component`s.
`Component` s, and they will attempt to construct intermediate states
between the two `Component` s.
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ def __init__(
Implements the general concept of nd-space clustered networks and provides the logic.
The algorithm works as follows:
1. Cluster `Component`\s with the `clusterer` obj.
1. Cluster `Component` s with the `clusterer` obj.
2. Build sub-networks in the clusters using the `sub_network_planners`.
3. Concatenate all sub-networks using the `concatenator` in order to build the final network.
Parameters
----------
clusterer: ComponentsDiversityClusterer
This class is seperating the `Component`\s along the first dimension.
This class is seperating the `Component` s along the first dimension.
sub_network_planners: Iterable[NetworkGenerator]
The clusters, are then seperatley translated to sub networks by the sub_network_planners
concatenator: NetworkConcatenator
Expand Down Expand Up @@ -211,7 +211,7 @@ def __init__(
):
"""
The StarrySkyNetworkGenerator is an advanced network algorithm,
that clusters the provided `Component`\s and builds up a network from this.
that clusters the provided `Component` s and builds up a network from this.
The approach follows the following steps:
1. Component clustering:
Expand All @@ -221,7 +221,7 @@ def __init__(
3. Concatenate the Sub-Star Networks to the final Starry Sky Network, with 3 `Transformations` per cluster pair using the `MSTConcatenator`.
This approach allows in comparison to the Star Network, to build a network containing multiple centers imopoving the graph score.
Still adding a limited amount of `Transformation`\s increasing the computational cost, but not as much `Transformations` as with the Twin Star Network would be generated.
Still adding a limited amount of `Transformation` s increasing the computational cost, but not as much `Transformations` as with the Twin Star Network would be generated.
So the Starry Sky Network is a compromise betwen graph score optimization and number of `Transformations`.
Parameters
Expand All @@ -231,7 +231,7 @@ def __init__(
scorer: AtomMappingScorer
scoring function evaluating an `AtomMapping`, and giving a score between [0,1]
clusterer: ComponentsDiversityClusterer
This class is seperating the `Component`\s along the first dimension.
This class is seperating the `Component` s along the first dimension.
progress: bool, optional
if True a progress bar will be displayed. (default: False)
n_processes: int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def __init__(
The number of cylces, around each `Component` can be defined by `component_present_in_cycles` and allowed cylce size can be tweaked with `cycle_sizes`. For `cycle_sizes` either an integer for providing an expected cycle size (e.g. `3`) or a range of allowed cycle sizes (e.g. `[3,4]`).
This layout has a well distributed connectivity between all `Component`\s which increases the robustness very well, but still allows for a better graph score then the Twin Star Network, as the connectivity distribution is biased not enforced.
The large number of cycles might be very useful for statical analysis. Nevertheless, the network has an increased amount of `Transformation`\s
This layout has a well distributed connectivity between all `Component` s which increases the robustness very well, but still allows for a better graph score then the Twin Star Network, as the connectivity distribution is biased not enforced.
The large number of cycles might be very useful for statical analysis. Nevertheless, the network has an increased amount of `Transformation` s
Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def __init__(
n_processes: int = 1,
):
"""
The `HeuristicMaximalNetworkGenerator` builds for given set of `Component`\s a set of `n_samples` `Transformation`\s per `Component` build network under the assumption each `Component` can be connected to another.
The `Transformations` of this network are realized as `AtomMapping`\s of pairwise `Component`\s. If not all mappings can be created, it will ignore the mapping failure, and return a nearly fully connected graph.
The `HeuristicMaximalNetworkGenerator` builds for given set of `Component` s a set of `n_samples` `Transformation` s per `Component` build network under the assumption each `Component` can be connected to another.
The `Transformations` of this network are realized as `AtomMapping` s of pairwise `Component` s. If not all mappings can be created, it will ignore the mapping failure, and return a nearly fully connected graph.
This class is can be used as initial_edge_lister, if there is a large set of `Component`\s (check network connectivity!)
This class is can be used as initial_edge_lister, if there is a large set of `Component` s (check network connectivity!)
This class is recommended as initial_edge_lister for other approaches.
> **Note**: the `HeuristicMaximalNetworkGenerator` is parallelized and the number of CPUs can be given with `n_processes`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def __init__(
n_processes: int = 1,
):
"""
The `MaximalNetworkGenerator` builds for given set of `Component`\s a fully connected graph under the assumption each `Component` can be connected to another.
The `Transformation`\s of this graph are realized as `AtomMapping`\s of pairwise `Component`\s. If not all mappings can be created, it will ignore the mapping failure, and return a nearly fully connected graph.
The `MaximalNetworkGenerator` builds for given set of `Component` s a fully connected graph under the assumption each `Component` can be connected to another.
The `Transformation` s of this graph are realized as `AtomMapping` s of pairwise `Component` s. If not all mappings can be created, it will ignore the mapping failure, and return a nearly fully connected graph.
Note: This approach is not very suitable for Free Energy calculations in application cases. However, this approach is very important, as all above approaches use this as an initial solution, they filter down to gain the desired design.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ def __init__(
_initial_edge_lister: NetworkGenerator = None,
):
"""
The `MinimalSpanningTreeNetworkGenerator`, builds an minimal spanning tree (MST) network for a given set of `Component`\s. The `Transformation`\s of the Network,
are represented by an `AtomMapping`\s, which are scored by a `AtomMappingScorer`.
The `MinimalSpanningTreeNetworkGenerator`, builds an minimal spanning tree (MST) network for a given set of `Component` s. The `Transformation` s of the Network,
are represented by an `AtomMapping` s, which are scored by a `AtomMappingScorer`.
For the MST algorithm the Kruskal Algorithm is used.
The MST algorithm gives the optimal graph score possible and the minimal required set of `Transformations`.
This makes the MST Network very efficient. However, the MST is not very robust, in case of one failing `Transformation`, the Network is immediatly disconnected.
The disconnectivity will translate to a loss of `Component`\s in the final FE Network.
The disconnectivity will translate to a loss of `Component` s in the final FE Network.
Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
Parameters
----------
mapper : AtomMapper
the `AtomMapper` to use to propose `AtomMapping`\s.
the `AtomMapper` to use to propose `AtomMapping` s.
scorer : AtomMappingScorer
any callable which takes a `AtomMapping` and returns a float
target_node_connectivity: int
Expand All @@ -42,8 +42,8 @@ def __init__(
progress: bool, optional
if true a progress bar will be displayed. (default: False)
_initial_edge_lister: LigandNetworNetworkGeneratorkPlanner, optional
this `NetworkGenerator` is used to give the initial set of `Transformation`\s.
For standard usage, the MaximalNetworGenerator is used, which will provide all possible `Transformation`\s. (default: MaximalNetworkPlanner)
this `NetworkGenerator` is used to give the initial set of `Transformation` s.
For standard usage, the MaximalNetworGenerator is used, which will provide all possible `Transformation` s. (default: MaximalNetworkPlanner)
"""
if _initial_edge_lister is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
Parameters
----------
mappers : Union[AtomMapper, list[AtomMapper]]
the `AtomMapper`\s to use to propose `AtomMapping`\s. At least 1 required,
the `AtomMapper` s to use to propose `AtomMapping` s. At least 1 required,
but many can be given, in which case all will be tried to find the
lowest score edges
scorer : AtomMappingScorer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(
The Star Netwrok is most edge efficient, but not most graph score efficient, as it has to find a central `Component`, which usually is a compromise for all 'Component's.
From a robustness point of view, the Star Network, will immediatly be disconnected if one `Transformation` fails.
However the loss of `Component`\s is very limited, as only one ligand is lost per `Transformation` failure.
However the loss of `Component` s is very limited, as only one ligand is lost per `Transformation` failure.
Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def __init__(
"""
The Twin Star Network is an expansion to the Star Network. It can be described as multiple star networks, that are overlayed.
The algorithm is first calculating all possible `Transformation`\s for all `Component`\s.
Next the in average `n_centers` (default: 2) best performing `Component`\s over all transfromation scores are selected and placed into the center of the network.
The algorithm is first calculating all possible `Transformation` s for all `Component` s.
Next the in average `n_centers` (default: 2) best performing `Component` s over all transfromation scores are selected and placed into the center of the network.
Finally all components are connected to the selected centers, resulting in $n_{Transformations} = n_{centers}*(n_{Componentes}-n_{centers})$
This approach has in the default version the doubled number of `Transformations` compared to the Star Network and therefore also has an increase graph cost.
Expand Down

0 comments on commit 4c00c73

Please sign in to comment.