private void GenerateKmesh() { tb.kmesh = KptList.GenerateMesh(tb.lattice, tb.kgrid, tb.kshift, tb.symmetries, false); Output.WriteLine("Applied {0} symmetries to get {1} irreducible kpoints from {2}.", tb.symmetries.Count, tb.kmesh.Kpts.Count, tb.kmesh.AllKpts.Count); using (StreamWriter writer = new StreamWriter("kpts")) { for (int i = 0; i < tb.kmesh.Kpts.Count; i++) { Vector3 red = tb.lattice.ReducedCoords(tb.kmesh.Kpts[i].Value); writer.WriteLine("{0} {1}", i, red); } } if (tb.UseQPlane == false) { tb.qmesh = KptList.GenerateMesh(tb.lattice, tb.qgrid, tb.qshift, tb.symmetries, false); Output.WriteLine("Found {0} qpoints in the zone.", tb.qmesh.Kpts.Count); } if (tb.setQplane) { tb.qplane = KptList.GeneratePlane(tb.lattice, tb.qplaneDef, tb.symmetries, tb.qgrid, null); Output.WriteLine("Found {0} irreducible qpoints in the plane of {1} qpoints.", tb.qplane.Kpts.Count, tb.qplane.AllKpts.Count); using (StreamWriter writer = new StreamWriter("qpts")) { for (int i = 0; i < tb.qplane.Kpts.Count; i++) { Vector3 red = tb.lattice.ReducedCoords(tb.qplane.Kpts[i].Value); writer.WriteLine("{0} {1}", i, red); } } } }
void Run(string inputfile) { using (StreamWriter w = new StreamWriter("gplot.out")) { Output.SetFile(w); TightBindingSuite.TightBinding tb = new TightBindingSuite.TightBinding(); tb.LoadTB(inputfile); RpaParams p = new RpaParams(0, Vector3.Zero, tb.TemperatureMesh[0], tb.FrequencyMesh[0], tb.MuMesh[0]); KptList kmesh = KptList.GenerateMesh( tb.Lattice, tb.KMesh.Mesh, null, tb.Symmetries, true); Matrix[] green = CalcGreenFunction(tb, p, kmesh); while (true) { WriteGreenFunction(tb, green, kmesh); }; } }