[TOC]
ase-gui 1 2 3 4 5 ase-gui CU.cif -o Cu.poscar ase convert Cu.cif Cu.poscar ase-gui 0*/POSCAR
文件批处理 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/bin/env bash FILENAMELIST=$@ for file in $FILENAMELIST do cd $file cp POSCAR old_POSCAR sed -i '$a 6.8920794341203466 8.2498237913018961 10.6854462174986473' POSCAR sed -i '/In/s/$/ H/' POSCAR sed -i '6s/$/ 1/' POSCAR sed -i '/NPAR/d' INCAR cd ../ done
文件对比 vimdiff
等同于 vim -d
命令,即vim编辑器的diff模式。
该命令后面通常会接两个或多个文件名作为参数,这些文件会同时在 Vim 编辑器的分割窗口中打开,并高亮显示文件中内容有差异的部分。它的中文主页是:http://vimcdoc.sourceforge.net/doc/diff.html
.poscar文件单原子替换实例 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #!/bin/env bash FILENAMELIST=$@ for file in $FILENAMELIST do b='.' TEMPFILE=(${file%$b*} ) ELMENTS=(Ti V Zr_sv Cr_pv Ru Os Co Rh Ir Cu_pv Cd_pv Al Ga) for elments in ${ELMENTS[@]} do echo ${elments} mkdir $TEMPFILE -${elments} cd $TEMPFILE -${elments} cp ../$file ./POSCAR sed -i 's/Pd/' "${elments} " '/g' POSCAR cp /home/zhouzm/Documents/SAA-In2O3/c110/ov4/hcoo-saa/KPOINTS ./ cp /home/zhouzm/Documents/SAA-In2O3/c110/ov4/hcoo-saa/INCAR ./ sed -i '/NPAR/d' INCAR cd ../ done done
cif 文件快速转POSCAR,无固定 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #!/bin/env bash FILENAMELIST=$@ for file in $FILENAMELIST do b='.' TEMPFILE=(${file%$b*} ) mkdir $TEMPFILE cd $TEMPFILE echo $TEMPFILE mv ../$file ./ ase-gui $file -o POSCAR cp /home/zhouzm/Documents/In2O3/C110/ov3-co/KPOINTS ./ cp /home/zhouzm/Documents/In2O3/C110/ov3-co/INCAR ./ cd ../ done
命令重命名 ~/.bashrc
文件后添加:
1 2 3 4 5 6 7 alias ....='cd ../../../.. && ls' alias ...='cd ../../../ && ls' alias ..='cd ../../ && ls' alias neb5Poscar='ase-gui 00/POSCAR 01/POSCAR 02/POSCAR 03/POSCAR 04/POSCAR 05/POSCAR 06/POSCAR' alias neb5contcar='ase-gui 01/CONTCAR 02/CONTCAR 03/CONTCAR 04/CONTCAR 05/CONTCAR' alias neb8Poscar='ase-gui 00/POSCAR 01/POSCAR 02/POSCAR 03/POSCAR 04/POSCAR 05/POSCAR 06/POSCAR 07/POSCAR 08/POSCAR 09/POSCAR' alias neb8contcar='ase-gui 01/CONTCAR 02/CONTCAR 03/CONTCAR 04/CONTCAR 05/CONTCAR 06/CONTCAR 07/CONTCAR 08/CONTCAR'
vim显示行号 有root 权限直接修改/etc/vimrc
就行,没有root 权限按照下面方式
1 2 3 4 5 cp /etc/vimrc ~/.vimrc set nu:set nonu
输出频率: 1 2 grep 'f =' OUTCAR | awk '{print $6}' | paste -sd,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 sleep 2 time sleep 2 enable compgen -k if you extend an exported variable, like PATH in .bashrc,it will grow with each nested shell invocation.PATH=$PATH :/usr/local /bin $ add export xyz=$xyz :verygood in .bashrc file $ bash $ echo xyz $bash $ echo xyz