计算化学公社

 找回密码 Forget password
 注册 Register

VASP slow growth后数据处理

查看数: 471 | 评论数: 1 | 收藏 Add to favorites 3
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2026-4-2 15:27

正文摘要:

本帖最后由 qqzhang 于 2026-4-2 15:27 编辑 vasp slow growth的后数据处理一直都是自己写的代码进行后数据处理,例如J. Am.Chem. Soc. 2020, 142, 5773-5777.“we have home-made codes/scripts to post-process ...

回复 Reply

qqzhang 发表于 Post on 2026-5-14 19:48:03
修改:增加了打印最大积分值对应的步数,方便ovito下载所需的结构
  1. grep cc REPORT | awk '{print $3}' > cc.dat
  2.         grep b_m REPORT | awk '{print $2}' > bm.dat

  3.         read -p "ICONST设置的键数: " period
  4.         read -p "需要查看的键的排名: " index

  5.         sed -n "${index}~${period}p" bm.dat > bm.txt
  6.         sed -n "${index}~${period}p" cc.dat > cc.txt

  7.         first=$(head -n1 cc.txt)
  8.         last=$(tail -n1 cc.txt)

  9.         echo -e "\n"
  10.         echo "积分完成,结果已保存到 integral.dat"
  11.         echo "从 $first Å 迭代到 $last Å"

  12.         paste cc.txt bm.txt | awk 'NR==1 {x_prev=$1;y_prev=$2;sum=0;max=0;max_x=$1;max_step=0;print $1,$2,0;next} {dx=$1-x_prev;sum+=dx*($2+y_prev)/2;if(NR==2||sum>max){max=sum;max_x=$1;max_step=NR-1} print $1,$2,sum;x_prev=$1;y_prev=$2} END {printf "Max Integral: %.6f eV at x = %.6f Å (step %d)\n",max,max_x,max_step>"/dev/stderr"}' > integral.dat
  13.             ;;
复制代码

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-5-30 14:57 , Processed in 3.363780 second(s), 27 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list