Skip to main content

化学分子智能对话与可视化系统 — 面向中小学生的化学学习助手

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chemchat-0.1.0.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chemchat-0.1.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file chemchat-0.1.0.tar.gz.

File metadata

  • Download URL: chemchat-0.1.0.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for chemchat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47de24edb0de494a93aecf3cfb8b55514b62e9dd383b3e63c59fa7e9974970f8
MD5 d16171af3b4f61e6833721039e6a38d0
BLAKE2b-256 ccb3170ee87e854ea0a25f2106a9c789f338511d7395ea2f7cee95b377ca71ad

See more details on using hashes here.

File details

Details for the file chemchat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chemchat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for chemchat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2b93137b946ae4087f43a911ded2cb282874a2b0a218979c3f8ef4cfa8337cc
MD5 45028ccc2748e7e8cd2e26719f70c556
BLAKE2b-256 0e1f3d81c6c04225bafa195a052028f95271020a3ae4a337426219ac0ad1fc99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page