diff --git a/cmmde_gui/gui.py b/cmmde_gui/gui.py index df55052..24dca7e 100755 --- a/cmmde_gui/gui.py +++ b/cmmde_gui/gui.py @@ -121,13 +121,15 @@ def cmmde_gui(): post_software_btn = pn.widgets.Select(name="Software selections for post calculations",value='Orca',options=['Orca','GROMACS','Dcdftbmd','Quantum Espresso']) post_software = {'Orca':'orca','GROMACS':'gromacs','Dcdftbmd':'dcdftb','Quantum Espresso':'qe'} # Post CMMDE method options - post_method_btn = pn.widgets.Select(name="Method selections for post calculations",value='GFN2-xTB',options=['GFN2-xTB','GFN1-xTB','DFTB2','DFTB2-gammah','DFTB3','DFTB3-diag']) - post_method = {'GFN2-xTB':'XTB2', 'GFN1-xTB':'XTB1','DFTB2':'DFTB2','DFTB2-gammah':'DFTB2_gammah','DFTB3':'DFTB3','DFTB3-diag':'DFTB3-diag'} + post_method_btn = pn.widgets.Select(name="Method selections for post calculations",value='GFN2-xTB',options=['GFN2-xTB','GFN1-xTB','DFTB2','DFTB2-gammah','DFTB3','DFTB3-diag','B3LYP/def2-svp']) + post_method = {'GFN2-xTB':'XTB2', 'GFN1-xTB':'XTB1','DFTB2':'DFTB2','DFTB2-gammah':'DFTB2_gammah','DFTB3':'DFTB3','DFTB3-diag':'DFTB3-diag','B3LYP/def2-svp':'B3LYP def2-svp'} def post_calculation(event): # terminal.clear() + Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value + os.chdir(Folder) if post_calc[post_btn.value] == 'thermo' and post_software[post_software_btn.value] == 'orca': - Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value - os.chdir(Folder) + # Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value + # os.chdir(Folder) if not os.path.exists(post_calc[post_btn.value]): os.makedirs(post_calc[post_btn.value]) os.chdir(post_calc[post_btn.value]) @@ -135,8 +137,8 @@ def cmmde_gui(): cmd = subprocess.run(["cmmdepost.py","-j","{}".format(post_calc[post_btn.value]),"-s","{}".format(post_software[post_software_btn.value])],capture_output=True,text=True) TextArea.value = TextArea.value + "\n" + cmd.stdout elif post_calc[post_btn.value] == 'ir' and post_software[post_software_btn.value] == 'orca': - Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value - os.chdir(Folder) + # Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value + # os.chdir(Folder) if not os.path.exists(post_calc[post_btn.value]): os.makedirs(post_calc[post_btn.value]) os.chdir(post_calc[post_btn.value]) @@ -145,11 +147,13 @@ def cmmde_gui(): TextArea.value = TextArea.value + "\n" + "Plot spektrum IR berhasil dilakukan" # terminal.subprocess.run("cmmdepost.py","-j{}".format(post_calc[post_btn.value]),"-s{}".format(post_software[post_software_btn.value])) elif post_calc[post_btn.value] == 'opt' and post_software[post_software_btn.value] == 'orca': + # Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value + # os.chdir(Folder) cmd = subprocess.run(["cmmdepost.py","-j","{}".format(post_calc[post_btn.value]),"-s","{}".format(post_software[post_software_btn.value]),"-m","{}".format(post_method[post_method_btn.value])],capture_output=True,text=True) TextArea.value = TextArea.value + "\n" + cmd.stdout else: - Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value - os.chdir(Folder) + # Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value + # os.chdir(Folder) os.makedirs(post_calc[post_btn.value]) os.chdir(post_calc[post_btn.value]) cmd = subprocess.run(["cmmde.py","-i","{}".format("../cmmd.xyz"),"-s","{}".format(post_software[post_software_btn.value]),"-j","{}".format(post_calc[post_btn.value]),"-m","{}".format(post_method[post_method_btn.value])],capture_output=True,text=True)