-
Notifications
You must be signed in to change notification settings - Fork 1
/
dlgdirac.py
268 lines (262 loc) · 15.6 KB
/
dlgdirac.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dlgdirac.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_DlgDiract(object):
def setupUi(self, DlgDiract):
DlgDiract.setObjectName("DlgDiract")
DlgDiract.resize(575, 558)
font = QtGui.QFont()
font.setPointSize(13)
DlgDiract.setFont(font)
self.buttonBox = QtWidgets.QDialogButtonBox(DlgDiract)
self.buttonBox.setGeometry(QtCore.QRect(380, 440, 161, 81))
font = QtGui.QFont()
font.setPointSize(14)
self.buttonBox.setFont(font)
self.buttonBox.setOrientation(QtCore.Qt.Vertical)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.groupBoxPos = QtWidgets.QGroupBox(DlgDiract)
self.groupBoxPos.setGeometry(QtCore.QRect(20, 20, 191, 121))
self.groupBoxPos.setObjectName("groupBoxPos")
self.label_3 = QtWidgets.QLabel(self.groupBoxPos)
self.label_3.setGeometry(QtCore.QRect(30, 90, 21, 17))
self.label_3.setObjectName("label_3")
self.label_2 = QtWidgets.QLabel(self.groupBoxPos)
self.label_2.setGeometry(QtCore.QRect(30, 60, 21, 17))
self.label_2.setObjectName("label_2")
self.label = QtWidgets.QLabel(self.groupBoxPos)
self.label.setGeometry(QtCore.QRect(30, 30, 21, 17))
self.label.setObjectName("label")
self.txposX = QtWidgets.QLineEdit(self.groupBoxPos)
self.txposX.setGeometry(QtCore.QRect(60, 30, 61, 25))
self.txposX.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txposX.setObjectName("txposX")
self.txposY = QtWidgets.QLineEdit(self.groupBoxPos)
self.txposY.setGeometry(QtCore.QRect(60, 60, 61, 25))
self.txposY.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txposY.setObjectName("txposY")
self.txposZ = QtWidgets.QLineEdit(self.groupBoxPos)
self.txposZ.setGeometry(QtCore.QRect(60, 90, 61, 25))
self.txposZ.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txposZ.setObjectName("txposZ")
self.groupBox_K = QtWidgets.QGroupBox(DlgDiract)
self.groupBox_K.setGeometry(QtCore.QRect(220, 20, 161, 131))
self.groupBox_K.setObjectName("groupBox_K")
self.label_4 = QtWidgets.QLabel(self.groupBox_K)
self.label_4.setGeometry(QtCore.QRect(30, 90, 21, 17))
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(self.groupBox_K)
self.label_5.setGeometry(QtCore.QRect(30, 60, 31, 20))
self.label_5.setObjectName("label_5")
self.label_6 = QtWidgets.QLabel(self.groupBox_K)
self.label_6.setGeometry(QtCore.QRect(30, 30, 31, 20))
self.label_6.setObjectName("label_6")
self.txkX = QtWidgets.QLineEdit(self.groupBox_K)
self.txkX.setGeometry(QtCore.QRect(60, 30, 61, 25))
self.txkX.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txkX.setObjectName("txkX")
self.txkY = QtWidgets.QLineEdit(self.groupBox_K)
self.txkY.setGeometry(QtCore.QRect(60, 60, 61, 25))
self.txkY.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txkY.setObjectName("txkY")
self.txkZ = QtWidgets.QLineEdit(self.groupBox_K)
self.txkZ.setGeometry(QtCore.QRect(60, 90, 61, 25))
self.txkZ.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txkZ.setObjectName("txkZ")
self.groupBoxSpin = QtWidgets.QGroupBox(DlgDiract)
self.groupBoxSpin.setGeometry(QtCore.QRect(0, 140, 581, 291))
self.groupBoxSpin.setObjectName("groupBoxSpin")
self.opcspin0 = QtWidgets.QRadioButton(self.groupBoxSpin)
self.opcspin0.setGeometry(QtCore.QRect(10, 40, 311, 23))
self.opcspin0.setChecked(False)
self.opcspin0.setObjectName("opcspin0")
self.opcspin1 = QtWidgets.QRadioButton(self.groupBoxSpin)
self.opcspin1.setGeometry(QtCore.QRect(10, 70, 331, 23))
self.opcspin1.setChecked(True)
self.opcspin1.setObjectName("opcspin1")
self.txspinupreal = QtWidgets.QLineEdit(self.groupBoxSpin)
self.txspinupreal.setEnabled(True)
self.txspinupreal.setGeometry(QtCore.QRect(100, 130, 121, 25))
self.txspinupreal.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txspinupreal.setReadOnly(False)
self.txspinupreal.setObjectName("txspinupreal")
self.label_7 = QtWidgets.QLabel(self.groupBoxSpin)
self.label_7.setGeometry(QtCore.QRect(130, 110, 71, 20))
self.label_7.setObjectName("label_7")
self.txspinupimag = QtWidgets.QLineEdit(self.groupBoxSpin)
self.txspinupimag.setEnabled(True)
self.txspinupimag.setGeometry(QtCore.QRect(230, 130, 121, 25))
self.txspinupimag.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txspinupimag.setObjectName("txspinupimag")
self.label_8 = QtWidgets.QLabel(self.groupBoxSpin)
self.label_8.setGeometry(QtCore.QRect(250, 110, 111, 20))
self.label_8.setObjectName("label_8")
self.label_9 = QtWidgets.QLabel(self.groupBoxSpin)
self.label_9.setGeometry(QtCore.QRect(20, 130, 71, 20))
self.label_9.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_9.setObjectName("label_9")
self.txspindownreal = QtWidgets.QLineEdit(self.groupBoxSpin)
self.txspindownreal.setEnabled(True)
self.txspindownreal.setGeometry(QtCore.QRect(100, 170, 121, 25))
self.txspindownreal.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txspindownreal.setReadOnly(False)
self.txspindownreal.setObjectName("txspindownreal")
self.label_10 = QtWidgets.QLabel(self.groupBoxSpin)
self.label_10.setGeometry(QtCore.QRect(0, 170, 91, 20))
self.label_10.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_10.setObjectName("label_10")
self.txspindownimag = QtWidgets.QLineEdit(self.groupBoxSpin)
self.txspindownimag.setEnabled(True)
self.txspindownimag.setGeometry(QtCore.QRect(230, 170, 121, 25))
self.txspindownimag.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txspindownimag.setObjectName("txspindownimag")
self.btPlotSpin = QtWidgets.QPushButton(self.groupBoxSpin)
self.btPlotSpin.setEnabled(True)
self.btPlotSpin.setGeometry(QtCore.QRect(120, 240, 181, 41))
self.btPlotSpin.setObjectName("btPlotSpin")
self.verticalLayoutWidget = QtWidgets.QWidget(self.groupBoxSpin)
self.verticalLayoutWidget.setGeometry(QtCore.QRect(380, 50, 191, 201))
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
self.oglblochlayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
self.oglblochlayout.setContentsMargins(0, 0, 0, 0)
self.oglblochlayout.setObjectName("oglblochlayout")
self.bttop = QtWidgets.QPushButton(self.groupBoxSpin)
self.bttop.setGeometry(QtCore.QRect(0, 200, 51, 25))
self.bttop.setObjectName("bttop")
self.btbottom = QtWidgets.QPushButton(self.groupBoxSpin)
self.btbottom.setGeometry(QtCore.QRect(60, 200, 71, 25))
self.btbottom.setObjectName("btbottom")
self.btleft = QtWidgets.QPushButton(self.groupBoxSpin)
self.btleft.setGeometry(QtCore.QRect(140, 200, 51, 25))
self.btleft.setObjectName("btleft")
self.btright = QtWidgets.QPushButton(self.groupBoxSpin)
self.btright.setGeometry(QtCore.QRect(200, 200, 51, 25))
self.btright.setObjectName("btright")
self.btfront = QtWidgets.QPushButton(self.groupBoxSpin)
self.btfront.setGeometry(QtCore.QRect(260, 200, 51, 25))
self.btfront.setObjectName("btfront")
self.btback = QtWidgets.QPushButton(self.groupBoxSpin)
self.btback.setGeometry(QtCore.QRect(320, 200, 51, 25))
self.btback.setObjectName("btback")
self.groupBoxMode = QtWidgets.QGroupBox(DlgDiract)
self.groupBoxMode.setGeometry(QtCore.QRect(400, 20, 171, 131))
font = QtGui.QFont()
font.setFamily("Sans")
font.setPointSize(13)
font.setBold(True)
font.setWeight(75)
self.groupBoxMode.setFont(font)
self.groupBoxMode.setStyleSheet("background-color: rgb(64, 98, 191);\n"
"color: rgb(238, 238, 236);")
self.groupBoxMode.setObjectName("groupBoxMode")
self.opcSplit = QtWidgets.QRadioButton(self.groupBoxMode)
self.opcSplit.setGeometry(QtCore.QRect(30, 40, 112, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.opcSplit.setFont(font)
self.opcSplit.setObjectName("opcSplit")
self.opcEigen = QtWidgets.QRadioButton(self.groupBoxMode)
self.opcEigen.setGeometry(QtCore.QRect(30, 80, 112, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.opcEigen.setFont(font)
self.opcEigen.setChecked(True)
self.opcEigen.setObjectName("opcEigen")
self.label_12 = QtWidgets.QLabel(DlgDiract)
self.label_12.setGeometry(QtCore.QRect(50, 450, 181, 31))
self.label_12.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_12.setObjectName("label_12")
self.txMaxSteps = QtWidgets.QLineEdit(DlgDiract)
self.txMaxSteps.setGeometry(QtCore.QRect(250, 450, 61, 25))
self.txMaxSteps.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.txMaxSteps.setObjectName("txMaxSteps")
self.groupBoxB = QtWidgets.QGroupBox(DlgDiract)
self.groupBoxB.setGeometry(QtCore.QRect(390, 30, 181, 131))
font = QtGui.QFont()
font.setFamily("Sans")
font.setPointSize(13)
font.setBold(True)
font.setWeight(75)
self.groupBoxB.setFont(font)
self.groupBoxB.setStyleSheet("background-color: rgb(14, 60,11);\n"
"color: rgb(238, 238, 236);")
self.groupBoxB.setObjectName("groupBoxB")
self.opcBpot = QtWidgets.QRadioButton(self.groupBoxB)
self.opcBpot.setGeometry(QtCore.QRect(10, 40, 151, 23))
font = QtGui.QFont()
font.setPointSize(14)
self.opcBpot.setFont(font)
self.opcBpot.setChecked(True)
self.opcBpot.setObjectName("opcBpot")
self.opcBdot = QtWidgets.QRadioButton(self.groupBoxB)
self.opcBdot.setGeometry(QtCore.QRect(10, 80, 151, 23))
font = QtGui.QFont()
font.setPointSize(14)
self.opcBdot.setFont(font)
self.opcBdot.setChecked(False)
self.opcBdot.setObjectName("opcBdot")
self.retranslateUi(DlgDiract)
self.buttonBox.accepted.connect(DlgDiract.accept)
self.buttonBox.rejected.connect(DlgDiract.reject)
self.opcspin0.toggled['bool'].connect(self.txspinupreal.setDisabled)
self.opcspin0.toggled['bool'].connect(self.txspinupimag.setDisabled)
self.opcspin0.toggled['bool'].connect(self.txspindownreal.setDisabled)
self.opcspin0.toggled['bool'].connect(self.txspindownimag.setDisabled)
self.opcspin0.toggled['bool'].connect(self.btPlotSpin.setDisabled)
QtCore.QMetaObject.connectSlotsByName(DlgDiract)
def retranslateUi(self, DlgDiract):
_translate = QtCore.QCoreApplication.translate
DlgDiract.setWindowTitle(_translate("DlgDiract", "Dirac options"))
self.groupBoxPos.setTitle(_translate("DlgDiract", "inital gaussian position"))
self.label_3.setText(_translate("DlgDiract", "Z"))
self.label_2.setText(_translate("DlgDiract", "Y"))
self.label.setText(_translate("DlgDiract", "X"))
self.txposX.setToolTip(_translate("DlgDiract", "<html><head/><body><p>from -0.8 to 0.8</p></body></html>"))
self.txposX.setText(_translate("DlgDiract", "-0.7"))
self.txposY.setToolTip(_translate("DlgDiract", "<html><head/><body><p>from -0.8 to 0.8</p></body></html>"))
self.txposY.setText(_translate("DlgDiract", "0.0"))
self.txposZ.setToolTip(_translate("DlgDiract", "<html><head/><body><p>from -0.8 to 0.8</p></body></html>"))
self.txposZ.setText(_translate("DlgDiract", "0.0"))
self.groupBox_K.setToolTip(_translate("DlgDiract", "<html><head/><body><p>spatial frequency with respect to spatial extent of the simulation</p><p>p = k * np.pi / L</p></body></html>"))
self.groupBox_K.setTitle(_translate("DlgDiract", "K (gaussian speed)"))
self.label_4.setText(_translate("DlgDiract", "k Z"))
self.label_5.setText(_translate("DlgDiract", "k Y"))
self.label_6.setText(_translate("DlgDiract", "k X"))
self.txkX.setText(_translate("DlgDiract", "20"))
self.txkY.setText(_translate("DlgDiract", "0"))
self.txkZ.setText(_translate("DlgDiract", "0"))
self.groupBoxSpin.setTitle(_translate("DlgDiract", "inital Spin and spinors"))
self.opcspin0.setToolTip(_translate("DlgDiract", "<html><head/><body><p>The spinors will be created from momentun with spin up in Z axis</p></body></html>"))
self.opcspin0.setText(_translate("DlgDiract", "spinors from k (with spin up in Z)"))
self.opcspin1.setToolTip(_translate("DlgDiract", "<html><head/><body><p>specify the spin you want below amd the spinors will be created from this and energy eigen Spinors mixing your spin and the momentum</p></body></html>"))
self.opcspin1.setText(_translate("DlgDiract", "make spinors from specific spin below:"))
self.txspinupreal.setText(_translate("DlgDiract", "1"))
self.label_7.setText(_translate("DlgDiract", "real"))
self.txspinupimag.setText(_translate("DlgDiract", "0"))
self.label_8.setText(_translate("DlgDiract", "imaginary"))
self.label_9.setText(_translate("DlgDiract", "spin up"))
self.txspindownreal.setText(_translate("DlgDiract", "0"))
self.label_10.setText(_translate("DlgDiract", "spin down"))
self.txspindownimag.setText(_translate("DlgDiract", "0"))
self.btPlotSpin.setToolTip(_translate("DlgDiract", "<html><head/><body><p>renders the spin normalized with OpenGL in the small window at the right</p></body></html>"))
self.btPlotSpin.setText(_translate("DlgDiract", "Plot spin"))
self.bttop.setText(_translate("DlgDiract", "top"))
self.btbottom.setText(_translate("DlgDiract", "bottom"))
self.btleft.setText(_translate("DlgDiract", "left"))
self.btright.setText(_translate("DlgDiract", "right"))
self.btfront.setText(_translate("DlgDiract", "front"))
self.btback.setText(_translate("DlgDiract", "back"))
self.groupBoxMode.setTitle(_translate("DlgDiract", "Simulation Mode "))
self.opcSplit.setText(_translate("DlgDiract", "SplitStep"))
self.opcEigen.setText(_translate("DlgDiract", "free eigen"))
self.label_12.setText(_translate("DlgDiract", "max animation frames "))
self.txMaxSteps.setToolTip(_translate("DlgDiract", "<html><head/><body><p>max numer of frames animation ( you can stop before )</p></body></html>"))
self.txMaxSteps.setText(_translate("DlgDiract", "150"))
self.groupBoxB.setTitle(_translate("DlgDiract", "B magnetic mode"))
self.opcBpot.setText(_translate("DlgDiract", "B as potential"))
self.opcBdot.setText(_translate("DlgDiract", "B as dot vector"))