Aditya Wibawa Sakti 2 years ago
parent b16ab9e31c
commit b482cc2368
  1. BIN
      .README.md.swp
  2. 48
      cmmde_gui/geom.xyz
  3. 30
      cmmde_gui/gui.py

Binary file not shown.

@ -1,38 +1,10 @@
Al12 O18
1.0
4.805028 0.000000 0.000000
-2.402514 4.161276 0.000000
0.000000 0.000000 13.116254
Al O
12 18
direct
0.000000 0.000000 0.147904 Al
0.333333 0.666667 0.018763 Al
0.333333 0.666667 0.314571 Al
0.666667 0.333333 0.185429 Al
0.666667 0.333333 0.481237 Al
0.000000 0.000000 0.352096 Al
0.000000 0.000000 0.647904 Al
0.333333 0.666667 0.518763 Al
0.333333 0.666667 0.814571 Al
0.666667 0.333333 0.685429 Al
0.666667 0.333333 0.981237 Al
0.000000 0.000000 0.852096 Al
0.306146 0.000000 0.250000 O
0.666667 0.027187 0.083333 O
0.000000 0.306146 0.250000 O
0.693854 0.693854 0.250000 O
0.972813 0.639479 0.083333 O
0.360521 0.333333 0.083333 O
0.972813 0.333333 0.583333 O
0.333333 0.360521 0.416667 O
0.666667 0.639479 0.583333 O
0.360521 0.027187 0.583333 O
0.639479 0.972813 0.416667 O
0.027187 0.666667 0.416667 O
0.639479 0.666667 0.916667 O
0.000000 0.693854 0.750000 O
0.333333 0.972813 0.916667 O
0.027187 0.360521 0.916667 O
0.306146 0.306146 0.750000 O
0.693854 0.000000 0.750000 O
8
Diisi judulpun tidak masalah
C -1.09158 0.31253 0.00000
C 0.40641 0.34539 0.00000
O 0.99388 1.41528 -0.00000
O 1.11593 -0.80223 0.00000
H -1.50826 1.34248 0.00000
H -1.45092 -0.22036 0.90489
H -1.45092 -0.22036 -0.90489
H 0.67957 -1.66578 0.00000

@ -29,7 +29,7 @@ def cmmde_gui():
# Terminal widget
TextArea= pn.widgets.TextAreaInput(value = "Computational Molecular and Material Design Environment\n Authors:\n Universitas Pertamina\n Institut Teknologi Sumatera\n Masyarakat Komputasi Indonesia\n\nSupported by:\n Konsorsium Pengembangan Sains Komputasi",
TextArea= pn.widgets.TextAreaInput(value = "Computational Molecular and Material Design Environment\n Authors:\n Universitas Pertamina\n Institut Teknologi Sumatera\n Masyarakat Komputasi Indonesia\n\nSupported by:\n Konsorsium Pengembangan Sains Komputasi\n",
height = 500, disabled=True
)
# CMMDE software options
@ -52,7 +52,7 @@ def cmmde_gui():
# File input (if you don't want to draw the structure)
FileInput = pn.widgets.FileInput(title='Input structure',accept='.xyz, .vasp, CONTCAR, POSCAR, .pdb')
FileInput = pn.widgets.FileInput(title='Input structure',accept='.xyz,.vasp,.pdb')
def fileinput(event):
if FileInput.value is not None:
FileInput.save("geom.xyz")
@ -75,11 +75,13 @@ def cmmde_gui():
job_list = [job[i] for i in job_btn.value]
jobs = ",".join(job_list)
if editor == JSMEEditor(value=" "):
geom = save(FileInput.filename)
if editor.value == "":
FileInput.save("geom.xyz")
geom = "geom.xyz"
else:
geom = editor.value
TextArea.value = TextArea.value + "\n" + "Mempersiapkan Struktur 3 Dimensi!"
cmd = subprocess.run(["cmmde.py","-i","{}".format(geom),"-s","{}".format(software[software_btn.value]),"-j","{}".format(jobs),"-m","{}".format(method[method_btn.value]),"-c","{}".format(charge.value),"-mult","{}".format(mult.value)],capture_output=True,text=True)
#terminal.subprocess.run("cmmde.py","-i{}".format(editor.value),"-s{}".format(software[software_btn.value]), "-j{}".format(jobs), "-m{}".format(method[method_btn.value]))
@ -169,10 +171,16 @@ def cmmde_gui():
layer_input = pn.widgets.TextInput(name="Layer",placeholder="Example: 2")
slabbuilder_btn = pn.widgets.Button(name="Build it!",button_type="primary")
Material_input = pn.widgets.TextInput(name="Material name")
Material_upload = pn.widgets.FileInput(title='Input structure')
def materialinput(event):
if Material_upload.value is not None:
Material_upload.save("POSCAR")
Material_upload.param.watch(materialinput,'value')
# Generate material folder button
materialdir_btn = pn.widgets.Button(name="Generate work directory",type="primary")
TextWarning = pn.widgets.StaticText()
def materialgen(event):
Folder = workdir + "/" + id_input.value + "/" + Material_input.value
isExist = os.path.exists(Folder)
@ -185,9 +193,9 @@ def cmmde_gui():
materialdir_btn.on_click(materialgen)
def slab_builder(event):
Folder = workdir + "/" + id_input.value + "/" + Molecule_input.value
Folder = workdir + "/" + id_input.value + "/" + Material_input.value
os.chdir(Folder)
os.system("mv geom.xyz POSCAR")
# os.system("mv geom.xyz POSCAR")
hkl = hkl_input.value
size = size_input.value
layer = layer_input.value
@ -257,8 +265,8 @@ def cmmde_gui():
return pn.template.MaterialTemplate(
site="CMMDE-GUI",
title="CMMDE Editor",
main=[editor, TextArea, pn.Tabs(xyzviewer)],
sidebar=[pn.Card(id_input,title="User Information",collapsed=True),pn.Card(Molecule_input,charge,mult,checkdir_btn,TextWarning,pn.Card(FileInput,title="Upload molecule",collapsed=True),title="Molecule Information",collapsed=True),pn.Card(Material_input, materialdir_btn, pn.Card(FileInput,title="Unit cell",collapsed=True),hkl_input,size_input,layer_input,pn.Row(slabbuilder_btn,visual_btn),pn.Row(download_xyz,download_slab),title="Surface Builder",collapsed=True),pn.Card(pn.Card(software_btn,job_btn,method_btn,pn.Row(Run_btn,Progress_btn),pn.Row(Checkcalc_btn,visual_btn),title="General calculation",collapsed=True),title="Main Calculation",collapsed=True),pn.Card(post_software_btn,post_btn,post_method_btn,pn.Row(runpost_btn,Progress_btn),pn.Row(Checkcalc_btn,visual_btn),title="Post-Calculation",collapsed=True)],
main=[TextArea, editor, xyzviewer],
sidebar=[pn.Card(id_input,title="User Information",collapsed=True),pn.Card(Molecule_input,charge,mult,checkdir_btn,TextWarning,pn.Card(FileInput,title="Upload molecule",collapsed=True),title="Molecule Information",collapsed=True),pn.Card(Material_input, materialdir_btn,TextWarning, pn.Card(FileInput,title="Unit cell",collapsed=True),hkl_input,size_input,layer_input,pn.Row(slabbuilder_btn,visual_btn),pn.Row(download_xyz,download_slab),title="Surface Builder",collapsed=True),pn.Card(software_btn,job_btn,method_btn,pn.Row(Run_btn,Progress_btn),pn.Row(Checkcalc_btn,visual_btn),title="Main Calculation",collapsed=True),pn.Card(post_software_btn,post_btn,post_method_btn,pn.Row(runpost_btn,Progress_btn),pn.Row(Checkcalc_btn,visual_btn),title="Post-Calculation",collapsed=True)],
header_background=accent, accent_base_color=accent
)

Loading…
Cancel
Save