From 81f9b732adce69cd46a3632534be5f12c6f099d2 Mon Sep 17 00:00:00 2001 From: chn Date: Fri, 6 Oct 2023 15:53:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AA=E6=8F=92?= =?UTF-8?q?=E5=80=BC=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9B=B4=E5=A4=9A=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +++++- src/plot.cpp | 2 +- test/{14.2.2.unfold.yaml => 14.2.2.4.unfold.yaml} | 6 +++--- test/14.2.2.5.plot.yaml | 14 ++++++++++++++ test/14.2.2.5.unfold.yaml | 12 ++++++++++++ test/14.2.4.4.plot.yaml | 14 ++++++++++++++ test/14.2.4.4.unfold.yaml | 14 ++++++++++++++ 7 files changed, 63 insertions(+), 5 deletions(-) rename test/{14.2.2.unfold.yaml => 14.2.2.4.unfold.yaml} (73%) create mode 100644 test/14.2.2.5.plot.yaml create mode 100644 test/14.2.2.5.unfold.yaml create mode 100644 test/14.2.4.4.plot.yaml create mode 100644 test/14.2.4.4.unfold.yaml diff --git a/.gitignore b/.gitignore index 25b012d..fa41609 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,8 @@ out.yaml .cache build/ test/* -!test/14.2.2.unfold.yaml +!test/14.2.2.4.unfold.yaml +!test/14.2.2.5.unfold.yaml +!test/14.2.2.5.plot.yaml +!test/14.2.4.4.unfold.yaml +!test/14.2.4.4.plot.yaml diff --git a/src/plot.cpp b/src/plot.cpp index c468a93..3a28437 100644 --- a/src/plot.cpp +++ b/src/plot.cpp @@ -179,7 +179,7 @@ namespace ufo values.push_back(blend ( std::prev(it)->second.get(), it->second.get(), - (current_distance - std::prev(it)->first) / (it->first - std::prev(it)->first), + (it->first - current_distance) / (it->first - std::prev(it)->first), resolution.second, range) ); } diff --git a/test/14.2.2.unfold.yaml b/test/14.2.2.4.unfold.yaml similarity index 73% rename from test/14.2.2.unfold.yaml rename to test/14.2.2.4.unfold.yaml index f1aff17..ffe3276 100644 --- a/test/14.2.2.unfold.yaml +++ b/test/14.2.2.4.unfold.yaml @@ -7,6 +7,6 @@ PrimativeCellBasisNumber: [ 8, 8, 8 ] AtomPositionInputFile: { FileName: "/home/chn/Documents/lammps-SiC/14/14.2/14.2.2/14.2.2.4/band.yaml", Format: "yaml" } QPointDataInputFile: { FileName: "/home/chn/Documents/lammps-SiC/14/14.2/14.2.2/14.2.2.4/band.yaml", Format: "yaml" } QPointDataOutputFile: -- { FileName: "test/14.2.2.result.yaml", Format: "yaml" } -- { FileName: "test/14.2.2.result.human-readable.yaml", Format: "yaml-human-readable" } -- { FileName: "test/14.2.2.result.zpp", Format: "zpp" } +- { FileName: "test/14.2.2.4.result.yaml", Format: "yaml" } +- { FileName: "test/14.2.2.4.result.human-readable.yaml", Format: "yaml-human-readable" } +- { FileName: "test/14.2.2.4.result.zpp", Format: "zpp" } diff --git a/test/14.2.2.5.plot.yaml b/test/14.2.2.5.plot.yaml new file mode 100644 index 0000000..6b445a2 --- /dev/null +++ b/test/14.2.2.5.plot.yaml @@ -0,0 +1,14 @@ +PrimativeCell: +- [ 1.548010265167714, -2.681232429908652, 0.000000000000000 ] # a +- [ 1.548010265167714, 2.681232429908652, 0.000000000000000 ] # b +- [ 0.000000000000000, 0.000000000000000, 5.061224103556595 ] # c +SourceFilename: ./test/14.2.2.5.result.zpp +Figures: +- Qpoints: + - - [ 0, 0, 0 ] + - [ 0.5, 0, 0 ] + - [ 0.3333333, 0.3333333, 0 ] + - [ 0, 0, 0 ] + Resolution: [ 1024, 400 ] + Range: [ -5, 35 ] + Filename: ./test/14.2.2.5.png diff --git a/test/14.2.2.5.unfold.yaml b/test/14.2.2.5.unfold.yaml new file mode 100644 index 0000000..bda3826 --- /dev/null +++ b/test/14.2.2.5.unfold.yaml @@ -0,0 +1,12 @@ +PrimativeCell: +- [ 1.548010265167714, -2.681232429908652, 0.000000000000000 ] # a +- [ 1.548010265167714, 2.681232429908652, 0.000000000000000 ] # b +- [ 0.000000000000000, 0.000000000000000, 5.061224103556595 ] # c +SuperCellMultiplier: [ 3, 1, 1 ] +PrimativeCellBasisNumber: [ 8, 8, 8 ] +AtomPositionInputFile: { FileName: "/home/chn/Documents/lammps-SiC/14/14.2/14.2.2/14.2.2.5/band.yaml", Format: "yaml" } +QPointDataInputFile: { FileName: "/home/chn/Documents/lammps-SiC/14/14.2/14.2.2/14.2.2.5/band.yaml", Format: "yaml" } +QPointDataOutputFile: +- { FileName: "test/14.2.2.5.result.yaml", Format: "yaml" } +- { FileName: "test/14.2.2.5.result.human-readable.yaml", Format: "yaml-human-readable" } +- { FileName: "test/14.2.2.5.result.zpp", Format: "zpp" } diff --git a/test/14.2.4.4.plot.yaml b/test/14.2.4.4.plot.yaml new file mode 100644 index 0000000..6c812ae --- /dev/null +++ b/test/14.2.4.4.plot.yaml @@ -0,0 +1,14 @@ +PrimativeCell: +- [ 1.548010265167714, -2.681232429908652, 0.000000000000000 ] # a +- [ 1.548010265167714, 2.681232429908652, 0.000000000000000 ] # b +- [ 0.000000000000000, 0.000000000000000, 5.061224103556595 ] # c +SourceFilename: ./test/14.2.4.4.result.zpp +Figures: +- Qpoints: + - - [ 0, 0, 0 ] + - [ 0.5, 0, 0 ] + - [ 0.3333333, 0.3333333, 0 ] + - [ 0, 0, 0 ] + Resolution: [ 1024, 400 ] + Range: [ -5, 35 ] + Filename: ./test/14.2.4.4.png diff --git a/test/14.2.4.4.unfold.yaml b/test/14.2.4.4.unfold.yaml new file mode 100644 index 0000000..03fcf66 --- /dev/null +++ b/test/14.2.4.4.unfold.yaml @@ -0,0 +1,14 @@ +PrimativeCell: +- [ 1.548010265167714, -2.681232429908652, 0.000000000000000 ] # a +- [ 1.548010265167714, 2.681232429908652, 0.000000000000000 ] # b +- [ 0.000000000000000, 0.000000000000000, 5.061224103556595 ] # c +SuperCellMultiplier: [ 2, 2, 1 ] +PrimativeCellBasisNumber: [ 8, 8, 8 ] +AtomPositionInputFile: + FileName: "/home/chn/Documents/lammps-SiC/14/14.2/14.2.4/14.2.4.4/phonopy.yaml" + Format: "yaml" +QPointDataInputFile: { FileName: "/home/chn/Documents/lammps-SiC/14/14.2/14.2.4/14.2.4.4/band.hdf5", Format: "hdf5" } +QPointDataOutputFile: +- { FileName: "test/14.2.4.4.result.yaml", Format: "yaml" } +- { FileName: "test/14.2.4.4.result.human-readable.yaml", Format: "yaml-human-readable" } +- { FileName: "test/14.2.4.4.result.zpp", Format: "zpp" }