#!/usr/bin/env bash ## To use it ## fix.sh 4 POSCAR will fix the bottom 4 layers of POSCAR in all image filders ## fix.sh 2 CONTCAR will fix the bottom 2 layers of CONTCAR in all image folders ## The old POSCAR or CONTCAR will be replaced.
for i in 0* ; do cd$i; echo"$1" | POSCARtoolkit.py -i "$2" -f; mv ${2}_C "$2" cd$OLDPWD done
Ru H 1.00000000000000 8.1377999784000004 0.0000000000000000 0.0000000000000000 4.0688999892000002 7.0475415119999996 0.0000000000000000 0.0000000000000000 0.0000000000000000 21.5631999968999999 Ru H 36 1 Selective dynamics Direct 0.2212968850718230 0.2239409561475650 0.2936169649913790 F F F 0.2210036114118170 0.5561663540453879 0.2936884876706930 F F F 0.2212954084343650 0.8880992570872690 0.2936171801115680 F F F 0.5547059120221930 0.2208073369214740 0.2945957656788490 F F F 0.5547051050620690 0.5578229108467880 0.2945953069057910 F F F 0.5572530259134471 0.8880427972121010 0.2935860240494040 F F F 0.8910551675972660 0.2211397177458350 0.2944546614649750 F F F 0.8893412673473050 0.5559102687354450 0.2935156586054220 F F F 0.8893404937786400 0.8880862995751930 0.2935168781920150 F F F 0.1119432861914480 0.1106972088633780 0.1977748273385700 F F F 0.1112675774095350 0.4441060896203480 0.1977506775579700 F F F 0.1112675246777360 0.7779649556723670 0.1977514668340350 F F F 0.4440066349954530 0.1106943439331120 0.1977106006833940 F F F 0.4446549772136020 0.4443417041956370 0.1981365664070010 F F F 0.4440061461204080 0.7786377563630820 0.1977110173547200 F F F 0.7777009262273890 0.1113226147079440 0.1980782640541890 F F F 0.7777006933574599 0.4443146361556100 0.1980780083860340 F F F 0.7774653980933121 0.7779366397494840 0.1977260420610920 F F F 0.2222233413377670 0.2222233413358840 0.0992873228095945 F F F 0.2222233413377670 0.5555566746692190 0.0992873228095945 F F F 0.2222233413377670 0.8888900080025550 0.0992873228095945 F F F 0.5555566746710950 0.2222233413358840 0.0992873228095945 F F F 0.5555566746710950 0.5555566746692190 0.0992873228095945 F F F 0.5555566746710950 0.8888900080025550 0.0992873228095945 F F F 0.8888900080044310 0.2222233413358840 0.0992873228095945 F F F 0.8888900080044310 0.5555566746692190 0.0992873228095945 F F F 0.8888900080044310 0.8888900080025550 0.0992873228095945 F F F 0.1111100016643290 0.1111100016603930 0.0000000000000000 F F F 0.1111100016643290 0.4444433349937280 0.0000000000000000 F F F 0.1111100016643290 0.7777766683270571 0.0000000000000000 F F F 0.4444433349976650 0.1111100016603930 0.0000000000000000 F F F 0.4444433349976650 0.4444433349937280 0.0000000000000000 F F F 0.4444433349976650 0.7777766683270571 0.0000000000000000 F F F 0.7777766683310010 0.1111100016603930 0.0000000000000000 F F F 0.7777766683310010 0.4444433349937280 0.0000000000000000 F F F 0.7777766683310010 0.7777766683270571 0.0000000000000000 F F F 0.6419725686006360 0.3456803556224560 0.3432239557346220 T T T