UnityMol  0.9.6-875
UnityMol viewer / In developement
ArtemisOldGUI.cs
Go to the documentation of this file.
1 using UnityEngine;
2 using System.Collections;
3 using UI;
4 using System;
5 
6 public class ArtemisOldGUI {
7  public static string host = "localhost";
8  public static string portString = "3000";
9 
10  private static string snapshotNotificationMessage = "";
11 
12  public static string artemisNotificationMessage = "";
13 
15  public static void ArtemisMenu (int a) {
17 
18  GUILayout.Label(artemisNotificationMessage);
19 
20  GUILayout.Space (10);
21 
23  {
24  GUILayout.BeginHorizontal();
25  GUILayout.Label("Server");
26  GUILayout.EndHorizontal();
27 
28  GUILayout.BeginHorizontal();
29  host = GUILayout.TextField(host, 30);
30  GUILayout.EndHorizontal();
31 
32  GUILayout.BeginHorizontal();
33  GUILayout.Label("Port");
34  GUILayout.EndHorizontal();
35 
36  GUILayout.BeginHorizontal();
37  portString = GUILayout.TextField(portString, 30);
38  GUILayout.EndHorizontal();
39 
40  GUILayout.BeginHorizontal();
41  if (GUILayout.Button (new GUIContent("Connect", "Connect to simulation server")))
42  {
44  }
45  GUILayout.EndHorizontal();
46  }
47  else
48  {
49  GUILayout.BeginHorizontal();
50  LoadTypeGUI.toggleIMDTotalEnergy = GUILayout.Toggle(LoadTypeGUI.toggleIMDTotalEnergy, new GUIContent("Total energy plot (white)", "Display the total energy plot."));
51  GUILayout.EndHorizontal();
52 
53  GUILayout.BeginHorizontal();
54  GUILayout.Label(ArtemisManager.Etot.ToString());
55  GUILayout.EndHorizontal();
56 
57  GUILayout.BeginHorizontal();
58  LoadTypeGUI.toggleIMDHBondsEnergy = GUILayout.Toggle(LoadTypeGUI.toggleIMDHBondsEnergy, new GUIContent("Hydrogen bonds energy plot (green)", "Display the hydrogen bonds energy plot."));
59  GUILayout.EndHorizontal();
60 
61  GUILayout.BeginHorizontal();
62  GUILayout.Label(ArtemisManager.Evdw.ToString());
63  GUILayout.EndHorizontal();
64 
65  GUILayout.BeginHorizontal();
66  LoadTypeGUI.toggleIMDStackingEnergy = GUILayout.Toggle(LoadTypeGUI.toggleIMDStackingEnergy, new GUIContent("Stacking energy plot (red)", "Display the stacking energy plot."));
67  GUILayout.EndHorizontal();
68 
69  GUILayout.BeginHorizontal();
70  GUILayout.Label(ArtemisManager.Eelec.ToString());
71  GUILayout.EndHorizontal();
72 
73  GUILayout.Space (10);
74 
75  GUILayout.BeginHorizontal();
76  GUILayout.Label(snapshotNotificationMessage);
77  GUILayout.EndHorizontal();
78 
79  GUILayout.BeginHorizontal();
80  if (GUILayout.Button (new GUIContent("Save Snapshot to local disk", "Save a snapshot of current atom positions"))) {
81  snapshotNotificationMessage = "Saving file...";
82  string filename = SnapshotManager.saveSnapshot();
83  snapshotNotificationMessage = "Snapshot save to file " + SnapshotManager.getPath() + filename;
84  }
85  GUILayout.EndHorizontal();
86 
87  GUILayout.Space (40);
88 
89  GUILayout.BeginHorizontal();
90  if (GUILayout.Button (new GUIContent("Disconnect", "Disconnect from simulation server")))
91  {
92  artemisNotificationMessage = "Disconnected";
94  }
95  GUILayout.EndHorizontal();
96 
97  GUILayout.BeginHorizontal();
98  if (GUILayout.Button (new GUIContent("Stop", "Stop the simulation")))
99  {
101  }
102  GUILayout.EndHorizontal();
103  }
104 
105  GUI.enabled = true; // otherwise the window might not be draggable
106  GUI.DragWindow();
107  } // End of Surface
108 
109 }
static float Evdw
static string artemisNotificationMessage
static float Eelec
static float Etot
static string getPath()
Get the path of the directory to which snapshots are saved.
static string host
Definition: ArtemisOldGUI.cs:7
static void ArtemisMenu(int a)
Artemis main GUI window rendering procedure.
static bool SetTitleExit(string s)
This is a somewhat odd but very convenient function.
Definition: LoadTypeGUI.cs:153
static string snapshotNotificationMessage
static ArtemisManager getArtemisManager()
Definition: UnityMolMain.cs:29
void stop_simulation()
static string portString
Definition: ArtemisOldGUI.cs:8
Definition: GUIDisplay.cs:66
static string saveSnapshot()
Save a snapshot of the molecule in a PDB file on disk.