vasputils 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +49 -28
- data/Gemfile +10 -9
- data/VERSION +1 -1
- data/{test/vaspgeometryoptimizer/ended-Iter1/try00/CONTCAR → bin/changeincar} +0 -0
- data/bin/checkvasp +106 -75
- data/bin/genincar +4 -4
- data/bin/genkpoints +13 -13
- data/bin/genpotcar +2 -2
- data/bin/latticeconstants +10 -12
- data/bin/qsubvasp +63 -80
- data/bin/resetvaspdir +51 -0
- data/bin/resetvaspgeomopt +73 -0
- data/bin/runvasp +42 -49
- data/bin/runvaspdir +19 -0
- data/bin/runvaspgeomopt +19 -0
- data/bin/showvaspdir +171 -0
- data/bin/showvaspgeomopt +83 -0
- data/bin/symposcar +89 -113
- data/bin/varycondition +28 -0
- data/example/dot.vasputils +26 -232
- data/lib/vasputils/conditionvarier.rb +157 -0
- data/lib/vasputils/incar.rb +40 -43
- data/lib/vasputils/kpoints.rb +31 -33
- data/lib/vasputils/outcar.rb +53 -53
- data/lib/vasputils/poscar.rb +148 -150
- data/lib/vasputils/potcar/concatenater.rb +22 -22
- data/lib/vasputils/potcar.rb +12 -12
- data/lib/vasputils/setting.rb +22 -22
- data/lib/vasputils/vaspdir.rb +199 -86
- data/lib/vasputils/vaspgeometryoptimizer.rb +233 -100
- data/lib/vasputils.rb +7 -65
- data/test/conditionanalyzer/00/POSCAR +8 -0
- data/test/conditionanalyzer/00/encut400_k444/CONTCAR +8 -0
- data/test/conditionanalyzer/00/encut400_k444/INCAR +28 -0
- data/test/conditionanalyzer/00/encut400_k444/KPOINTS +6 -0
- data/test/conditionanalyzer/00/encut400_k444/OUTCAR +1436 -0
- data/test/conditionanalyzer/00/encut400_k444/POSCAR +8 -0
- data/test/conditionanalyzer/00/encut400_k444/POTCAR +16 -0
- data/test/conditionanalyzer/00/encut400_k555/CONTCAR +8 -0
- data/test/conditionanalyzer/00/encut400_k555/INCAR +28 -0
- data/test/conditionanalyzer/00/encut400_k555/KPOINTS +6 -0
- data/test/conditionanalyzer/00/encut400_k555/OUTCAR +1436 -0
- data/test/conditionanalyzer/00/encut400_k555/POSCAR +8 -0
- data/test/conditionanalyzer/00/encut400_k555/POTCAR +16 -0
- data/test/conditionanalyzer/00/encut500_k444/CONTCAR +8 -0
- data/test/conditionanalyzer/00/encut500_k444/INCAR +28 -0
- data/test/conditionanalyzer/00/encut500_k444/KPOINTS +6 -0
- data/test/conditionanalyzer/00/encut500_k444/OUTCAR +1436 -0
- data/test/conditionanalyzer/00/encut500_k444/POSCAR +8 -0
- data/test/conditionanalyzer/00/encut500_k444/POTCAR +16 -0
- data/test/conditionanalyzer/00/encut500_k555/CONTCAR +8 -0
- data/test/conditionanalyzer/00/encut500_k555/INCAR +28 -0
- data/test/conditionanalyzer/00/encut500_k555/KPOINTS +6 -0
- data/test/conditionanalyzer/00/encut500_k555/OUTCAR +1436 -0
- data/test/conditionanalyzer/00/encut500_k555/POSCAR +8 -0
- data/test/conditionanalyzer/00/encut500_k555/POTCAR +16 -0
- data/test/{vaspkpointsfinder/01-01-01/try00 → conditionanalyzer/01/00-original}/INCAR +3 -3
- data/test/conditionanalyzer/01/00-original/KPOINTS +6 -0
- data/test/conditionanalyzer/01/00-original/POSCAR +10 -0
- data/test/conditionanalyzer/01/01-ENCUT/1000/try02/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/1000/try02/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/1000/try02/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/1000/try02/OUTCAR +1692 -0
- data/test/conditionanalyzer/01/01-ENCUT/1000/try02/POSCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/1200/try02/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/1200/try02/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/1200/try02/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/1200/try02/OUTCAR +1692 -0
- data/test/conditionanalyzer/01/01-ENCUT/1200/try02/POSCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/1500/try02/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/1500/try02/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/1500/try02/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/1500/try02/OUTCAR +1742 -0
- data/test/conditionanalyzer/01/01-ENCUT/1500/try02/POSCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/500/try05/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/500/try05/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/500/try05/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/500/try05/OUTCAR +1644 -0
- data/test/conditionanalyzer/01/01-ENCUT/500/try05/POSCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/600/try01/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/600/try01/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/600/try01/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/600/try01/OUTCAR +1644 -0
- data/test/conditionanalyzer/01/01-ENCUT/600/try01/POSCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/700/try01/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/700/try01/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/700/try01/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/700/try01/OUTCAR +1644 -0
- data/test/conditionanalyzer/01/01-ENCUT/700/try01/POSCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/800/try01/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/800/try01/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/800/try01/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/800/try01/OUTCAR +3610 -0
- data/test/conditionanalyzer/01/01-ENCUT/800/try01/POSCAR +10 -0
- data/test/conditionanalyzer/01/01-ENCUT/900/try01/CONTCAR +13 -0
- data/test/conditionanalyzer/01/01-ENCUT/900/try01/INCAR +17 -0
- data/test/conditionanalyzer/01/01-ENCUT/900/try01/KPOINTS +6 -0
- data/test/conditionanalyzer/01/01-ENCUT/900/try01/OUTCAR +1692 -0
- data/test/conditionanalyzer/01/01-ENCUT/900/try01/POSCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/16x16x16/try07/CONTCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/16x16x16/try07/INCAR +17 -0
- data/test/conditionanalyzer/01/02-KPOINTS/16x16x16/try07/KPOINTS +6 -0
- data/test/conditionanalyzer/01/02-KPOINTS/16x16x16/try07/OUTCAR +12318 -0
- data/test/conditionanalyzer/01/02-KPOINTS/16x16x16/try07/POSCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/1x1x1/try07/CONTCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/1x1x1/try07/INCAR +17 -0
- data/test/{vaspkpointsfinder/01-01-01/try00 → conditionanalyzer/01/02-KPOINTS/1x1x1/try07}/KPOINTS +1 -1
- data/test/conditionanalyzer/01/02-KPOINTS/1x1x1/try07/OUTCAR +1337 -0
- data/test/conditionanalyzer/01/02-KPOINTS/1x1x1/try07/POSCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/2x2x2/try10/CONTCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/2x2x2/try10/INCAR +17 -0
- data/test/conditionanalyzer/01/02-KPOINTS/2x2x2/try10/KPOINTS +6 -0
- data/test/conditionanalyzer/01/02-KPOINTS/2x2x2/try10/OUTCAR +9885 -0
- data/test/conditionanalyzer/01/02-KPOINTS/2x2x2/try10/POSCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x32/try06/CONTCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x32/try06/INCAR +17 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x32/try06/KPOINTS +6 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x32/try06/OUTCAR +72342 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x32/try06/POSCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x64/try04/CONTCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x64/try04/INCAR +17 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x64/try04/KPOINTS +6 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x64/try04/OUTCAR +139254 -0
- data/test/conditionanalyzer/01/02-KPOINTS/32x32x64/try04/POSCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/4x4x4/try05/CONTCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/4x4x4/try05/INCAR +17 -0
- data/test/conditionanalyzer/01/02-KPOINTS/4x4x4/try05/KPOINTS +6 -0
- data/test/conditionanalyzer/01/02-KPOINTS/4x4x4/try05/OUTCAR +1644 -0
- data/test/conditionanalyzer/01/02-KPOINTS/4x4x4/try05/POSCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/64x64x64/INCAR +17 -0
- data/test/conditionanalyzer/01/02-KPOINTS/64x64x64/KPOINTS +6 -0
- data/test/conditionanalyzer/01/02-KPOINTS/64x64x64/OUTCAR +507061 -0
- data/test/conditionanalyzer/01/02-KPOINTS/64x64x64/POSCAR +10 -0
- data/test/conditionanalyzer/01/02-KPOINTS/8x8x8/try05/CONTCAR +13 -0
- data/test/conditionanalyzer/01/02-KPOINTS/8x8x8/try05/INCAR +17 -0
- data/test/conditionanalyzer/01/02-KPOINTS/8x8x8/try05/KPOINTS +6 -0
- data/test/conditionanalyzer/01/02-KPOINTS/8x8x8/try05/OUTCAR +3298 -0
- data/test/conditionanalyzer/01/02-KPOINTS/8x8x8/try05/POSCAR +13 -0
- data/test/conditionanalyzer/mixed_conditions/orthorhombic/CONTCAR +17 -0
- data/test/conditionanalyzer/mixed_conditions/orthorhombic/INCAR +28 -0
- data/test/conditionanalyzer/mixed_conditions/orthorhombic/KPOINTS +6 -0
- data/test/conditionanalyzer/mixed_conditions/orthorhombic/OUTCAR +1436 -0
- data/test/conditionanalyzer/mixed_conditions/orthorhombic/POSCAR +12 -0
- data/test/conditionanalyzer/mixed_conditions/orthorhombic/POTCAR +16 -0
- data/test/conditionanalyzer/mixed_conditions/tetragonal/CONTCAR +17 -0
- data/test/conditionanalyzer/mixed_conditions/tetragonal/INCAR +28 -0
- data/test/conditionanalyzer/mixed_conditions/tetragonal/KPOINTS +6 -0
- data/test/conditionanalyzer/mixed_conditions/tetragonal/OUTCAR +1436 -0
- data/test/conditionanalyzer/mixed_conditions/tetragonal/POSCAR +12 -0
- data/test/conditionanalyzer/mixed_conditions/tetragonal/POTCAR +16 -0
- data/test/conditionanalyzer/picker/encut400_k444-cubic/INCAR +28 -0
- data/test/conditionanalyzer/picker/encut400_k444-cubic/KPOINTS +6 -0
- data/test/conditionanalyzer/picker/encut400_k444-cubic/OUTCAR +1436 -0
- data/test/conditionanalyzer/picker/encut400_k444-cubic/POSCAR +9 -0
- data/test/conditionanalyzer/picker/encut400_k444-cubic/POTCAR +16 -0
- data/test/conditionanalyzer/picker/encut400_k444-tetragonal-b/INCAR +28 -0
- data/test/conditionanalyzer/picker/encut400_k444-tetragonal-b/KPOINTS +6 -0
- data/test/conditionanalyzer/picker/encut400_k444-tetragonal-b/OUTCAR +1436 -0
- data/test/conditionanalyzer/picker/encut400_k444-tetragonal-b/POSCAR +9 -0
- data/test/conditionanalyzer/picker/encut400_k444-tetragonal-b/POTCAR +16 -0
- data/test/conditionanalyzer/picker/encut400_k444-unfinished/INCAR +28 -0
- data/test/conditionanalyzer/picker/encut400_k444-unfinished/KPOINTS +6 -0
- data/test/conditionanalyzer/picker/encut400_k444-unfinished/OUTCAR +1381 -0
- data/test/conditionanalyzer/picker/encut400_k444-unfinished/POSCAR +12 -0
- data/test/conditionanalyzer/picker/encut400_k444-unfinished/POTCAR +16 -0
- data/test/conditionanalyzer/picker/hexiagonal/CONTCAR +13 -0
- data/test/conditionanalyzer/picker/hexiagonal/INCAR +17 -0
- data/test/conditionanalyzer/picker/hexiagonal/KPOINTS +6 -0
- data/test/conditionanalyzer/picker/hexiagonal/OUTCAR +1644 -0
- data/test/conditionanalyzer/picker/hexiagonal/POSCAR +13 -0
- data/test/conditionvarier/standard/INCAR +28 -0
- data/test/conditionvarier/standard/KPOINTS +6 -0
- data/test/conditionvarier/standard/POSCAR +12 -0
- data/test/conditionvarier/standard/POTCAR +16 -0
- data/test/helper.rb +4 -4
- data/test/poscar/symmetry/cubic/POSCAR +8 -0
- data/test/poscar/symmetry/hexagonal/POSCAR +8 -0
- data/test/poscar/symmetry/monoclinic/POSCAR +8 -0
- data/test/poscar/symmetry/orthorhombic/POSCAR +8 -0
- data/test/poscar/symmetry/tetragonal/POSCAR +8 -0
- data/test/poscar/symmetry/tetragonal-b/POSCAR +8 -0
- data/test/poscar/symmetry/triclinic/POSCAR +10 -0
- data/test/poscar/symmetry/trigonal/POSCAR +9 -0
- data/test/test_conditionvarier.rb +201 -0
- data/test/test_incar.rb +144 -144
- data/test/test_kpoints.rb +91 -91
- data/test/test_outcar.rb +154 -154
- data/test/test_poscar.rb +263 -262
- data/test/test_potcar.rb +31 -31
- data/test/test_potcar_concatenater.rb +39 -39
- data/test/test_setting.rb +15 -14
- data/test/test_vaspdir.rb +193 -126
- data/test/test_vaspgeometryoptimizer.rb +177 -78
- data/test/test_vasputils.rb +48 -48
- data/test/vaspdir/reset_init/finished/orig/CONTCAR +17 -0
- data/test/vaspdir/reset_init/finished/orig/INCAR +27 -0
- data/test/vaspdir/reset_init/finished/orig/KPOINTS +6 -0
- data/test/vaspdir/reset_init/finished/orig/OUTCAR +1436 -0
- data/test/vaspdir/reset_init/finished/orig/POSCAR +12 -0
- data/test/vaspdir/reset_init/finished/orig/POTCAR +16 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir0/CONTCAR +17 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir0/INCAR +27 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir0/KPOINTS +6 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir0/OUTCAR +1436 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir0/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir0/POTCAR +16 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir1/CONTCAR +17 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir1/INCAR +27 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir1/KPOINTS +6 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir1/OUTCAR +1436 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir1/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/multiple_vaspdir/vaspdir1/POTCAR +16 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/DOSCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/EIGENVAL +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/OSZICAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/PCDAT +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/POSCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/WAVECAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/XDATCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt00/vasprun.xml +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/no-contcar/geomopt01/.gitignore +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/CHG +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/CHGCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/CONTCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/DOSCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/EIGENVAL +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/OSZICAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/PCDAT +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/POSCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/WAVECAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/XDATCAR +0 -0
- data/test/vaspgeometryoptimizer/prepare_next/normal/geomopt00/vasprun.xml +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt00/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt00/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt01/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt01/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt01/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt01/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt01/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt01/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt02/CONTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt02/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt02/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt02/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/geomopt02/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_init/orig/lock_vaspgeomopt/dummy +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt00/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt00/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt01/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt01/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt01/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt01/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt01/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt01/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt02/CONTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt02/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt02/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt02/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt02/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/geomopt02/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/empty-contcar/orig/lock_vaspgeomopt/dummy +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt00/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt00/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt01/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt01/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt01/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt01/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt01/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt01/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt02/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt02/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt02/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/geomopt02/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/no-contcar/orig/lock_vaspgeomopt/dummy +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt00/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt00/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt01/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt01/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt01/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt01/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt01/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt01/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt02/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt02/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt02/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt02/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/geomopt02/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_next/poscar-contcar/orig/lock_vaspgeomopt/dummy +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt00/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt00/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt01/CONTCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt01/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt01/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt01/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt01/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt01/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt02/CONTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt02/INCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt02/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt02/POSCAR +12 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/geomopt02/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/reset_reincarnation/orig/lock_vaspgeomopt/dummy +0 -0
- data/test/vaspgeometryoptimizer/started/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/started/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/started/geomopt00/POSCAR +0 -0
- data/test/vaspgeometryoptimizer/started/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt00/CONTCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt00/INCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt00/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt00/OUTCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt00/POSCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt00/POTCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt01/INCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt01/KPOINTS +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt01/POSCAR +0 -0
- data/test/vaspgeometryoptimizer/till01/geomopt01/POTCAR +0 -0
- metadata +464 -106
- data/bin/genvaspdir +0 -17
- data/bin/rmvaspout +0 -40
- data/lib/vasputils/vaspkpointsfinder.rb +0 -72
- data/test/test_vaspkpointsfinder.rb +0 -25
- data/test/vaspkpointsfinder/01-01-01/try00/POSCAR +0 -8
- data/vasputils.gemspec +0 -567
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try00 → conditionanalyzer/01/00-original}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try01 → conditionanalyzer/01/01-ENCUT/1000/try02}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter2/try00 → conditionanalyzer/01/01-ENCUT/1200/try02}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter2/try01 → conditionanalyzer/01/01-ENCUT/1500/try02}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/not-yet/try00 → conditionanalyzer/01/01-ENCUT/500/try05}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/prepare_next/try00 → conditionanalyzer/01/01-ENCUT/600/try01}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/started/try00 → conditionanalyzer/01/01-ENCUT/700/try01}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/till01/try00 → conditionanalyzer/01/01-ENCUT/800/try01}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/till01 → conditionanalyzer/01/01-ENCUT/900}/try01/POTCAR +0 -0
- /data/test/{vaspkpointsfinder/01-01-01/try00 → conditionanalyzer/01/02-KPOINTS/16x16x16/try07}/POTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try00/INCAR → conditionanalyzer/01/02-KPOINTS/1x1x1/try07/POTCAR} +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try00/KPOINTS → conditionanalyzer/01/02-KPOINTS/2x2x2/try10/POTCAR} +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try00/OUTCAR → conditionanalyzer/01/02-KPOINTS/32x32x32/try06/POTCAR} +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try00/POSCAR → conditionanalyzer/01/02-KPOINTS/32x32x64/try04/POTCAR} +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try01/INCAR → conditionanalyzer/01/02-KPOINTS/4x4x4/try05/POTCAR} +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter2/try00 → conditionanalyzer/01/02-KPOINTS/64x64x64}/CONTCAR +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try01/KPOINTS → conditionanalyzer/01/02-KPOINTS/64x64x64/POTCAR} +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter1/try01/POSCAR → conditionanalyzer/01/02-KPOINTS/8x8x8/try05/POTCAR} +0 -0
- /data/test/{vaspgeometryoptimizer/ended-Iter2/try00/INCAR → conditionanalyzer/picker/hexiagonal/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00 → ended-Iter1/geomopt00}/CONTCAR +0 -0
- /data/test/vaspgeometryoptimizer/{ended-Iter2/try01 → ended-Iter1/geomopt00}/INCAR +0 -0
- /data/test/vaspgeometryoptimizer/{ended-Iter2/try00 → ended-Iter1/geomopt00}/KPOINTS +0 -0
- /data/test/vaspgeometryoptimizer/{ended-Iter2/try00 → ended-Iter1/geomopt00}/OUTCAR +0 -0
- /data/test/vaspgeometryoptimizer/{ended-Iter2/try00 → ended-Iter1/geomopt00}/POSCAR +0 -0
- /data/test/vaspgeometryoptimizer/{ended-Iter2/try01/KPOINTS → ended-Iter1/geomopt00/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{not-yet/try00 → ended-Iter1/geomopt01}/INCAR +0 -0
- /data/test/vaspgeometryoptimizer/{not-yet/try00 → ended-Iter1/geomopt01}/KPOINTS +0 -0
- /data/test/vaspgeometryoptimizer/ended-Iter1/{try01 → geomopt01}/OUTCAR +0 -0
- /data/test/vaspgeometryoptimizer/{ended-Iter2/try01 → ended-Iter1/geomopt01}/POSCAR +0 -0
- /data/test/vaspgeometryoptimizer/{not-yet/try00/POSCAR → ended-Iter1/geomopt01/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try00 → ended-Iter2/geomopt00}/CONTCAR +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00 → ended-Iter2/geomopt00}/INCAR +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00 → ended-Iter2/geomopt00}/KPOINTS +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00 → ended-Iter2/geomopt00}/OUTCAR +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00 → ended-Iter2/geomopt00}/POSCAR +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/CHG → ended-Iter2/geomopt00/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{started/try00 → ended-Iter2/geomopt01}/INCAR +0 -0
- /data/test/vaspgeometryoptimizer/{started/try00 → ended-Iter2/geomopt01}/KPOINTS +0 -0
- /data/test/vaspgeometryoptimizer/ended-Iter2/{try01 → geomopt01}/OUTCAR +0 -0
- /data/test/vaspgeometryoptimizer/{started/try00 → ended-Iter2/geomopt01}/POSCAR +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/CHGCAR → ended-Iter2/geomopt01/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try00 → not-geomopt/not-geomopt-subdir/calcA}/INCAR +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try00 → not-geomopt/not-geomopt-subdir/calcA}/KPOINTS +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try00 → not-geomopt/not-geomopt-subdir/calcA}/POSCAR +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/DOSCAR → not-geomopt/not-geomopt-subdir/calcA/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try01 → not-geomopt/not-geomopt-subdir/calcB}/INCAR +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try01 → not-geomopt/not-geomopt-subdir/calcB}/KPOINTS +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try01 → not-geomopt/not-geomopt-subdir/calcB}/POSCAR +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/EIGENVAL → not-geomopt/not-geomopt-subdir/calcB/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/OSZICAR → not-yet/geomopt00/INCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/PCDAT → not-yet/geomopt00/KPOINTS} +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/WAVECAR → not-yet/geomopt00/POSCAR} +0 -0
- /data/test/vaspgeometryoptimizer/{prepare_next/try00/XDATCAR → not-yet/geomopt00/POTCAR} +0 -0
- /data/test/vaspgeometryoptimizer/prepare_next/{try00/vasprun.xml → no-contcar/geomopt00/CHG} +0 -0
- /data/test/vaspgeometryoptimizer/{till01/try00/OUTCAR → prepare_next/no-contcar/geomopt00/CHGCAR} +0 -0
|
@@ -7,50 +7,50 @@ require "vasputils.rb"
|
|
|
7
7
|
#require "vasputils/potcar/concatenater.rb"
|
|
8
8
|
|
|
9
9
|
class VaspUtils::Potcar::Concatenater
|
|
10
|
-
|
|
10
|
+
public :dump
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
class TC_Concatenater < Test::Unit::TestCase
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def test_dump
|
|
23
|
-
# concatenating
|
|
24
|
-
assert_equal(
|
|
25
|
-
"H\n",
|
|
26
|
-
@c.dump(["H"])
|
|
27
|
-
)
|
|
28
|
-
assert_equal(
|
|
29
|
-
"H\nLi_sv\n",
|
|
30
|
-
@c.dump(["H", "Li"])
|
|
31
|
-
)
|
|
32
|
-
assert_raise(VaspUtils::Potcar::Concatenater::NoPotcarError){@c.dump(["H", "Li", "not_exist_element"])}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
# return string if io is nil.
|
|
36
|
-
assert_equal(
|
|
37
|
-
"H\n",
|
|
38
|
-
@c.dump(["H"], nil)
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
# write io
|
|
42
|
-
outfile = "test/potcar/tmp.POTCAR"
|
|
43
|
-
FileUtils.rm(outfile) if File.exist? outfile
|
|
44
|
-
File.open(outfile, "w") do |io|
|
|
45
|
-
@c.dump(["H"], io)
|
|
14
|
+
def setup
|
|
15
|
+
settings = VaspUtils::Setting.new("test/potcar/test.vasputils")
|
|
16
|
+
potcar_path = settings["potcar_path"]
|
|
17
|
+
elem_potcar = settings["element_potcar"]
|
|
18
|
+
|
|
19
|
+
@c = VaspUtils::Potcar::Concatenater.new(potcar_path, elem_potcar)
|
|
46
20
|
end
|
|
47
|
-
assert_equal(
|
|
48
|
-
"H\n",
|
|
49
|
-
File.read(outfile)
|
|
50
|
-
)
|
|
51
21
|
|
|
52
|
-
|
|
53
|
-
|
|
22
|
+
def test_dump
|
|
23
|
+
# concatenating
|
|
24
|
+
assert_equal(
|
|
25
|
+
"H\n",
|
|
26
|
+
@c.dump(["H"])
|
|
27
|
+
)
|
|
28
|
+
assert_equal(
|
|
29
|
+
"H\nLi_sv\n",
|
|
30
|
+
@c.dump(["H", "Li"])
|
|
31
|
+
)
|
|
32
|
+
assert_raise(VaspUtils::Potcar::Concatenater::NoPotcarError){@c.dump(["H", "Li", "not_exist_element"])}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# return string if io is nil.
|
|
36
|
+
assert_equal(
|
|
37
|
+
"H\n",
|
|
38
|
+
@c.dump(["H"], nil)
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
# write io
|
|
42
|
+
outfile = "test/potcar/tmp.POTCAR"
|
|
43
|
+
FileUtils.rm(outfile) if File.exist? outfile
|
|
44
|
+
File.open(outfile, "w") do |io|
|
|
45
|
+
@c.dump(["H"], io)
|
|
46
|
+
end
|
|
47
|
+
assert_equal(
|
|
48
|
+
"H\n",
|
|
49
|
+
File.read(outfile)
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
FileUtils.rm(outfile) if File.exist? outfile
|
|
53
|
+
end
|
|
54
54
|
|
|
55
55
|
end
|
|
56
56
|
|
data/test/test_setting.rb
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
#! /usr/bin/env ruby
|
|
2
2
|
# coding: utf-8
|
|
3
3
|
|
|
4
|
-
require
|
|
5
|
-
require "
|
|
4
|
+
require 'helper'
|
|
5
|
+
#require "test/unit"
|
|
6
|
+
#require "vasputils/setting.rb"
|
|
6
7
|
|
|
7
8
|
class TC_Setting < Test::Unit::TestCase
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
def setup
|
|
10
|
+
@s = VaspUtils::Setting.new("example/dot.vasputils")
|
|
11
|
+
end
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
def test_initialize
|
|
14
|
+
assert_raise(Errno::ENOENT){VaspUtils::Setting.new("not_exist_file")}
|
|
15
|
+
end
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
def test_get
|
|
18
|
+
#assert_raise(VaspUtils::Setting::NoEntryError){@s.get("no_entory_key")}
|
|
19
|
+
#assert_equal("/usr/local/calc/potcar/potpaw_PBE.52", @s.get("potcar_dir"))
|
|
20
|
+
assert_raise(VaspUtils::Setting::NoEntryError){@s["no_entory_key"]}
|
|
21
|
+
assert_equal("/home/ippei/opt/vasp/potcar/potpaw_PBE.52", @s["potcar_dir"])
|
|
22
|
+
end
|
|
22
23
|
end
|
|
23
24
|
|
data/test/test_vaspdir.rb
CHANGED
|
@@ -3,149 +3,216 @@
|
|
|
3
3
|
|
|
4
4
|
$TEST = true
|
|
5
5
|
|
|
6
|
+
require "helper"
|
|
7
|
+
require "fileutils"
|
|
8
|
+
require "stringio"
|
|
6
9
|
require "rubygems"
|
|
7
|
-
gem "comana"
|
|
8
|
-
require "comana/computationmanager.rb"
|
|
10
|
+
#gem "comana"
|
|
11
|
+
#require "comana/computationmanager.rb"
|
|
9
12
|
|
|
10
13
|
require "test/unit"
|
|
11
|
-
require "vasputils.rb"
|
|
14
|
+
#require "vasputils.rb"
|
|
12
15
|
|
|
13
16
|
# assert_equal( cor, data)
|
|
14
17
|
# assert_in_delta( cor, data, $tolerance )
|
|
15
18
|
# assert_raise( RuntimeError ){}
|
|
16
19
|
|
|
17
|
-
class VaspUtils::VaspDir < ComputationManager
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
class VaspUtils::VaspDir < Comana::ComputationManager
|
|
21
|
+
attr_reader :mode
|
|
22
|
+
|
|
23
|
+
def calculate
|
|
24
|
+
generated_files = [
|
|
25
|
+
"CHG",
|
|
26
|
+
"CHGCAR",
|
|
27
|
+
"CONTCAR",
|
|
28
|
+
"DOSCAR",
|
|
29
|
+
"EIGENVAL",
|
|
30
|
+
"IBZKPT",
|
|
31
|
+
"OSZICAR",
|
|
32
|
+
"OUTCAR",
|
|
33
|
+
"PCDAT",
|
|
34
|
+
"WAVECAR",
|
|
35
|
+
"XDATCAR",
|
|
36
|
+
"machines",
|
|
37
|
+
"vasprun.xml",
|
|
38
|
+
]
|
|
39
|
+
generated_files.map!{|i| "#{@dir}/#{i}"}
|
|
40
|
+
command = "touch #{generated_files.join(" ")}"
|
|
41
|
+
|
|
42
|
+
system command
|
|
43
|
+
end
|
|
41
44
|
end
|
|
42
45
|
|
|
43
46
|
|
|
44
47
|
class TC_VaspDir < Test::Unit::TestCase
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
49
|
+
GENERATED_FILES_VD00 = [
|
|
50
|
+
"test/vaspdir/not-yet/CHG",
|
|
51
|
+
"test/vaspdir/not-yet/CHGCAR",
|
|
52
|
+
"test/vaspdir/not-yet/CONTCAR",
|
|
53
|
+
"test/vaspdir/not-yet/DOSCAR",
|
|
54
|
+
"test/vaspdir/not-yet/EIGENVAL",
|
|
55
|
+
"test/vaspdir/not-yet/IBZKPT",
|
|
56
|
+
"test/vaspdir/not-yet/OSZICAR",
|
|
57
|
+
"test/vaspdir/not-yet/OUTCAR",
|
|
58
|
+
"test/vaspdir/not-yet/PCDAT",
|
|
59
|
+
"test/vaspdir/not-yet/WAVECAR",
|
|
60
|
+
"test/vaspdir/not-yet/XDATCAR",
|
|
61
|
+
"test/vaspdir/not-yet/machines",
|
|
62
|
+
"test/vaspdir/not-yet/vasprun.xml",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
def setup
|
|
66
|
+
@vd00 = VaspUtils::VaspDir.new("test/vaspdir/not-yet")
|
|
67
|
+
@vd01 = VaspUtils::VaspDir.new("test/vaspdir/locked")
|
|
68
|
+
@vd02 = VaspUtils::VaspDir.new("test/vaspdir/started")
|
|
69
|
+
@vd03 = VaspUtils::VaspDir.new("test/vaspdir/finished")
|
|
70
|
+
|
|
71
|
+
GENERATED_FILES_VD00.each do |file|
|
|
72
|
+
FileUtils.rm file if File.exist? file
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
#lock_dir = "test/vaspdir/not-yet/lock"
|
|
76
|
+
#Dir.rmdir(lock_dir) if Dir.exist?(lock_dir)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def test_initialize
|
|
80
|
+
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-INCAR" )}
|
|
81
|
+
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-KPOINTS")}
|
|
82
|
+
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-POSCAR" )}
|
|
83
|
+
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-POTCAR" )}
|
|
84
|
+
|
|
85
|
+
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/conditionanalyzer/00" )}
|
|
86
|
+
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def test_finished?
|
|
90
|
+
assert_equal(false, @vd00.finished?)
|
|
91
|
+
assert_equal(false, @vd01.finished?)
|
|
92
|
+
assert_equal(false, @vd02.finished?)
|
|
93
|
+
assert_equal(true , @vd03.finished?)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def test_calculate
|
|
97
|
+
lock_dir = "test/vaspdir/not-yet/lock_vaspdir"
|
|
98
|
+
Dir.rmdir(lock_dir) if Dir.exist?(lock_dir)
|
|
99
|
+
#pp @vd00;exit
|
|
100
|
+
#@vd00.calculate
|
|
101
|
+
assert_nothing_raised{@vd00.calculate}
|
|
102
|
+
|
|
103
|
+
GENERATED_FILES_VD00.each do |file|
|
|
104
|
+
assert(FileTest.exist?(file), "#{file} not found.")
|
|
105
|
+
end
|
|
106
|
+
assert(FileTest.exist? "test/vaspdir/not-yet/INCAR")
|
|
107
|
+
assert(FileTest.exist? "test/vaspdir/not-yet/KPOINTS")
|
|
108
|
+
assert(FileTest.exist? "test/vaspdir/not-yet/POSCAR")
|
|
109
|
+
assert(FileTest.exist? "test/vaspdir/not-yet/POTCAR")
|
|
110
|
+
|
|
111
|
+
lock_dir = "test/vaspdir/not-yet/lock_vaspdir"
|
|
112
|
+
Dir.rmdir(lock_dir) if Dir.exist?(lock_dir)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def test_outcar
|
|
116
|
+
assert_equal("test/vaspdir/started/OUTCAR", @vd02.outcar[:name])
|
|
117
|
+
assert_equal("test/vaspdir/finished/OUTCAR", @vd03.outcar[:name])
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def test_reset_init
|
|
121
|
+
orig = "test/vaspdir/reset_init/finished/orig"
|
|
122
|
+
tmp = "test/vaspdir/reset_init/finished/tmp"
|
|
123
|
+
FileUtils.rm_rf(tmp) if File.exist?(tmp)
|
|
124
|
+
FileUtils.cp_r(orig, tmp)
|
|
125
|
+
|
|
126
|
+
io = StringIO.new
|
|
127
|
+
|
|
128
|
+
vd = VaspUtils::VaspDir.new(tmp)
|
|
129
|
+
assert_equal(true, File.exist?("#{tmp}/CONTCAR"))
|
|
130
|
+
assert_equal(true, File.exist?("#{tmp}/INCAR"))
|
|
131
|
+
assert_equal(true, File.exist?("#{tmp}/KPOINTS"))
|
|
132
|
+
assert_equal(true, File.exist?("#{tmp}/OUTCAR"))
|
|
133
|
+
assert_equal(true, File.exist?("#{tmp}/POSCAR"))
|
|
134
|
+
assert_equal(true, File.exist?("#{tmp}/POTCAR"))
|
|
135
|
+
vd.reset_init(io)
|
|
136
|
+
assert_equal(false, File.exist?("#{tmp}/CONTCAR"))
|
|
137
|
+
assert_equal(true , File.exist?("#{tmp}/INCAR"))
|
|
138
|
+
assert_equal(true , File.exist?("#{tmp}/KPOINTS"))
|
|
139
|
+
assert_equal(false, File.exist?("#{tmp}/OUTCAR"))
|
|
140
|
+
assert_equal(true , File.exist?("#{tmp}/POSCAR"))
|
|
141
|
+
assert_equal(true , File.exist?("#{tmp}/POTCAR"))
|
|
142
|
+
line = File.open("#{tmp}/POSCAR", "r").readlines[0]
|
|
143
|
+
assert_equal("POSCAR\n", line )
|
|
144
|
+
|
|
145
|
+
io.rewind
|
|
146
|
+
lines = io.readlines
|
|
147
|
+
#" Remove files:",
|
|
148
|
+
#" CONTCAR",
|
|
149
|
+
#" OUTCAR",
|
|
150
|
+
#" Keep files:",
|
|
151
|
+
#" INCAR",
|
|
152
|
+
#" KPOINTS",
|
|
153
|
+
#" POSCAR",
|
|
154
|
+
#" POTCAR",
|
|
155
|
+
assert_equal(" Removing: CONTCAR\n", lines.shift)
|
|
156
|
+
assert_equal(" Removing: OUTCAR\n", lines.shift)
|
|
157
|
+
assert_equal(nil , lines.shift)
|
|
158
|
+
|
|
159
|
+
FileUtils.rm_rf(tmp) if File.exist? tmp
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def test_poscar
|
|
163
|
+
t = @vd03.poscar
|
|
164
|
+
assert_equal(CrystalCell::Cell, t.class)
|
|
165
|
+
assert_in_delta(3.8879999999999999, t.axes[2][2])
|
|
166
|
+
|
|
167
|
+
t = @vd00.poscar
|
|
168
|
+
assert_equal(CrystalCell::Cell, t.class)
|
|
169
|
+
assert_in_delta(3.8879999999999999, t.axes[2][2])
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def test_contcar
|
|
173
|
+
t = @vd03.contcar
|
|
174
|
+
assert_equal(CrystalCell::Cell, t.class)
|
|
175
|
+
assert_in_delta(3.8879999999999999, t.axes[2][2])
|
|
176
|
+
|
|
177
|
+
assert_raise(Errno::ENOENT){@vd00.contcar}
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
def test_incar
|
|
181
|
+
t = @vd00.incar
|
|
182
|
+
assert_equal("400", t["ENCUT"])
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def test_kpoints
|
|
186
|
+
t = @vd00.kpoints
|
|
187
|
+
assert_equal("Automatic mesh", t[:comment])
|
|
70
188
|
end
|
|
71
189
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def test_initialize
|
|
77
|
-
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-INCAR" )}
|
|
78
|
-
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-KPOINTS")}
|
|
79
|
-
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-POSCAR" )}
|
|
80
|
-
assert_raise(VaspUtils::VaspDir::InitializeError){VaspUtils::VaspDir.new("test/vaspdir/lack-POTCAR" )}
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
def test_finished?
|
|
84
|
-
assert_equal(false, @vd00.finished?)
|
|
85
|
-
assert_equal(false, @vd01.finished?)
|
|
86
|
-
assert_equal(false, @vd02.finished?)
|
|
87
|
-
assert_equal(true , @vd03.finished?)
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
def test_calculate
|
|
91
|
-
lock_dir = "test/vaspdir/not-yet/lock_vaspdir"
|
|
92
|
-
Dir.rmdir(lock_dir) if Dir.exist?(lock_dir)
|
|
93
|
-
#pp @vd00;exit
|
|
94
|
-
#@vd00.calculate
|
|
95
|
-
assert_nothing_raised{@vd00.calculate}
|
|
96
|
-
|
|
97
|
-
GENERATED_FILES_VD00.each do |file|
|
|
98
|
-
assert(FileTest.exist?(file), "#{file} not found.")
|
|
190
|
+
def teardown
|
|
191
|
+
GENERATED_FILES_VD00.each do |file|
|
|
192
|
+
FileUtils.rm file if File.exist? file
|
|
193
|
+
end
|
|
99
194
|
end
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
assert_equal(Cell, t.class)
|
|
121
|
-
assert_in_delta(3.8879999999999999, t.axes[2][2])
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
def test_contcar
|
|
125
|
-
t = @vd03.contcar
|
|
126
|
-
assert_equal(Cell, t.class)
|
|
127
|
-
assert_in_delta(3.8879999999999999, t.axes[2][2])
|
|
128
|
-
|
|
129
|
-
assert_raise(Errno::ENOENT){@vd00.contcar}
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
def test_incar
|
|
133
|
-
t = @vd00.incar
|
|
134
|
-
assert_equal("400", t["ENCUT"])
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
def test_kpoints
|
|
138
|
-
t = @vd00.kpoints
|
|
139
|
-
assert_equal("Automatic mesh", t[:comment])
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
#undef test_next
|
|
143
|
-
|
|
144
|
-
def teardown
|
|
145
|
-
GENERATED_FILES_VD00.each do |file|
|
|
146
|
-
FileUtils.rm file if File.exist? file
|
|
195
|
+
|
|
196
|
+
def test_mutate
|
|
197
|
+
tmp_dir = "test/vaspdir/mutate"
|
|
198
|
+
FileUtils.rm_rf(tmp_dir) if File.exist? tmp_dir
|
|
199
|
+
conditions = {:encut => 800.0, :kab => 8}
|
|
200
|
+
@vd00.mutate("test/vaspdir/mutate", conditions)
|
|
201
|
+
new_dir = VaspUtils::VaspDir.new(tmp_dir)
|
|
202
|
+
new_incar = new_dir.incar
|
|
203
|
+
assert_equal("800.0", new_incar["ENCUT"])
|
|
204
|
+
|
|
205
|
+
new_kpoints = new_dir.kpoints
|
|
206
|
+
assert_equal([8,8,5], new_kpoints[:mesh])
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
# already exist
|
|
210
|
+
assert_raise(VaspUtils::VaspDir::AlreadyExistError){
|
|
211
|
+
@vd00.mutate("test/vaspdir/mutate", conditions)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
FileUtils.rm_rf(tmp_dir) if File.exist? tmp_dir
|
|
147
215
|
end
|
|
148
|
-
end
|
|
149
216
|
|
|
150
217
|
end
|
|
151
218
|
|