AndreiVoicuT commited on
Commit
174b314
1 Parent(s): d1526b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -53
app.py CHANGED
@@ -3,8 +3,7 @@ import os
3
  os.environ['KMP_DUPLICATE_LIB_OK']='True'
4
 
5
  import gradio as gr
6
- from interface_connection import compute_supercell_a, compute_supercell_b, gpaw_calc_energy
7
-
8
  with gr.Blocks() as latmatcher:
9
  gr.Markdown(
10
  "## Craft custom materials that precisely fit your needs wit our MaterialMattcher.\n Not sure from waht materials to start? Simply tell us your desired properties.")
@@ -64,56 +63,7 @@ with gr.Blocks() as latmatcher:
64
  max_angle, max_strain],
65
  outputs=[file_angle, file_strain])
66
 
67
- with gr.Tabs():
68
- with gr.TabItem(label="GPAW calculator"):
69
- file_gpaw_format = gr.Dropdown([".xyz", "bespoke.json"],
70
- label="format", info="Select file format")
71
- file_gpaw= gr.File(label="input file (xyz+celll or bespoke.json )", )
72
-
73
- with gr.Row():
74
- convergence_forces=gr.Slider(0.001,0.1, label="convergence forces", step=0.0001)
75
- hund=gr.Dropdown(["True", "False"],label="hund", value="True" )
76
- xc=gr.Dropdown(["PBE","LDA"], allow_custom_value=True,label="xc", value="PBE")
77
- basis=gr.Dropdown(["dzp", None], allow_custom_value=True,label="basis", value=None)
78
-
79
- gr.Markdown("Mixer:")
80
- with gr.Row():
81
- beta = gr.Slider(0.000, 0.05, label="beta:", step=0.0001,value=0.01 )
82
- method = gr.Dropdown(["sum","difference", None], allow_custom_value=True, label="method:")
83
- weight = gr.Dropdown([100,200, None], allow_custom_value=True, label="weight:", value=100)
84
- backend= gr.Dropdown(["pulay", None], allow_custom_value=True, label="backend:", value=None)
85
-
86
- gr.Markdown("Mode:")
87
-
88
- with gr.Row():
89
- ecut=gr.Slider(100, 1000, label="ecut:", step=10,value=800 )
90
- mode_name=gr.Dropdown(["pw", None], allow_custom_value=True, label="mode_name:", value="pw")
91
-
92
- maxiter = gr.Slider(100, 2000, label="maxiter:", step=10,value=100 )
93
-
94
- kpts=gr.Textbox(label="KPTS:", info="kpts in dictionary list form")
95
-
96
- gr.Markdown("log info:")
97
- log_file_name=gr.Textbox(label="Name of log file",lines=1,value="gpaw_exp.log",)
98
- mail=gr.Textbox( label="Mail:",
99
- info="email at witch you wish to get the log file",
100
- lines=1,
101
- value="tomutvoicuandrei@gmail.com",)
102
-
103
- gpaw_energy_button = gr.Button("Compute energy with GPAW calculator")
104
- gpaw_energy=gr.Textbox(label="Potential energy:", info="computed energy:")
105
-
106
- gpaw_energy_button.click(gpaw_calc_energy,
107
- inputs=[file_gpaw_format,
108
- file_gpaw,
109
- convergence_forces,
110
- hund,
111
- xc, basis,
112
- beta, method,
113
- weight,backend,
114
- ecut, mode_name,
115
- maxiter, kpts,
116
- log_file_name, mail],
117
- outputs=[gpaw_energy])
118
 
119
  latmatcher.launch(share=False)
 
3
  os.environ['KMP_DUPLICATE_LIB_OK']='True'
4
 
5
  import gradio as gr
6
+ from interface_connection import compute_supercell_a, compute_supercell_b
 
7
  with gr.Blocks() as latmatcher:
8
  gr.Markdown(
9
  "## Craft custom materials that precisely fit your needs wit our MaterialMattcher.\n Not sure from waht materials to start? Simply tell us your desired properties.")
 
63
  max_angle, max_strain],
64
  outputs=[file_angle, file_strain])
65
 
66
+
67
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  latmatcher.launch(share=False)