Skip to content

Barabama/sof2sg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sof2sg — 从占位分数 (SOF) 到构型熵 (Sconf) 和 Gibbs 自由能 (DeltaG)

计算 FCC / BCC / HCP 等相的构型熵和 Gibbs 自由能,支持 Thermo-Calc、Pandat、课题组自定义三种上游数据格式。

福州大学 MCMF 课题组 © 2026

安装

git clone <repo-url>
cd sof2sg
pip install -e .

依赖:numpy pandas matplotlib openpyxl sympy

使用

图形界面(默认)

python main.py

双击 main.py 或在编译后的 .exe 默认启动 GUI。

命令行

python main.py --cli --tdb <TDB文件> <数据文件.xlsx> [<数据文件.csv> ...]

# 示例
python main.py --cli --tdb ref_tdb/20250516-bcc+fcc+hcp_by-hamid-cxy-wubo.TDB ref_sof_data/tc_exps.xlsx

输入格式

格式 来源 文件类型 说明
tc_exps Thermo-Calc xlsx (多 sheet) 含 G/Y/X 等多个 sheet
pandat Pandat 软件 xlsx / csv 单表,含 phase_name
teacher 课题组自定义 xlsx / csv 列名按亚晶格 #2 标记

格式自动检测,成分信息从数据文件中提取。

输出

  • Sconf_DeltaG_<成分>.xlsx — 5 列数据 (T, DeltaG_real, DeltaG_random, Sconf_real, Sconf_random)
  • Sconf_DeltaG_<成分>.png — 双栏图表 (Sconf-T + DeltaG-T)

测试

pip install -e .
pytest tests/ -v

test_tdb.py 需要 ref_tdb/ 目录存在(本地测试用,CI 跳过)。

构建

Build and Release

使用 Nuitka 编译为独立 Windows 可执行文件:

nuitka --standalone --onefile --enable-plugin=tk-inter --windows-console-mode=disable main.py

许可

课题组内部使用。版权所有 © 2026 MCMF, 福州大学。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages