annabossler commited on
Commit
da5f575
·
verified ·
1 Parent(s): 5dcd4f0

trying to reverse changes

Browse files
Files changed (1) hide show
  1. app.py +126 -0
app.py CHANGED
@@ -159,6 +159,132 @@ def relax_wrapper(structure_file, task_name, steps, fmax, charge, spin, relax_ce
159
  # ==== UI ====
160
  with gr.Blocks(theme=gr.themes.Ocean(), title="OrbMol Demo") as demo:
161
  with gr.Tabs():
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  # -------- SPE --------
163
  with gr.Tab("Single Point Energy"):
164
  with gr.Row():
 
159
  # ==== UI ====
160
  with gr.Blocks(theme=gr.themes.Ocean(), title="OrbMol Demo") as demo:
161
  with gr.Tabs():
162
+ # -------- HOME TAB --------
163
+ with gr.Tab("Home"):
164
+ with gr.Row():
165
+ # Columna izquierda con acordeones
166
+ with gr.Column(scale=1):
167
+ gr.Markdown("## Learn more about OrbMol")
168
+
169
+ with gr.Accordion("What is OrbMol?", open=False):
170
+ gr.Markdown("""
171
+ OrbMol is a suite of quantum-accurate machine learning models for molecular predictions. Built on the **Orb-v3 architecture**, OrbMol provides fast and accurate calculations of energies, forces, and molecular properties at the level of advanced quantum chemistry methods.
172
+
173
+ The models combine the transferability of universal potentials with quantum-level accuracy, making them suitable for a wide range of applications in chemistry, materials science, and drug discovery.
174
+ """)
175
+
176
+ with gr.Accordion("Available Models", open=False):
177
+ gr.Markdown("""
178
+ **OMol** and **OMol-Direct**
179
+ - **Training dataset**: OMol25 (>100M calculations on small molecules, biomolecules, metal complexes, and electrolytes)
180
+ - **Level of theory**: ωB97M-V/def2-TZVPD with non-local dispersion; solvation treated explicitly
181
+ - **Inputs**: total charge & spin multiplicity
182
+ - **Applications**: biology, organic chemistry, protein folding, small-molecule drugs, organic liquids, homogeneous catalysis
183
+ - **Caveats**: trained only on aperiodic systems → periodic/inorganic cases may not work well
184
+ - **Difference**: OMol enforces energy–force consistency; OMol-Direct relaxes this for efficiency
185
+
186
+ **OMat**
187
+ - **Training dataset**: OMat24 (>100M inorganic calculations, from Materials Project, Alexandria, and far-from-equilibrium samples)
188
+ - **Level of theory**: PBE/PBE+U with Materials Project settings; VASP 54 pseudopotentials; no dispersion
189
+ - **Inputs**: No support for spin and charge. Spin polarization included but magnetic state cannot be selected
190
+ - **Applications**: inorganic discovery, photovoltaics, alloys, superconductors, electronic/optical materials
191
+ - **Caveats**: magnetic effects may be incompletely captured
192
+ """)
193
+
194
+ with gr.Accordion("Supported File Formats", open=False):
195
+ gr.Markdown("""
196
+ OrbMol supports the following molecular structure formats:
197
+ - `.xyz` - XYZ coordinate files
198
+ - `.pdb` - Protein Data Bank format
199
+ - `.cif` - Crystallographic Information File
200
+ - `.traj` - ASE trajectory format
201
+ - `.mol` - MDL Molfile
202
+ - `.sdf` - Structure Data File
203
+
204
+ All formats are automatically converted internally for processing.
205
+ """)
206
+
207
+ with gr.Accordion("How to Use", open=False):
208
+ gr.Markdown("""
209
+ **Single Point Energy**: Upload a molecular structure and select a model to calculate energies and forces.
210
+
211
+ **Molecular Dynamics**: Run time-dependent simulations to observe molecular behavior at different temperatures and conditions.
212
+
213
+ **Relaxation/Optimization**: Find the minimum-energy configuration of your molecular structure.
214
+
215
+ Each tab provides specific parameters you can adjust to customize your calculations.
216
+ """)
217
+
218
+ with gr.Accordion("Technical Foundation", open=False):
219
+ gr.Markdown("""
220
+ All models are based on the **Orb-v3 architecture**, the latest generation of Orb universal interatomic potentials.
221
+
222
+ Key features:
223
+ - Graph neural network architecture
224
+ - Equivariant message passing
225
+ - Multi-task learning across different quantum chemistry methods
226
+ - Billions of training examples across diverse chemical spaces
227
+ - Sub-kcal/mol accuracy on test sets
228
+ """)
229
+
230
+ with gr.Accordion("Resources & Support", open=False):
231
+ gr.Markdown("""
232
+ - [Orb-v3 paper](https://arxiv.org/abs/2504.06231)
233
+ - [Orb-Models GitHub repository](https://github.com/orbital-materials/orb-models)
234
+ - For issues/questions, please open a GitHub issue or contact the developers
235
+
236
+ **Citation**: If you use OrbMol in your research, please cite the Orb-v3 paper and the relevant dataset papers (OMol25/OMat24).
237
+ """)
238
+
239
+ # Columna derecha con contenido principal
240
+ with gr.Column(scale=2):
241
+ gr.Image("logo_color_text.png",
242
+ show_share_button=False,
243
+ show_download_button=False,
244
+ show_label=False,
245
+ show_fullscreen_button=False)
246
+
247
+ gr.Markdown("# OrbMol — Quantum-Accurate Molecular Predictions")
248
+
249
+ gr.Markdown("""
250
+ Welcome to the OrbMol demo! This interactive platform allows you to explore the capabilities of our quantum-accurate machine learning models for molecular simulations.
251
+
252
+ ## Quick Start
253
+
254
+ Use the tabs above to access different functionalities:
255
+
256
+ 1. **Single Point Energy**: Calculate energies and forces for a given molecular structure
257
+ 2. **Molecular Dynamics**: Run MD simulations using OrbMol-trained potentials
258
+ 3. **Relaxation / Optimization**: Optimize molecular structures to their minimum-energy configurations
259
+
260
+ Simply upload a molecular structure file in any supported format (`.xyz`, `.pdb`, `.cif`, `.traj`, `.mol`, `.sdf`) and select the appropriate model for your system.
261
+
262
+ ## Model Selection Guide
263
+
264
+ **Choose OMol/OMol-Direct for:**
265
+ - Organic molecules and biomolecules
266
+ - Drug-like compounds
267
+ - Metal-organic complexes
268
+ - Molecules in solution
269
+ - Systems where you need to specify charge and spin
270
+
271
+ **Choose OMat for:**
272
+ - Inorganic crystals and materials
273
+ - Periodic systems
274
+ - Bulk materials and alloys
275
+ - Solid-state compounds
276
+
277
+ Explore the accordions on the left to learn more about each model's capabilities, training data, and limitations.
278
+ """)
279
+
280
+ gr.Markdown("## Try an Example")
281
+ gr.Markdown("""
282
+ To get started quickly, navigate to any of the calculation tabs above and try one of these examples:
283
+ - **Single Point Energy**: Upload a small molecule to see energy and force predictions
284
+ - **Molecular Dynamics**: Run a short simulation at 300K to observe thermal motion
285
+ - **Relaxation**: Optimize a distorted structure to find its equilibrium geometry
286
+ """)
287
+
288
  # -------- SPE --------
289
  with gr.Tab("Single Point Energy"):
290
  with gr.Row():