Skip to main content

Web-based UI visualisation tool for ChemBFN method

PyPI black Stand With Ukraine CI

Important:

For the security concerning, it is not recommended to use this application as a public service. When deploying on a local host as a shared application, it is better to install this application in a container or VM, to prevent this application from accessing the Internet, and to limit the premissions of read, create, and delete loacal files and directories.

1. Install

$ pip install -U chembfn_webui

2. Place model files

For example,

├───chembfn_webui
    ├───bin
    ├───cache
    ├───lib
    └───model
        ├───base_model
        |   └───zinc15_190m.pt
        ├───lora
        │   └───csd_ees
        │       ├───lora.pt
        |       ├───mlp.pt
        |       └───config.json
        ├───standalone_model
        │   ├───guacamol
        │   |   ├───model.pt
        │   |   └───config.json
        │   └───qm9
        |        ├───model.pt
        |        ├───mlp.pt
        |        └───config.json
        └───vocab
            └───moses_selfies_vocab.txt

Note:

The file config.json is automatically saved by CLI tool Madmol provided in bayesianflow-for-chem package. If you train models via Python API, you need to manually create that file for your models by filling in the tempate:

{
   "padding_index": 0,
   "start_index": 1,
   "end_index": 2,
   "padding_strategy": "static",
   "padding_length": PADDING_LENGTH,
   "label": [LABEL_NAME_I, LABEL_NAME_II, ...],
   "name": JOB_NAME
}

The configureation file for base models can be downloaded here.

If placed correctly, all these files can be seen in the "model explorer" tab.

You can use an external folder to host the models if it follows the same structure as chembfn_webui/model. See the next section for the method.

3. Launch the program

I. launch the web-UI

$ chembfn

II. launch the web in a public link

$ chembfn --public

III. use an external directory to hold the model files (Linux and MacOS)

$ CHEMBFN_WEBUI_MODEL_DIR={YOUR/MODEL/DIR} chembfn

IV. use an external directory to hold the model files (Windows)

# if you use CMD
> set CHEMBFN_WEBUI_MODEL_DIR={YOUR/MODEL/DIR} & chembfn

# if you use PowerShell
> $env:CHEMBFN_WEBUI_MODEL_DIR="{YOUR/MODEL/DIR}" & chembfn

V. use an external directory to hold the model files (Notebook, Google Colab)

import os
os.environ["CHEMBFN_WEBUI_MODEL_DIR"] = "{YOUR/MODEL/DIR}"
!chembfn --public

VI. create an empty folder to hold the model files

$ chembfn --create_model_dir {YOUR/MODEL/DIR}

A structured folder YOUR/MODEL/DIR/model will be created.

4. Write the prompt

  • Leave prompt blank for unconditional generation.
  • For standalone models, key in objective values in the format of [a,b,c,...] to pass the values to the model.
  • 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.
  • 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.

5. Advanced control

Under "advanced control" tab

  • You can control semi-autoregressive behaviours by key in F for switching off SAR, T for switching on SAR, and prompt like F,F,T,... to individually control the SAR in an ensemble model.
  • You can add unwanted tokens, e.g., [Cu],p,[Si].
  • You can customise the result preprocessing function, e.g., the model output a reaction SMILES "CCI.C[O-]>>COCC" which couldn't be recognised by RDKit; you can pass lambda x: x.split(">>")[-1] to force the program only looking at the products.

6. Generate molecules

Click "RUN" then here you go! If error occured, please check your prompts and settings.

Where to obtain the models?

Metadata

Release files for chembfn-webui 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chembfn-webui 2.2.2
File Size Uploaded Provenance Actions
chembfn_webui-2.2.2.tar.gz 75.7 kB With provenance Details for chembfn_webui-2.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chembfn-webui 2.2.2
File Interpreter ABI Platform Actions
chembfn_webui-2.2.2-py3-none-any.whl Python 3 none any Details for chembfn_webui-2.2.2-py3-none-any.whl

Total release size: 146.8 kB

Release files / chembfn_webui-2.2.2.tar.gz

Download URL chembfn_webui-2.2.2.tar.gz
Size 75.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c7dbcb5304f935a52513b0672a3dde0ce0893dc837ee986a44fb2ca6f0239174
BLAKE2b-256 checksum
How to use checksums
01b14ea74935673ddff185f84fa0623e7a60f86c1c0b53947a87a466c7ea3a20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / chembfn_webui-2.2.2-py3-none-any.whl

Download URL chembfn_webui-2.2.2-py3-none-any.whl
Size 71.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dd74ebafa1a0cbc297f8df651817c9d63fa10d6af6243ae34878143d259a0d9
BLAKE2b-256 checksum
How to use checksums
4dddc3208d1eb48d44f7d927152be78e7b712b240383200f53545fd68aa4bb73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for chembfn-webui 2.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for chembfn_webui-2.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page