chembfn-webui 0.6.0__py3-none-any.whl → 1.0.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.
chembfn_webui/bin/app.py CHANGED
@@ -10,7 +10,7 @@ from functools import partial
10
10
  from typing import Tuple, List, Dict, Union
11
11
 
12
12
  sys.path.append(str(Path(__file__).parent.parent))
13
- from rdkit.Chem import Draw, MolFromSmiles
13
+ from rdkit.Chem import Draw, MolFromSmiles # type: ignore
14
14
  from mol2chemfigPy3 import mol2chemfig
15
15
  import gradio as gr
16
16
  import torch
@@ -18,10 +18,10 @@ from selfies import decoder
18
18
  from bayesianflow_for_chem import ChemBFN, MLP, EnsembleChemBFN
19
19
  from bayesianflow_for_chem.data import (
20
20
  VOCAB_KEYS,
21
- AA_VOCAB_KEYS,
21
+ FASTA_VOCAB_KEYS,
22
22
  load_vocab,
23
23
  smiles2vec,
24
- aa2vec,
24
+ fasta2vec,
25
25
  split_selfies,
26
26
  )
27
27
  from bayesianflow_for_chem.tool import (
@@ -246,8 +246,8 @@ def run(
246
246
  img_fn = lambda x: [Draw.MolToImage(MolFromSmiles(i), (500, 500)) for i in x]
247
247
  chemfig_fn = lambda x: [mol2chemfig(i, "-r", inline=True) for i in x]
248
248
  if token_name == "FASTA":
249
- vocab_keys = AA_VOCAB_KEYS
250
- tokeniser = aa2vec
249
+ vocab_keys = FASTA_VOCAB_KEYS
250
+ tokeniser = fasta2vec
251
251
  trans_fn = lambda x: x
252
252
  img_fn = lambda _: None # senseless to provide dumb 2D images
253
253
  chemfig_fn = lambda _: [""] # senseless to provide very long Chemfig code
@@ -417,7 +417,6 @@ def run(
417
417
  imgs,
418
418
  mols,
419
419
  "\n\n".join(chemfigs),
420
- # "\n".join(_message),
421
420
  gr.TextArea("\n".join(_message), label="message", lines=len(_message)),
422
421
  str(cache_dir / "results.csv"),
423
422
  )
@@ -610,7 +609,12 @@ def main() -> None:
610
609
  :return:
611
610
  :rtype: None
612
611
  """
613
- parser = argparse.ArgumentParser()
612
+ parser = argparse.ArgumentParser(
613
+ description="A web-based visualisation tool for ChemBFN method.",
614
+ epilog=f"ChemBFN WebUI {__version__}, developed in Hiroshima University by chemists for chemists. "
615
+ "Visit https://augus1999.github.io/bayesian-flow-network-for-chemistry/ for more details.",
616
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
617
+ )
614
618
  parser.add_argument(
615
619
  "--public", default=False, help="open to public", action="store_true"
616
620
  )
@@ -0,0 +1 @@
1
+ CN1CCOCC1c1cccc(C(=O)Nc2ccnn2C(C)C)c1
@@ -4,5 +4,5 @@
4
4
  Version info.
5
5
  """
6
6
 
7
- __version__ = "0.6.0"
7
+ __version__ = "1.0.0"
8
8
  __author__ = "Nianze A. TAO"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chembfn_webui
3
- Version: 0.6.0
3
+ Version: 1.0.0
4
4
  Summary: WebUI for ChemBFN
5
5
  Home-page: https://github.com/Augus1999/ChemBFN-WebUI
6
6
  Author: Nianze A. Tao
@@ -20,7 +20,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
20
  Requires-Python: >=3.11
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: bayesianflow_for_chem>=2.1.0
23
+ Requires-Dist: bayesianflow_for_chem>=2.2.2
24
24
  Requires-Dist: mol2chemfigPy3>=1.5.11
25
25
  Requires-Dist: gradio>=5.32.1
26
26
  Requires-Dist: torch>=2.7.0
@@ -1,16 +1,16 @@
1
1
  chembfn_webui/__init__.py,sha256=AXUdd_PrlfVO56losFUP7A8XrqCDPylwRbTpe_WG3Uc,87
2
- chembfn_webui/bin/app.py,sha256=_d5J2drmiYJhOKsrGj1hAE1ciBwKTFkB1m_HVIMDm6Q,21284
2
+ chembfn_webui/bin/app.py,sha256=fqIP5O5aojwZmw2-eHBcuFm4YuQBIEuwOMTvDzW7jcA,21632
3
3
  chembfn_webui/cache/cache_file_here.txt,sha256=hi60T_q6Cf5WPtXuwe4CqjiWpaUqrczsmGMhKIUL--M,28
4
- chembfn_webui/cache/results.csv,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ chembfn_webui/cache/results.csv,sha256=xdSOWM1GGGJEFS1Y4sfCjA-9-66AECEo6El59_yW1hw,37
5
5
  chembfn_webui/lib/utilities.py,sha256=ALPw-Evjd9DdsU_RQA6Zp2Gc6XnRR7Y_5fZrqG9azWo,7460
6
- chembfn_webui/lib/version.py,sha256=q5fg1l63m1pIv46TV50BhgAj1ezH83URJCjHcQaF_fQ,138
6
+ chembfn_webui/lib/version.py,sha256=Mbvn1j2C-hWCKICax3XLfU-P0Q3j0oPQ4GQXoDFJ3fs,138
7
7
  chembfn_webui/model/base_model/place_base_model_here.txt,sha256=oa8_ILaAlWpTXICVDi-Y46_OahV7wB6Che6gbiEIh-c,39
8
8
  chembfn_webui/model/lora/place_lora_folder_here.txt,sha256=YYOo0Cj278DyRcgVrCLa1f2Q-cqgNeMnelaLiA3Fuic,69
9
9
  chembfn_webui/model/standalone_model/place_standalone_model_folder_here.txt,sha256=Dp42UscfI0Zp3SnvRv5vOfWiJZnxdY7rG3jo0kf86VM,80
10
10
  chembfn_webui/model/vocab/place_vocabulary_file_here.txt,sha256=fLOINvZP2022oE7RsmfDjgyaw2yMi7glmdu_cTwmo88,28
11
- chembfn_webui-0.6.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
12
- chembfn_webui-0.6.0.dist-info/METADATA,sha256=euaFBtUCGo5QlWGOfGF9bsj4LiLF2t9lo8ckotlpico,5897
13
- chembfn_webui-0.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- chembfn_webui-0.6.0.dist-info/entry_points.txt,sha256=fp8WTPybvwpeYKrUhTi456wwZbmCMJXN1TeFGpR1SlY,55
15
- chembfn_webui-0.6.0.dist-info/top_level.txt,sha256=VdWt3Z7jhbB0pQO_mkRawnU5s75SBT9BV8fGaAIJTDI,14
16
- chembfn_webui-0.6.0.dist-info/RECORD,,
11
+ chembfn_webui-1.0.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
12
+ chembfn_webui-1.0.0.dist-info/METADATA,sha256=iRpNEXoJZRG42fMjyHwsmcUJ5jV0MrGgWUMkZrqUb3s,5897
13
+ chembfn_webui-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ chembfn_webui-1.0.0.dist-info/entry_points.txt,sha256=fp8WTPybvwpeYKrUhTi456wwZbmCMJXN1TeFGpR1SlY,55
15
+ chembfn_webui-1.0.0.dist-info/top_level.txt,sha256=VdWt3Z7jhbB0pQO_mkRawnU5s75SBT9BV8fGaAIJTDI,14
16
+ chembfn_webui-1.0.0.dist-info/RECORD,,