Beispiel #1
0
    def view_osz(self):
        path = '.'
        if self.value.value == 'EV curve':
            path = glob.glob('voldep/volume_*')[0]
        print(path)

        Bash.execute("emacs {0}/OSZICAR".format(path))
Beispiel #2
0
 def conv2poscar(cif_file, out_path):
     """
     A cif file convert to POSCAR
     """
     cif_file = os.path.normpath(cif_file)
     cmd = 'cif2cell -p vasp -f {0} -o {1}/POSCAR --no-reduce \
     --vasp-print-species --vasp-cartesian-lattice-vectors \
     --vasp-format=5'.format(cif_file, out_path)
     Bash.execute(cmd)
Beispiel #3
0
 def execute(self):
     if self.value == 'EV curve':
         Bash.execute("batch_run.sh 100")
     else:
         Bash.execute("qsub run.sh")
     top = tk.Toplevel()
     f = tk.Frame(top)
     f.pack()
     label = tk.Label(f, text="{0} calculation started !".format(self.value))
     label.pack()
     btn = tk.Button(f, text="OK", command=top.destroy)
     btn.pack()
Beispiel #4
0
def relax(path, num, vaspcmd):
    """
    judgeの結果がTrueの場合終了
    それ以外はOSZICAR, OUTCARを保管してVASPを再実行
    """
    for i in range(0, num):
        judge = judge_oszicar(path)
        if judge:
            break
        else:
            shutil.copyfile('OUTCAR', "out.relax.{0}".format(i))
            shutil.copyfile('OSZICAR', "osz.relax.{0}".format(i))
            shutil.copyfile('CONTCAR', 'POSCAR')
            print("Start re-calculation.")
            Bash.execute(vaspcmd)
Beispiel #5
0
 def set_single(self):
     Bash.execute("vaspy prep_all")
     Bash.execute("sed -e 's/ISPIN = 2/ISPIN = 1/g' INCAR_static > INCAR")
     Bash.execute("sed -i 's/LCHARG = .FALSE./LCHAG = .TRUE./g' INCAR")
     shutil.copyfile('KPOINTS_relax', 'KPOINTS')
     shutil.copyfile('Calc/run_std.sh', 'run.sh')
     self.value = "single"
     self.label.configure(text=self.getText())
Beispiel #6
0
    def set_EV(self, vrange):
        # Bash.execute("rm -r voldep")
        Bash.execute("vaspy prep_all")
        Bash.execute("rm list_run")
        Bash.execute(
            "vasp_voldep.py range_percent --range_list {0[0]} {0[1]} {0[2]}".format(vrange))
        shutil.copyfile('Calc/run_voldep_enshu.sh', 'run_voldep.sh')
        self.value = "EV curve"
        self.label.configure(text=self.getText())

        top = tk.Toplevel()
        f = tk.Frame(top)
        f.pack()
        label = tk.Label(f, text="Series of calculations were prepared !")
        label.pack()
        btn = tk.Button(f, text="OK", command=top.destroy)
        btn.pack()
Beispiel #7
0
 def plot_voldep(self):
     # Bash.execute("calc_murnaghan.py get --fig")
     Bash.execute('calc_murnaghan.py get --fig --show --wo_mag')
Beispiel #8
0
 def draw_band(self):
     Bash.execute("vasp_plot.py band_nonmag --save")
Beispiel #9
0
 def view_bz(self):
     Bash.execute("vasp_kpoints.py view_bz")
Beispiel #10
0
 def set_band(self):
     Bash.execute("vaspy prep_all")
     Bash.execute("sed -e 's/ISPIN = 2/ISPIN = 1/g' INCAR_dos > INCAR")
     self.value = "band"
     shutil.copyfile('Calc/run_band_enshu.sh', 'run.sh')
     self.label.configure(text=self.getText())
Beispiel #11
0
 def edit_incar(self):
     Bash.execute("emacs INCAR")
Beispiel #12
0
 def vesta(self):
     Bash.execute("VESTA POSCAR")
Beispiel #13
0
 def edit_poscar(self):
     Bash.execute("emacs POSCAR")