Skip to main content

ChemChat — 化学分子智能对话与可视化系统

面向中小学生的化学学习助手,支持分子2D/3D可视化、LLM智能对话、化学实体自动识别。

安装

pip install chemchat

可选依赖

# RDKit 分子处理(推荐,支持更精确的2D/3D结构生成)
conda install rdkit
# 或
pip install rdkit-pypi

# PySide6 WebEngine(3D分子查看器需要)
pip install PySide6-WebEngine

使用

启动 GUI

chemchat

或在 Python 中:

from chemchat.__main__ import main
main()

Python API

from chemchat.engine.mol_parser import MoleculeParser
from chemchat.engine.entity_extractor import EntityExtractor
from chemchat.engine.element_data import ELEMENTS, format_element_info, get_element
from chemchat.db.knowledge_base import init_db, search_molecules

# 初始化知识库
init_db()

# 分子解析
parser = MoleculeParser()
result = parser.parse("H2O")
print(result["formula"])   # H2O
print(result["elements"])  # ['O', 'H', 'H']

# 实体提取
ext = EntityExtractor()
entities = ext.extract("苯和乙醇是常见溶剂")
# [(苯, c1ccccc1, 0, 1), (乙醇, CCO, 2, 4)]

# 元素信息
info = format_element_info("Fe")
# <b>铁 (Fe)</b>  <i>Iron</i><br>原子序数: 26...

功能特性

  • 分子可视化:2D/3D切换,支持球棒模型、空间填充等多种显示风格
  • 智能对话:集成 Ollama LLM,自动识别对话中的化学物质并可视化
  • 实体提取:自动识别中文化学名、化学式、SMILES等
  • 知识库:内置57+种常见化学物质的详细数据
  • 元素信息:46种常见元素的完整周期表数据,点击原子即时查看
  • 数据库管理:支持CRUD、JSON/CSV导入导出

技术栈

  • PySide6 + WebEngine (3D分子渲染)
  • RDKit (分子结构解析)
  • 3Dmol.js (3D可视化)
  • Ollama (LLM对话)
  • SQLite (知识库)

License

MIT

Metadata

Release files for chemchat 0.1.0

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

Source distribution (sdist)

Source distribution for chemchat 0.1.0
File Size Uploaded Provenance
chemchat-0.1.0.tar.gz 36.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chemchat 0.1.0
File Interpreter ABI Platform
chemchat-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 75.1 kB

Release files / chemchat-0.1.0.tar.gz

Download URL chemchat-0.1.0.tar.gz
Size 36.0 kB
Tags Source
SHA-256 checksum
How to use checksums
47de24edb0de494a93aecf3cfb8b55514b62e9dd383b3e63c59fa7e9974970f8
BLAKE2b-256 checksum
How to use checksums
ccb3170ee87e854ea0a25f2106a9c789f338511d7395ea2f7cee95b377ca71ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / chemchat-0.1.0-py3-none-any.whl

Download URL chemchat-0.1.0-py3-none-any.whl
Size 39.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2b93137b946ae4087f43a911ded2cb282874a2b0a218979c3f8ef4cfa8337cc
BLAKE2b-256 checksum
How to use checksums
0e1f3d81c6c04225bafa195a052028f95271020a3ae4a337426219ac0ad1fc99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for chemchat 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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