无图形界面服务器(仅SSH登录,普通账户)AI Agent 交互部署与测试(千问&kimi)
笔者前段时间写过一些在wsl或虚拟机里面运行安装AI交互的教程,

如何在linux系统上安装AI让它自己跑VASP

DeepSeek 集群服务器无root本地部署指南

但很多服务器仍在使用centOS6/7或其他版本,同时因为具有很多年的传承和数据积累,不可能进行系统升级和改造,所以这里找了另一种方法来实现AI助手的实时交互。

尝试部署了两款终端AI编程助手——Qoder CLI CN 和 Kimi Code CLI

实测环境:CentOS 7 · 仅SSH登录 · 无浏览器

一、Qoder CLI CN:开箱即用的零依赖方案

  1. 安装
    Qoder CLI CN 支持 macOS、Linux 和 Windows(Windows Terminal),覆盖 arm64 和 amd64 两种架构。在老旧 Linux 服务器上,只需一行命令:

curl -fsSL https://qoder.cn/install | bash
安装完成后验证:

qoderclicn --version
优势:Qoder 是独立二进制文件,无需预装任何运行时(不需要 Node.js、Python 或任何包管理器),对老旧系统极其友好。

  1. 首次启动与信任文件夹
    在项目目录中运行 qoderclicn,CLI 会询问是否信任当前文件夹:

$ qoderclicnDo you trust the files in this folder?
────────────────────────────────────────────────
Please confirm this is your own project or from a trusted source.
Once trusted, Qoder CLI CN can read, modify, and execute files here
./public/data/jisuan/c/sqs/❯

  1. Trust folder

  2. Don't trust and exit
    选择 “Trust folder” 后,Qoder 即可读取、修改和执行该目录下的文件,并加载本地配置(如 AGENTS.md)。

  3. 登录认证(纯SSH环境的关键点)
    Qoder 提供两种认证方式:

交互式登录(推荐)
:输入 /login,CLI 会尝试打开浏览器跳转到 QoderCN 平台。但在纯 SSH 环境中,浏览器无法启动,这种方式不适用。
Personal Access Token(适合无图形界面)
:先在 QoderCN 网页端生成 Token,然后在终端设置环境变量:
export QODERCN_PERSONAL_ACCESS_TOKEN="你的令牌"
qoderclicn

实测结论:Token 方式在纯 SSH 环境下完美工作,一次配置,后续会话自动生效。

  1. 交互界面
    登录后进入 TUI 交互界面,核心由输入框、对话视图和状态栏组成:

图片
常用操作:

输入自然语言提问,按 Enter 发送
使用 @path/to/file 引用项目文件
按 /help 查看所有命令
按 Shift+Tab 接受代码编辑建议
5. 升级与登出

手动升级

curl -fsSL https://qoder.cn/install | bash -s -- --force

登出(交互界面内)

/logout

二、Kimi Code CLI:开源但依赖更重
Kimi Code CLI 是月之暗面开源的终端 AI 编程 Agent[reference:0][reference:1]。它能够读取和编辑代码、执行 Shell 命令、搜索文件、抓取网页,并根据反馈自主规划下一步行动[reference:2]。

  1. 安装
    Kimi 提供两种安装方式[reference:3]:

方式一:官方安装脚本(推荐)

macOS / Linux

curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

Windows (PowerShell)

irm https://code.kimi.com/kimi-code/install.ps1 | iex
脚本会自动下载最新版本、校验 checksum,并将 kimi 可执行文件放到 PATH 中[reference:4][reference:5]。

方式二:npm 全局安装

需要 Node.js 22.19.0 或更高版本[reference:6]

npm install -g @moonshot-ai/kimi-code

或使用 pnpm

pnpm add -g @moonshot-ai/kimi-code

老旧服务器的隐患:Kimi CLI 以 TypeScript 编写,通过 npm 分发,运行在 Node.js 之上[reference:7][reference:8]。这意味着:

需要先安装 Node.js 22.19.0+[reference:9]—— 而 CentOS 7 默认仓库中只有 Node.js 10.x,需要手动编译或使用 nvm 安装更高版本
Windows 用户还需要安装 Git for Windows,因为 Kimi 会使用其中的 Git Bash 作为 Shell 环境[reference:10][reference:11]
安装完成后验证:

kimi --version

  1. 首次启动与登录认证
    进入项目目录后运行 kimi 启动交互界面[reference:12]:

cd your-project
kimi

首次启动时需要配置 API 来源。在交互界面中输入 /login 进入登录流程[reference:13][reference:14]:

/login
/login opens a platform selector supporting two options:
❯ 1. Kimi Code (OAuth) — device-code flow
2. Kimi Platform API key
Kimi Code(OAuth)
:设备码流程,在任意设备打开链接、登录并输入验证码即可授权[reference:15][reference:16]。纯 SSH 环境同样适用,因为只需要在本地浏览器打开链接输入验证码。
Kimi Platform API 密钥
:输入来自 platform.kimi.com 的 API 密钥[reference:17]。
实测结论:Kimi 的 OAuth 设备码流程对纯 SSH 环境非常友好——不需要浏览器弹出,只需复制链接在本地设备上完成授权即可。

  1. 交互界面
    Kimi Code CLI 以全交互式 TUI 运行,核心由输入框、对话视图和状态栏三部分组成[reference:18]。特色功能包括:

图片与视频粘贴
:支持在输入框中直接粘贴图片和视频,让 AI 结合视觉内容理解问题[reference:19]
Thinking 模式
:使用 /model 命令切换,让 AI 在回答前进行更深入的思考[reference:20]
双模式切换
:按 Ctrl-X 在 Agent 模式和 Shell 模式之间切换[reference:21]
YOLO 模式
:使用 kimi --yolo 跳过所有确认,AI 自动执行所有操作[reference:22]
常用斜杠命令[reference:23]:

命令
说明
/help
显示帮助信息
/login
登录授权
/model
切换模型和 Thinking 模式
/sessions
列出和切换会话
/clear
清空当前上下文
/compact
压缩上下文
/init
生成 AGENTS.md
/exit
退出 CLI
4. 升级与卸载

升级

kimi upgrade

或通过 npm 升级

npm install -g @moonshot-ai/kimi-code@latest

卸载(脚本安装)

删除 kimi 可执行文件

卸载(npm 安装)

npm uninstall -g @moonshot-ai/kimi-code

三、核心对比:一张表看懂区别
对比项
Qoder CLI CN
Kimi Code CLI
安装命令 curl -fsSL https://qoder.cn/install | bash curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
核心依赖 无(独立二进制) Node.js 22.19.0+ / Python(旧版)
[reference:24]
开源协议
未明确(阿里云商业产品)
Apache 2.0 开源
[reference:25]
认证方式
浏览器登录 / Personal Access Token
OAuth 设备码 / API 密钥[reference:26]
纯SSH环境适配 Token 方式完美支持 OAuth 设备码完美支持
多模态支持
文本为主
支持图片、视频直接粘贴
[reference:27]
交互模式
TUI 交互模式 / Print 模式[reference:28]
Agent 模式 / Shell 模式(Ctrl-X 切换)[reference:29]
YOLO/自动模式
支持(Shift+Tab / Ctrl+Y 切换)[reference:30]
支持(--yolo / /yolo)[reference:31]
Plan Mode
支持
支持(/plan on)[reference:32]
会话管理
支持
支持(/sessions)[reference:33]
Windows 额外要求
推荐 Git Bash 或 WSL[reference:34]
必须安装 Git for Windows
[reference:35]

如果你面对的是这样的环境:

CentOS 7 / RHEL 7 等老旧系统,默认软件源版本低
只有 SSH 访问,无图形界面
不想折腾 Node.js / Python 环境编译
→ 优先选择 Qoder CLI CN

零依赖、开箱即用,Token 认证完美适配纯 SSH 环境。

如果你的环境满足以下条件:

系统较新,或愿意手动安装 Node.js 22+
偏好开源方案,希望代码透明可审计
需要多模态能力(图片/视频输入)
→ 可以尝试 Kimi Code CLI

OAuth 设备码流程对 SSH 环境同样友好,但需提前解决 Node.js 依赖问题。

两款工具都能在纯 SSH 环境中完成部署和使用,核心差异在于 Qoder 的零依赖 与 Kimi 的开源生态和多模态能力 之间的权衡。根据你的服务器条件和实际需求选择即可。

相关链接

Qoder CLI CN 官方文档

Kimi Code CLI GitHub 仓库

Kimi Code CLI 官方文档

使用示例:给我看一下当前文件夹里有哪些内容,分析一下所有的文件功能

给我看一下当前文件夹里有哪些内容,分析一下所有的文件功能

Thinking
│ Let me look at the current directory contents.
▪ Bash(ls -la /public/data/luo_x//c/sqs/bash/gm)
└ total 188
drwxr-xr-x 3 liwh225 eln_grp 4096 Aug 2 18:43 .
drwxr-xr-x 5 liwh225 eln_grp 4096 Aug 2 03:58 ..
… +13 lines (Ctrl+O to expand)

Thinking
│ Let me read the key files to understand their purpose.
▪ Read(/public/.../c/sqs/bash/gm/lat.in)
└ Read 9 lines
▪ Read(/public/.../c/sqs/bash/gm/POSCAR)
└ Read 13 lines
▪ Read(/public/.../c/sqs/bash/gm/rndstr.in)
└ Read 9 lines
▪ Read(/public/.../bash/gm/clusters.out)
└ Read 37 lines
▪ Read(/public/.../sqs/bash/gm/sqscell.out)
└ Read 15 lines
▪ Read(/public/.../c/sqs/bash/gm/mcsqs.log)
└ Read 4 lines
▪ Read(/public/.../gm/mcsqs_search.log)
└ Read 2 lines
▪ Read(/public/.../bash/gm/corrdump.log)
└ Read 8 lines
▪ Read(/public/.../bash/gm/rndstrgrp.out)
└ Read 12 lines
▪ Read(/public/.../c/sqs/bash/gm/sqs.sh)
└ Read 1532 lines

Thinking
│ Let me also check the sym.out file and the atat_sqs_work directory.
▪ Read(/public/.../c/sqs/bash/gm/sym.out · lines 1-10)
└ Read lines 1-10 of 1154

Thinking
│ Now I have a comprehensive picture of all the files. Let me summarize the analysis.
▪ 以下是当前目录所有文件的分析:


项目概述

这是一个 ATAT-SQS (Special Quasirandom Structure) 构建工具的工作目录,用于生成高熵合金/无序固溶体的 SQS 结构,供 VASP 等第一性原理软件使用。核心是一个名为 sqs.sh /
sqs2.sh 的交互式 Bash 脚本(v3.1),内嵌 Python 晶体学引擎。


文件逐一分析

主脚本
┌──────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 文件 │ 功能 │
├──────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ sqs.sh / │ 主程序(两者内容相同,约60KB)。ATAT-SQS Builder │
│ sqs2.sh │ v3.1,提供9步交互式菜单流程:结构选择→lat.in生成→占位设计→超胞规划→rndstr.in生成→ATAT预计算→sqscell管理→mcsqs优化→结果解析输出POSCAR │
└──────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
输入文件(ATAT工具链)
┌───────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 文件 │ 功能 │
├───────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ lat.in │ ATAT 晶格输入文件。定义 FCC 原胞(a=4.0),4个Si位点,每个位点占位为 Ni=0.333, Co=0.333, Cr=0.334(三元高熵合金) │
├───────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ rndstr.in │ ATAT 随机结构输入。定义晶格+各site的混合占位比例,供 corrdump 和 mcsqs 使用 │
└──────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
输入文件(ATAT工具链)
┌───────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 文件 │ 功能 │
├───────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ lat.in │ ATAT 晶格输入文件。定义 FCC 原胞(a=4.0),4个Si位点,每个位点占位为 Ni=0.333, Co=0.333, Cr=0.334(三元高熵合金) │
├───────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ rndstr.in │ ATAT 随机结构输入。定义晶格+各site的混合占位比例,供 corrdump 和 mcsqs 使用 │
├───────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ POSCAR │ VASP 格式的初始结构文件(FCC conventional,4个Si原子,a=4.0),作为脚本的输入模板 │
└───────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
输出/中间文件(ATAT工具链生成)
┌──────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 文件 │ 功能 │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
└───────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
输出/中间文件(ATAT工具链生成)
┌──────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 文件 │ 功能 │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ clusters.out │ corrdump 输出的团簇列表(6组点对/多体团簇,含多重度和距离) │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ corrdump.log │ corrdump 运行日志 — 警告"unit cell is not primitive"(原胞非初基) │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ mcsqs.log │ mcsqs 运行日志 — 显示"Generating/Initializing random supercells" │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ mcsqs_search.log │ mcsqs 搜索日志 — 报错"Impossible to match point correlations due to incompatible supercell size"(超胞尺寸不匹配) │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ rndstrgrp.out │ rndstrgrp 输出 — 处理后的随机结构分组信息 │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ sqscell.out │ 超胞矩阵文件 — 定义3x3变换矩阵(此处为3个正交方向各2倍扩胞) │
├──────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ sym.out │ 对称性分析输出 — 列出192个对称操作(FCC的高对称性) │
└──────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
工作子目录
┌───────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 目录 │ 功能 │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ atat_sqs_work │ 脚本运行时的工作目录,包含:bestsqs.out(最优SQS结果)、POSCAR_sqs(最终输出的VASP结构)、POSCAR_input、.session(会话记忆)、sqscell.out.bak(备 │
│ / │ 份)等 │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

└──────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
工作子目录
┌───────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 目录 │ 功能 │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ atat_sqs_work │ 脚本运行时的工作目录,包含:bestsqs.out(最优SQS结果)、POSCAR_sqs(最终输出的VASP结构)、POSCAR_input、.session(会话记忆)、sqscell.out.bak(备 │
│ / │ 份)等 │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

工作流程总结
POSCAR → lat.in → corrdump → getclus → mcsqs(初算) → sqscell.out → mcsqs -rc(优化) → bestsqs.out → POSCAR_sqs
目标体系是 Ni-Co-Cr 三元等摩尔 FCC 高熵合金,晶格常数 a=4.0 Å。当前运行中存在超胞尺寸匹配问题(mcsqs_search.log 报错),可能需要调整超胞大小。

│ atat_sqs_work │ 脚本运行时的工作目录,包含:bestsqs.out(最优SQS结果)、POSCAR_sqs(最终输出的VASP结构)、POSCAR_input、.session(会话记忆)、sqscell.out.bak(备 │
│ / │ 份)等 │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

工作流程总结
POSCAR → lat.in → corrdump → getclus → mcsqs(初算) → sqscell.out → mcsqs -rc(优化) → bestsqs.out → POSCAR_sqs
目标体系是
图片
图片
图片
图片

使用示例2 分析一下这个文件夹里的所有文件并给我提出优化建议

分析一下这个文件夹里的所有文件并给我提出优化建议 /public/data/jisuan/In-Te/inte/me/

Thinking
│ Let me explore the directory and read all the files.
▪ Bash(ls -laR /public/data/jisuan/In-Te/inte/me/)
└ /public/data/jisuan/In-Te/inte/me/:
total 559784
drwxr-xr-x 2 eln_grp 4096 Jul 30 20:25 .
… +20 lines (Ctrl+O to expand)

Thinking
│ This is a VASP calculation directory. Let me read the key files to understand the calculation setup and results.
▪ Read(/public/data/jisuan/In-Te/inte/me//INCAR)
▪ Bash(ls -laR/public/data/jisuan/In-Te/inte/me/)
└ /public/data/public/data/jisuan/In-Te/inte/me/:
total 559784
drwxr-xr-x 2 eln_grp 4096 Jul 30 20:25 .
… +20 lines (Ctrl+O to expand)

Thinking
│ This is a VASP calculation directory. Let me read the key files to understand the calculation setup and results.
▪ Read(/public/.../In-Te/inte/me/INCAR)
└ Read 30 lines
▪ Read(/public/.../In-Te/inte/me/POSCAR)
└ Read 93 lines
▪ Read(/public/.../In-Te/inte/me/KPOINTS)
└ Read 10 lines

Thinking
│ This is a VASP calculation directory. Let me read the key files to understand the calculation setup and results.
▪ Read(/public/.../In-Te/inte/me/INCAR)
└ Read 30 lines
▪ Read(/public/.../In-Te/inte/me/POSCAR)
└ Read 93 lines
▪ Read(/public/.../In-Te/inte/me/KPOINTS)
└ Read 10 lines
▪ Read(/public/.../In-Te/inte/me/KPATH.in)
└ Read 32 lines
▪ Read(/public/.../In-Te/inte/me/VPKIT.in)
└ Read 7 lines
▪ Read(/public/.../In-Te/inte/me/OSZICAR)
▪ Read(/public/.../In-Te/inte/me/POSCAR)
└ Read 93 lines
▪ Read(/public/.../In-Te/inte/me/KPOINTS)
└ Read 10 lines
▪ Read(/public/.../In-Te/inte/me/KPATH.in)
└ Read 32 lines
▪ Read(/public/.../In-Te/inte/me/VPKIT.in)
└ Read 7 lines
▪ Read(/public/.../In-Te/inte/me/OSZICAR)
└ Read 30 lines
▪ Read(/public/.../In-Te/inte/me/CONTCAR)
└ Read 178 lines
▪ Read(/public/.../In-Te/inte/me/OUTCAR · lines 1-100)
└ Read lines 1-100 of 5158

Thinking
│ Let me read more of the OUTCAR to get key information like energy convergence, band gap, k-points used, and other important details.
▪ Let me check more details from OUTCAR and the parent directory structure.

▪ Bash(grep -n "ENCUT|k-points|NKPTS|energy without entropy|E0|band gap|E-fermi|volume|LATTYP|SPGR|number of bands|NBANDS|NELECT|EATOM|total
time|Elaps…)
└ 53: EATOM = 1576.8302 eV, 115.8937 Ry
121: EATOM = 223.2721 eV, 16.4100 Ry
197: energy of atom 1 EATOM=-1576.8302
… +47 lines (Ctrl+O to expand)

▪ Bash(ls -la /public/data///jisuan/c/In-Te/inte/)
└ total 36
drwxr-xr-x 4 eln_grp 4096 Jul 29 01:13 .
time|Elaps…)
└ 53: EATOM = 1576.8302 eV, 115.8937 Ry
121: EATOM = 223.2721 eV, 16.4100 Ry
197: energy of atom 1 EATOM=-1576.8302
… +47 lines (Ctrl+O to expand)

▪ Bash(ls -la /public/data///jisuan/c/In-Te/inte/)
└ total 36
drwxr-xr-x 4 eln_grp 4096 Jul 29 01:13 .
drwxr-xr-x 4 eln_grp 4096 Jul 29 00:27 ..
… +5 lines (Ctrl+O to expand)

▪ Read(/public/.../In-Te/inte/me/DOSCAR · lines 1-10)
└ Read lines 1-10 of 308

Thinking
│ Let me also check the band structure directory and get more details about the calculation.
▪ Bash(ls -la /public/data///jisuan/c/In-Te/inte/band/)
└ total 4411368
drwxr-xr-x 2 eln_grp 4096 Jul 29 06:00 .
drwxr-xr-x 4 eln_grp 4096 Jul 29 01:13 ..
… +48 lines (Ctrl+O to expand)

▪ Bash(grep -n "SPGR|POTCAR.*PAW|ENCUT|PREC|k-points in reciprocal" /public/data/public/data/jisuan/In-Te/inte/me/OUTCAR | head -20)
└ 16: PREC = Normal (Precision level)
26: POTCAR: PAW_PBE In_d 06Sep2000
27: POTCAR: PAW_PBE Te 08Apr2002
… +5 lines (Ctrl+O to expand)

▪ Bash(grep -A2 "k-points in reciprocal" /public/data/public/data/jisuan/In-Te/inte/me/OUTCAR | head -20)
└ k-points in reciprocal lattice and weights: Parameters to Generate KPOINTS (Do NOT E
0.00000000 0.00000000 0.00000000 0.167
0.00000000 0.16666667 0.00000000 0.167

Thinking
│ Now let me check the band gap and other key results.
▪ Read(/public/.../inte/band/BAND_GAP)
└ Read 12 lines
▪ Read(/public/.../inte/band/FERMI_ENERGY)
└ Read 3 lines
▪ Read(/public/.../In-Te/inte/band/INCAR)
└ Read 31 lines

Thinking
│ Now I have a comprehensive picture. Let me also check the PCDAT and VPKIT.in files.
▪ Read(/public/.../In-Te/inte/me/PCDAT)
└ Read 12 lines

▪ Bash(grep -n "SPGR|space group|k-points generation|GAMMA|Monkhorst|density" /public/data/public/data/jisuan/In-Te/inte/me/OUTCAR | head -20)
└ 99: partial kinetic energy density read in
167: partial kinetic energy density read in
351: Subroutine GETGRP returns: Found 4 space group operations
… +17 lines (Ctrl+O to expand)

▪ Bash(grep -n "total energy|energy without entropy|free energy" /public/data/public/data/jisuan/In-Te/inte/me/OUTCAR)
└ 1017: total energy-change (2. order) : 0.3871030E+04 (-0.1815118E+05)
1053: total energy-change (2. order) :-0.3725906E+04 (-0.3605844E+04)
1089: total energy-change (2. order) :-0.3992988E+03 (-0.3937825E+03)
… +26 lines (Ctrl+O to expand)

Thinking
│ Now I have a comprehensive picture of the entire calculation. Let me compile the analysis and optimization suggestions.
│ Key findings:
│ … +22 rows (Ctrl+O)
│ is taking up 526 MB of disk space, and both LWAVE and LCHARG are set to TRUE, which generates large files—for a 84-atom system this becomes a significant storage
│ burden. The SCF convergence took 27 iterations to reach the target, which is acceptable but suggests the calculation could be more efficient. The VPKIT.in and KPATH.in
│ files appear to be configuration inputs for VASPKIT, with the latter specifying a k-path for band structure calculations.
▪ 以下是对该目录所有文件的完整分析和优化建议。


一、文件清单与功能分析

体系基本信息

  • 材料: In₂Te₅ (In24Te60),84 原子超胞
  • 晶格: 单斜 (monoclinic),base-centered,空间群 C₂ₕ,仅4个对称操作
  • 体积: 3116.61 ų
  • 价电子数: 672 (In_d: 13e⁻ × 24 + Te: 6e⁻ × 60)

输入文件
┌──────────┬────────┬───────────────────────────────────────────────────────────────────────────────────┐
│ 文件 │ 大小 │ 功能 │
├──────────┼────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ INCAR │ 1.6 KB │ VASP 主参数文件。ISPIN=1, PREC=Normal, ISMEAR=0, SIGMA=0.05, EDIFF=1E-08, NELM=90 │
├──────────┼────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ POSCAR │ 5.1 KB │ 初始结构,In24Te60,单斜超胞 (a=16.96, b=4.37, c=42.06) │
├──────────┼────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ KPOINTS │ 512 B │ 仅 6个显式k点(沿Γ→b*方向),由 VASPKIT 生成,间距 0.04 │
├──────────┼────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ KPATH.in │ 1.3 KB │ VASPKIT 高对称k路径定义(用于能带计算) │
├──────────┼────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ VPKIT.in │ 53 B │ VASPKIT 配置文件(截断半径 0.015,选择 2 个方向) │
├──────────┼────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ POTCAR │ 454 KB │ PAW 赝势:In_d (06Sep2000) + Te (08Apr2002),PBE │
└──────────┴────────┴───────────────────────────────────────────────────────────────────────────────────┘
输出文件
┌──────────────┬───────────────┬──────────────────────────────────────────┐
│ 文件 │ 大小 │ 功能/状态 │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ OUTCAR │ 212 KB │ 完整计算日志,27步DAV收敛 │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ OSZICAR │ 2.6 KB │ SCF 迭代摘要,最终 E = -268.679 eV │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ CONTCAR │ 10 KB │ 最终结构(与POSCAR几乎一致,无离子弛豫) │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ EIGENVAL │ 93 KB │ 本征值,416条能带 │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ DOSCAR │ 11 KB │ 态密度,84个k点网格,费米能 4.481 eV │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ CHG / CHGCAR │ 18 MB / 27 MB │ 电荷密度 │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ WAVECAR │ 526 MB │ 波函数文件(巨大) │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ vasprun.xml │ 163 KB │ XML格式完整输出 │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ vaspout.h5 │ 678 KB │ HDF5格式输出 │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ XDATCAR │ 3.4 KB │ 离子轨迹(仅1帧,无离子步) │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ PCDAT │ 234 B │ 投影电荷密度参数 │
├──────────────┼───────────────┼──────────────────────────────────────────┤
│ REPORT │ 0 B │ 空文件 │
└──────────────┴───────────────┴──────────────────────────────────────────┘
上级目录结构
┌────────────────────────────┬──────────────────────────────────────────────────────────┐
│ 路径 │ 说明 │
├────────────────────────────┼──────────────────────────────────────────────────────────┤
│ ../band/ │ 已完成能带+DOS后处理计算(含能带图、PDOS图、BAND_GAP等) │
├────────────────────────────┼──────────────────────────────────────────────────────────┤
│ ../In2Te5.cif │ 原始 CIF 晶体学文件 │
├────────────────────────────┼──────────────────────────────────────────────────────────┤
│ ../In2Te5.vasp / ../POSCAR │ 初始 POSCAR 源文件 │
└────────────────────────────┴──────────────────────────────────────────────────────────┘
关键计算结果

  • 总能: -268.679 eV
  • 费米能: 4.481 eV
  • 带隙: 0.850 eV(间接带隙,VBM在Y₂,CBM在Γ)
  • 收敛: 27步DAV达到 EDIFF=1E-08

二、发现的问题与优化建议

  1. ENCUT 过低 (严重)

INCAR 中 ENCUT 被注释掉了,VASP 自动使用了 POTCAR 中 In_d 的 ENMAX = 239.2 eV。这对任何精度的计算都偏低。
建议: ENCUT = 400 ~ 520 eV (ENMAX × 1.5 ~ 2.0)
影响: 截断能不足会导致总能、力和应力不收敛,带隙值可能不准确。

  1. PREC = Normal (重要)

当前精度为 Normal,而 band 目录中已正确设置为 Accurate。对于静态自洽计算,应使用 PREC = Accurate 以避免混叠误差。

  1. K点采样严重不足 (严重)

仅 6 个 k 点,对于 84 原子、3116 ų 的超胞来说远远不够。虽然超胞大导致布里渊区缩小,但 6 个k点仍过于稀疏,尤其 c* 方向(c=42 Å 很长,但倒空间 b* = 4.37 Å 很短)。
建议: 至少使用 Gamma-centered 3×6×1 或更密的网格
或用 VASPKIT 按 0.02~0.03 Å⁻¹ 间距自动生成
4. 未设置 NCORE (性能问题)

OUTCAR 明确警告 NCORE=1 效率极低。band 目录已正确设置 NCORE=2,但 me 目录未设置。
建议: 添加 NCORE = 2 ~ 4 (取决于每socket核心数)
影响: 32核运行,NCORE=2 预计可提速 30-50%。

  1. 缺少 LASPH = .TRUE. (重要)

单斜体系角度自由度多,LASPH 对总能和带隙精度有显著影响。band 目录已设置,但 me 目录未设置。
建议: 添加 LASPH = .TRUE.
6. 缺少 LORBIT (功能缺失)

当前计算没有设置 LORBIT,因此无法获得元素/轨道分辨的投影 DOS。对于 In-Te 这种多元素体系,PDOS 分析很重要。
建议: 添加 LORBIT = 11 (配合 RWIGS 或使用 PAW 投影)
7. WAVECAR 占用过大 (存储问题)

WAVECAR 占 526 MB,加上 CHGCAR 27 MB,对于这个体系偏大。如果不需要后续从 WAVECAR 重启,可关闭。
建议: LWAVE = .FALSE. (除非后续能带计算需要)
LCHARG = .TRUE. (保留 CHGCAR 供能带计算使用)
8. 未进行离子弛豫

CONTCAR 与 POSCAR 坐标几乎完全一致(仅小数精度差异),说明这是一个单点能计算,没有做结构优化。如果初始结构未经充分弛豫,后续所有性质的可靠性都会打折扣。
建议: 在静态计算前,先进行 ISIF=3 的离子+晶胞弛豫
IBRION=2, NSW=100, EDIFFG=-0.01
9. SIGMA 偏小

SIGMA=0.05 eV 对 ISMEAR=0 (Gaussian) 来说偏小,可能导致 k 点采样不足时出现数值噪声。对于带隙 ~0.85 eV 的半导体,0.05 可以接受但建议测试收敛性。
建议: 测试 SIGMA = 0.05, 0.1, 0.2 对总能的影响
或改用 ISMEAR = -5 (tetrahedron method) 更适合半导体
10. 磁盘空间浪费

整个目录约 560 MB,其中 WAVECAR (526 MB) 占 94%。band 目录更是达到 4.4 GB(WAVECAR 3.97 GB)。
建议: 完成能带计算后,删除 me/ 和 band/ 中的 WAVECAR
保留 CHGCAR 即可

三、推荐的优化 INCAR
INCAR (me/ 静态自洽计算):
SYSTEM = In2Te5_SCF
ENCUT = 450 ! 从239提高到450 eV
PREC = Accurate ! 从Normal提高到Accurate
ISPIN = 1
ISMEAR = 0
SIGMA = 0.05
EDIFF = 1E-06 ! 1E-08对SCF过严,1E-06足够
NELM = 100
NELMIN = 6
LREAL = .FALSE.
LWAVE = .FALSE. ! 不写WAVECAR,节省500MB+
LCHARG = .TRUE. ! 保留CHGCAR供能带用
ADDGRID= .TRUE.
LASPH = .TRUE. ! 单斜体系必须
LORBIT = 11 ! 输出投影DOS
NCORE = 4 ! 32核/4=8轨道每组,性能最优

四、总结
┌────────┬────────────────┬──────────────────────┐
│ 优先级 │ 问题 │ 影响 │
├────────┼────────────────┼──────────────────────┤
│ 高 │ ENCUT=239 太低 │ 结果精度不可靠 │
├────────┼────────────────┼──────────────────────┤
│ 高 │ 仅6个k点 │ 布里渊区采样严重不足 │
├────────┼────────────────┼──────────────────────┤
│ 高 │ 未做离子弛豫 │ 结构可能不在平衡态 │
├────────┼────────────────┼──────────────────────┤
│ 中 │ PREC=Normal │ 存在混叠误差 │
├────────┼────────────────┼──────────────────────┤
│ 中 │ 缺少LASPH │ 单斜体系精度受损 │
├────────┼────────────────┼──────────────────────┤
│ 中 │ 缺少LORBIT │ 无法分析PDOS │
├────────┼────────────────┼──────────────────────┤
│ 低 │ NCORE=1 │ 计算效率低30-50% │
├────────┼────────────────┼──────────────────────┤
│ 低 │ WAVECAR占用大 │ 浪费~500MB磁盘 │
└────────┴────────────────┴──────────────────────┘
建议重新运行 SCF 计算时使用上述优化参数,并在 SCF 之前先做结构弛豫。
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Next 1 Extract the final total energy value from OUTCAR
2 Analyze k-point convergence or recommend a denser mesh for band structure calculation
3 Check INCAR parameters for spin polarization and magnetic ordering
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Shift+Tab to Accept Edits 14 skills
────────────────────