aamutils 0.0.1__tar.gz → 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aamutils-0.0.1 → aamutils-0.0.2}/PKG-INFO +35 -7
- {aamutils-0.0.1 → aamutils-0.0.2}/README.md +34 -6
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/__main__.py +4 -1
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/cmd/expanding.py +3 -3
- {aamutils-0.0.1 → aamutils-0.0.2}/pyproject.toml +1 -1
- {aamutils-0.0.1 → aamutils-0.0.2}/.github/workflows/publish-package.yml +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/.github/workflows/test-and-lint.yml +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/.gitignore +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/LICENSE +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/Makefile +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/__init__.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/algorithm/__init__.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/algorithm/aaming.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/algorithm/ilp.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/cmd/__init__.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/aamutils/utils.py +0 -0
- /aamutils-0.0.1/benchmarking.py → /aamutils-0.0.2/benchmark.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/conf.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/data/test_dataset.json +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/doc/getting_started.rst +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/doc/reference.rst +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/index.rst +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/lint.sh +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/make.bat +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/requirements.txt +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/test/__init__.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/test/algorithm/__init__.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/test/algorithm/test_aaming.py +0 -0
- {aamutils-0.0.1 → aamutils-0.0.2}/test/algorithm/test_ilp.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: aamutils
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Collection of atom-atom-mapping utility functions.
|
|
5
5
|
Project-URL: homepage, https://github.com/klausweinbauer/AAMUtils
|
|
6
6
|
Project-URL: source, https://github.com/klausweinbauer/AAMUtils
|
|
@@ -26,7 +26,12 @@ A collection of atom-atom-mapping utility functions.
|
|
|
26
26
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
The easiest way to use AAMUtils is by installing the PyPI package
|
|
30
|
+
[aamutils](https://pypi.org/project/aamutils/).
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
pip install aamutils
|
|
34
|
+
```
|
|
30
35
|
|
|
31
36
|
## Usage
|
|
32
37
|
|
|
@@ -43,7 +48,7 @@ echo "CCC[Cl:1].[N:2]>>CCC[N:2].[Cl:1]" > testinput.txt
|
|
|
43
48
|
Next, run AAMUtils to expand the partial AAM.
|
|
44
49
|
|
|
45
50
|
```bash
|
|
46
|
-
python3
|
|
51
|
+
python3 -m aamutils expand testinput.txt
|
|
47
52
|
```
|
|
48
53
|
|
|
49
54
|
The output is written to 'testinput_extended.json'.
|
|
@@ -56,17 +61,40 @@ cat testinput_extended.json
|
|
|
56
61
|
[
|
|
57
62
|
{
|
|
58
63
|
"input": "CCC[Cl:1].[N:2]>>CCC[N:2].[Cl:1]",
|
|
59
|
-
"expanded_aam": "[Cl:1][CH2:5][CH2:4][CH3:3].[NH3:2]>>[ClH:1].[NH2:2][CH2:
|
|
64
|
+
"expanded_aam": "[Cl:1][CH2:5][CH2:4][CH3:3].[NH3:2]>>[ClH:1].[NH2:2][CH2:3][CH2:4][CH3:5]",
|
|
60
65
|
"ilp_status": "Optimal",
|
|
61
|
-
"optimization_result":
|
|
66
|
+
"optimization_result": 4.0,
|
|
62
67
|
"invalid_reaction_center": false,
|
|
63
|
-
"reaction_edges":
|
|
68
|
+
"reaction_edges": 4
|
|
64
69
|
}
|
|
65
70
|
]
|
|
66
71
|
```
|
|
67
72
|
|
|
73
|
+
## Benchmark
|
|
74
|
+
|
|
75
|
+
To rerun the benchmarks from the paper use the ``benchmark.py`` script. The
|
|
76
|
+
reported results can be reproduced by running the following commands:
|
|
77
|
+
|
|
78
|
+
### (1) Extend partial reaction center (50%, 75% and 100% missing atoms)
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
python3 benchmark.py --remove-mode rc --remove-ratio 0.5
|
|
82
|
+
```
|
|
83
|
+
```
|
|
84
|
+
python3 benchmark.py --remove-mode rc --remove-ratio 0.75
|
|
85
|
+
```
|
|
86
|
+
```
|
|
87
|
+
python3 benchmark.py --remove-mode rc --remove-ratio 1
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### (2) Extend partial AAM with fully mapped RC
|
|
91
|
+
```
|
|
92
|
+
python3 benchmark.py --remove-mode keep_rc --remove-ratio 1
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
|
|
68
96
|
## Functionality
|
|
69
|
-
Here is an overview of implemented
|
|
97
|
+
Here is an overview of implemented functionality:
|
|
70
98
|
|
|
71
99
|
- SMILES to graph and graph to SMILES parsing
|
|
72
100
|
- Reaction center validity checks
|
|
@@ -4,7 +4,12 @@ A collection of atom-atom-mapping utility functions.
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The easiest way to use AAMUtils is by installing the PyPI package
|
|
8
|
+
[aamutils](https://pypi.org/project/aamutils/).
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
pip install aamutils
|
|
12
|
+
```
|
|
8
13
|
|
|
9
14
|
## Usage
|
|
10
15
|
|
|
@@ -21,7 +26,7 @@ echo "CCC[Cl:1].[N:2]>>CCC[N:2].[Cl:1]" > testinput.txt
|
|
|
21
26
|
Next, run AAMUtils to expand the partial AAM.
|
|
22
27
|
|
|
23
28
|
```bash
|
|
24
|
-
python3
|
|
29
|
+
python3 -m aamutils expand testinput.txt
|
|
25
30
|
```
|
|
26
31
|
|
|
27
32
|
The output is written to 'testinput_extended.json'.
|
|
@@ -34,17 +39,40 @@ cat testinput_extended.json
|
|
|
34
39
|
[
|
|
35
40
|
{
|
|
36
41
|
"input": "CCC[Cl:1].[N:2]>>CCC[N:2].[Cl:1]",
|
|
37
|
-
"expanded_aam": "[Cl:1][CH2:5][CH2:4][CH3:3].[NH3:2]>>[ClH:1].[NH2:2][CH2:
|
|
42
|
+
"expanded_aam": "[Cl:1][CH2:5][CH2:4][CH3:3].[NH3:2]>>[ClH:1].[NH2:2][CH2:3][CH2:4][CH3:5]",
|
|
38
43
|
"ilp_status": "Optimal",
|
|
39
|
-
"optimization_result":
|
|
44
|
+
"optimization_result": 4.0,
|
|
40
45
|
"invalid_reaction_center": false,
|
|
41
|
-
"reaction_edges":
|
|
46
|
+
"reaction_edges": 4
|
|
42
47
|
}
|
|
43
48
|
]
|
|
44
49
|
```
|
|
45
50
|
|
|
51
|
+
## Benchmark
|
|
52
|
+
|
|
53
|
+
To rerun the benchmarks from the paper use the ``benchmark.py`` script. The
|
|
54
|
+
reported results can be reproduced by running the following commands:
|
|
55
|
+
|
|
56
|
+
### (1) Extend partial reaction center (50%, 75% and 100% missing atoms)
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
python3 benchmark.py --remove-mode rc --remove-ratio 0.5
|
|
60
|
+
```
|
|
61
|
+
```
|
|
62
|
+
python3 benchmark.py --remove-mode rc --remove-ratio 0.75
|
|
63
|
+
```
|
|
64
|
+
```
|
|
65
|
+
python3 benchmark.py --remove-mode rc --remove-ratio 1
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### (2) Extend partial AAM with fully mapped RC
|
|
69
|
+
```
|
|
70
|
+
python3 benchmark.py --remove-mode keep_rc --remove-ratio 1
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
|
|
46
74
|
## Functionality
|
|
47
|
-
Here is an overview of implemented
|
|
75
|
+
Here is an overview of implemented functionality:
|
|
48
76
|
|
|
49
77
|
- SMILES to graph and graph to SMILES parsing
|
|
50
78
|
- Reaction center validity checks
|
|
@@ -4,9 +4,9 @@ import logging
|
|
|
4
4
|
import rdkit.Chem.rdmolfiles as rdmolfiles
|
|
5
5
|
import rdkit.Chem.rdmolops as rdmolops
|
|
6
6
|
|
|
7
|
-
from utils import mol_to_graph, set_aam, graph_to_mol, is_valid_rxn_smiles
|
|
8
|
-
from algorithm.ilp import expand_partial_aam_balanced
|
|
9
|
-
from algorithm.aaming import get_its, get_rc, is_rc_valid
|
|
7
|
+
from aamutils.utils import mol_to_graph, set_aam, graph_to_mol, is_valid_rxn_smiles
|
|
8
|
+
from aamutils.algorithm.ilp import expand_partial_aam_balanced
|
|
9
|
+
from aamutils.algorithm.aaming import get_its, get_rc, is_rc_valid
|
|
10
10
|
|
|
11
11
|
logger = logging.getLogger("aamutils")
|
|
12
12
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|