You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.**Clone** this repository or use it as a **template** (click on the green "Use this template" button):
42
-
2.**Edit**`knime.yml`- provide your metadata, license, ...
43
-
3._(Optional)_Modify the `src/extension.py` file to implement your own logic.
49
+
1.**Clone** this repository or use it as a **template** (click on the green "Use this template" button).
50
+
2.**Edit**`knime.yml`to provide your metadata, license, etc. The last two lines of this file indicate that the extension created with this repository depends on the KNIME Base Chemistry Types & Nodes and the RDKit extensions.
51
+
3.**Modify** the `src/extension.py` file or **add** further files to implement your own logic. Note that every py file equivalent to one node needs to be imported in the init.py file.
44
52
4._(Optional)_ Add python packages to the environment with the following command, or by manually editing the `pixi.toml` file:
45
53
```bash
46
54
pixi add <package_name>
47
55
```
56
+
If you leave the `pixi.toml` file unchanged, the Python environment that you will create in the next step will have the RDKit package installed per default.
48
57
5. **Install** the python environment:
49
58
```bash
50
59
pixi install
51
60
```
52
-
6. **Test** the extension in the KNIME Analytics Platform with the extension in debug mode by adding the following line to the knime.ini file (adjust <path_to_this_repository>in the config.yml):
61
+
6. **Test** the extension in the KNIME Analytics Platform with the extension in debug mode by adding the following line to the `knime.ini` file (adjust <path_to_this_repository>in the `config.yml`):
@@ -71,6 +80,19 @@ You can find instructions on how to work with our code or develop python extensi
71
80
72
81
For detailed instructions on how to create a KNIME Python extension, please refer to the [KNIME Python Extension documentation](https://docs.knime.com/latest/pure_python_node_extensions_guide/index.html).
73
82
83
+
84
+
### Background information:
85
+
From KNIME AP version 5.6 on, the KNIME Base Chemistry Types & Nodes extension is shipped with extended adapator functionality between Python and Java.
86
+
87
+
It also provides two functions designed to simplify the work of node developers:
88
+
89
+
`to_rdkit_series`: convert a pandas series of KNIME chemistry types to a series of RDKit Mol objects
90
+
91
+
`is_molecule`: True if the column holds any supported chemistry type
92
+
93
+
The adaptor file can be found in the following location of the KNIME AP installation /plugins/org.knime.chem.types_<version>/python/src/org/knime/types/chemistry.py.
0 commit comments