chembfn-webui 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: chembfn_webui
3
+ Version: 0.1.0
4
+ Summary: WebUI for ChemBFN
5
+ Home-page: https://github.com/Augus1999/ChemBFN-WebUI
6
+ Author: Nianze A. Tao
7
+ Author-email: tao-nianze@hiroshima-u.ac.jp
8
+ License: AGPL-3.0-or-later
9
+ Project-URL: Source, https://github.com/Augus1999/ChemBFN-WebUI
10
+ Keywords: Chemistry,CLM,ChemBFN,WebUI
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Natural Language :: English
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: bayesianflow_for_chem>=1.3.0
24
+ Requires-Dist: mol2chemfigPy3>=1.5.11
25
+ Requires-Dist: gradio>=5.32.1
26
+ Requires-Dist: torch>=2.7.0
27
+ Requires-Dist: selfies>=2.2.0
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: keywords
35
+ Dynamic: license
36
+ Dynamic: license-file
37
+ Dynamic: project-url
38
+ Dynamic: requires-dist
39
+ Dynamic: requires-python
40
+ Dynamic: summary
41
+
42
+ ## ChemBFN WebUI: WebUI to generate and visualise molecules for ChemBFN method
43
+
44
+
45
+
46
+ ### 1. Install
47
+
48
+ ```bash
49
+ $ pip install -U chembfn_webui
50
+ ```
51
+
52
+ ### 2. Place model files
53
+
54
+ * Place customised vocabulary files (plain text .txt format) under [`chembfn_webui/model/vocab`](https://github.com/Augus1999/ChemBFN-WebUI/tree/main/chembfn_webui/model/vocab).
55
+ * Place base model files (pretrained model in .pt format) under [`chembfn_webui/model/base_model`](https://github.com/Augus1999/ChemBFN-WebUI/tree/main/chembfn_webui/model/base_model).
56
+ * Group standalone model files (`model.pt`, optional `mlp.pt`) and configuration file (`config.json`) in one folder for each model and place these folders under [`chembfn_webui/model/standalone_model`](https://github.com/Augus1999/ChemBFN-WebUI/tree/main/chembfn_webui/model/standalone_model).
57
+ * Group LoRA model files (`lora.pt`, optional `mlp.pt`) and configuration file (`config.json`) in one folder for each model and place these folders under [`chembfn_webui/model/lora`](https://github.com/Augus1999/ChemBFN-WebUI/tree/main/chembfn_webui/model/lora).
58
+
59
+ For example,
60
+
61
+ ```
62
+ ├───chembfn_webui
63
+ ├───bin
64
+ ├───cache
65
+ ├───lib
66
+ └───model
67
+ ├───base_model
68
+ | └───zinc15_190m.pt
69
+ ├───lora
70
+ │ └───csd_ees
71
+ │ ├───lora.pt
72
+ | ├───mlp.pt
73
+ | └───config.json
74
+ ├───standalone_model
75
+ │ ├───guacamol
76
+ │ | ├───model.pt
77
+ │ | └───config.json
78
+ │ └───qm9
79
+ | ├───model.pt
80
+ | ├───mlp.pt
81
+ | └───config.json
82
+ └───vocab
83
+ └───moses_selfies_vocab.txt
84
+ ```
85
+
86
+ If placed correctly, all these files can be seen in the "model explorer" tab.
87
+
88
+ > You can use an external folder to host the models if it follows the same structure as [`chembfn_webui/model`](https://github.com/Augus1999/ChemBFN-WebUI/tree/main/chembfn_webui/model). See the next section for the method.
89
+
90
+ ### 3. Launch the program
91
+
92
+ I. launch the web-UI
93
+ ```bash
94
+ $ chembfn
95
+ ```
96
+
97
+ II. launch the web in a public link
98
+ ```bash
99
+ $ chembfn --public
100
+ ```
101
+
102
+ III. use an external directory to hold the model files (Linux and MacOS)
103
+ ```bash
104
+ $ export CHEMBFN_WEBUI_MODEL_DIR={YOUR/MODEL/DIR}
105
+ $ chembfn
106
+ ```
107
+
108
+ IV. use an external directory to hold the model files (Windows)
109
+ ```bash
110
+ $ set CHEMBFN_WEBUI_MODEL_DIR={YOUR/MODEL/DIR}
111
+ $ chembfn
112
+ ```
113
+
114
+ ### 4. Write the prompt
115
+
116
+ * Leave prompt blank for unconditional generation.
117
+ * For standalone models, key in objective values in the format of `[a,b,c,...]` to pass the values to the model.
118
+ * Key in `<name:A>` or `<name:A>:[a,b,c,...]` to select LoRA parameter and pass the objective values if necessary, where `name` is the LoRA model name and `A` is the LoRA scaling. You can easily select a LoRA model by clicking the model name in "LoRA models" tab as well.
119
+ * You can stack several LoRA models together to form an ensemble model by prompt like `<name1:A1>:[a1,b1,c1,...];<name2:A2>:[a2,b2,...];...`. Note that here `A1`, `A2`, _etc_ are contributions of each model to the ensemble.
120
+
121
+ ### 5. Advanced control
122
+
123
+ Under "advanced control" tab
124
+
125
+ * You can control semi-autoregressive behaviours by key in `F` for switch off SAR, `T` for switch on SAR, and prompt like `F,F,T,...` to individually control the SAR in an ensemble model.
126
+ * You can add unwanted tokens, e.g., `[Cu],p,[Si]`.
127
+
128
+ ### 6. Generate molecules
129
+
130
+ Click "RUN" then here you go! If error occured, please check your prompts and settings.
@@ -0,0 +1,16 @@
1
+ chembfn_webui/__init__.py,sha256=AXUdd_PrlfVO56losFUP7A8XrqCDPylwRbTpe_WG3Uc,87
2
+ chembfn_webui/bin/app.py,sha256=GLXsqaZFmKu3dj35Ja-ygPUQSLK-uKgVIMxZQipXf5c,15809
3
+ chembfn_webui/cache/cache_file_here.txt,sha256=hi60T_q6Cf5WPtXuwe4CqjiWpaUqrczsmGMhKIUL--M,28
4
+ chembfn_webui/cache/results.csv,sha256=cNmpygApXW6XLwkZfKkLRh6BwlwURkHZ17da8qUDjac,1670
5
+ chembfn_webui/lib/utilities.py,sha256=bnAAhfryDpZpAMk5p0eURJ2nhgaXgTY5QWXITdL26gc,4476
6
+ chembfn_webui/lib/version.py,sha256=3uax1uzsS9zcwmKGqogR9oHyvdv4l5UktCj3R9mW1p4,138
7
+ chembfn_webui/model/base_model/place_base_model_here.txt,sha256=oa8_ILaAlWpTXICVDi-Y46_OahV7wB6Che6gbiEIh-c,39
8
+ chembfn_webui/model/lora/place_lora_folder_here.txt,sha256=YYOo0Cj278DyRcgVrCLa1f2Q-cqgNeMnelaLiA3Fuic,69
9
+ chembfn_webui/model/standalone_model/place_standalone_model_folder_here.txt,sha256=Dp42UscfI0Zp3SnvRv5vOfWiJZnxdY7rG3jo0kf86VM,80
10
+ chembfn_webui/model/vocab/place_vocabulary_file_here.txt,sha256=fLOINvZP2022oE7RsmfDjgyaw2yMi7glmdu_cTwmo88,28
11
+ chembfn_webui-0.1.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
12
+ chembfn_webui-0.1.0.dist-info/METADATA,sha256=r9Obs3CWZy_ZK42c46gDXMAORUWQhAv4WhL_mpdEO4o,5125
13
+ chembfn_webui-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ chembfn_webui-0.1.0.dist-info/entry_points.txt,sha256=fp8WTPybvwpeYKrUhTi456wwZbmCMJXN1TeFGpR1SlY,55
15
+ chembfn_webui-0.1.0.dist-info/top_level.txt,sha256=VdWt3Z7jhbB0pQO_mkRawnU5s75SBT9BV8fGaAIJTDI,14
16
+ chembfn_webui-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ chembfn = chembfn_webui.bin.app:main