PageRenderTime 65ms CodeModel.GetById 36ms RepoModel.GetById 0ms app.codeStats 1ms

/src/MDandTB/TightBindingDiag.java

https://github.com/abinit/abinitgui
Java | 1714 lines | 1351 code | 203 blank | 160 comment | 197 complexity | 4f94655118a3a113a640e3a72a6bf9bb MD5 | raw file
Possible License(s): GPL-3.0

Large files files are truncated, but you can click here to view the full file

  1. /*--
  2. TightBindingDiag.java - Created October 30, 2012
  3. Copyright (c) 2009-2013 Flavio Miguel ABREU ARAUJO.
  4. Université catholique de Louvain, Louvain-la-Neuve, Belgium
  5. All rights reserved.
  6. Redistribution and use in source and binary forms, with or without
  7. modification, are permitted provided that the following conditions
  8. are met:
  9. 1. Redistributions of source code must retain the above copyright
  10. notice, this list of conditions, and the following disclaimer.
  11. 2. Redistributions in binary form must reproduce the above copyright
  12. notice, this list of conditions, and the disclaimer that follows
  13. these conditions in the documentation and/or other materials
  14. provided with the distribution.
  15. 3. The names of the author may not be used to endorse or promote
  16. products derived from this software without specific prior written
  17. permission.
  18. In addition, we request (but do not require) that you include in the
  19. end-user documentation provided with the redistribution and/or in the
  20. software itself an acknowledgement equivalent to the following:
  21. "This product includes software developed by the
  22. Abinit Project (http://www.abinit.org/)."
  23. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  24. WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  25. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26. DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
  27. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  28. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  29. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  30. USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  31. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  32. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  33. OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  34. SUCH DAMAGE.
  35. For more information on the Abinit Project, please see
  36. <http://www.abinit.org/>.
  37. */
  38. package MDandTB;
  39. import core.MainFrame;
  40. import core.RetMSG;
  41. import core.Utils;
  42. import java.io.BufferedInputStream;
  43. import java.io.BufferedWriter;
  44. import java.io.DataInputStream;
  45. import java.io.File;
  46. import java.io.FileInputStream;
  47. import java.io.FileNotFoundException;
  48. import java.io.FileOutputStream;
  49. import java.io.IOException;
  50. import java.io.OutputStreamWriter;
  51. import java.io.PrintWriter;
  52. import javax.swing.JButton;
  53. import javax.swing.JFileChooser;
  54. public class TightBindingDiag extends javax.swing.JDialog {
  55. private MainFrame MF;
  56. private ClustepDiag CD;
  57. /**
  58. * Creates new form TightBindingDiag
  59. */
  60. public TightBindingDiag(java.awt.Frame parent, boolean modal, ClustepDiag cd) {
  61. super(parent, modal);
  62. initComponents();
  63. MF = (MainFrame) parent;
  64. CD = cd;
  65. }
  66. /**
  67. * This method is called from within the constructor to initialize the form.
  68. * WARNING: Do NOT modify this code. The content of this method is always
  69. * regenerated by the Form Editor.
  70. */
  71. @SuppressWarnings("unchecked")
  72. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  73. private void initComponents() {
  74. buttonGroup1 = new javax.swing.ButtonGroup();
  75. buttonGroup2 = new javax.swing.ButtonGroup();
  76. buttonGroup3 = new javax.swing.ButtonGroup();
  77. buttonGroup4 = new javax.swing.ButtonGroup();
  78. jLabel4 = new javax.swing.JLabel();
  79. jPanel20 = new javax.swing.JPanel();
  80. jLabel3 = new javax.swing.JLabel();
  81. sendSIMDosknee12Button = new javax.swing.JButton();
  82. MTextField = new javax.swing.JTextField();
  83. MLabel = new javax.swing.JLabel();
  84. LTextField = new javax.swing.JTextField();
  85. LLabel = new javax.swing.JLabel();
  86. downloadR1 = new javax.swing.JButton();
  87. RB_LM = new javax.swing.JRadioButton();
  88. RB_notLM = new javax.swing.JRadioButton();
  89. jCheckBox_graphite = new javax.swing.JCheckBox();
  90. jCheckBox_pentahept = new javax.swing.JCheckBox();
  91. jRB_dos1 = new javax.swing.JRadioButton();
  92. jRB_dos2 = new javax.swing.JRadioButton();
  93. jPanel14 = new javax.swing.JPanel();
  94. sendSIMDosknee3Button = new javax.swing.JButton();
  95. jLabel1 = new javax.swing.JLabel();
  96. downloadR2 = new javax.swing.JButton();
  97. LLabel2 = new javax.swing.JLabel();
  98. LTextField2 = new javax.swing.JTextField();
  99. MLabel2 = new javax.swing.JLabel();
  100. MTextField2 = new javax.swing.JTextField();
  101. jLabel2 = new javax.swing.JLabel();
  102. jPanel7 = new javax.swing.JPanel();
  103. openClustepInputFileLabel4 = new javax.swing.JLabel();
  104. displayClustepInputFileButton3 = new javax.swing.JButton();
  105. geditClustepInputButton3 = new javax.swing.JButton();
  106. openClustepInputFileDialogButton3 = new javax.swing.JButton();
  107. openTBbndstrInputFileTextField = new javax.swing.JTextField();
  108. jRB1 = new javax.swing.JRadioButton();
  109. jRB2 = new javax.swing.JRadioButton();
  110. jRB3 = new javax.swing.JRadioButton();
  111. sendSIMBNDSTRButton = new javax.swing.JButton();
  112. downloadR3 = new javax.swing.JButton();
  113. compileTBCheckBox = new javax.swing.JCheckBox();
  114. sendTBCheckBox = new javax.swing.JCheckBox();
  115. jLabel4.setFont(new java.awt.Font("Lucida Grande", 1, 18)); // NOI18N
  116. jLabel4.setText("Density of states (DOS)");
  117. jPanel20.setBackground(new java.awt.Color(0, 153, 153));
  118. jLabel3.setFont(new java.awt.Font("Lucida Grande", 1, 18)); // NOI18N
  119. jLabel3.setText("DOSKNEE");
  120. sendSIMDosknee12Button.setText("<HTML> <center> <b>Send the simulation</b><br> the simulation will start at server side </HTML>");
  121. sendSIMDosknee12Button.addActionListener(new java.awt.event.ActionListener() {
  122. public void actionPerformed(java.awt.event.ActionEvent evt) {
  123. sendSIMDosknee12ButtonActionPerformed(evt);
  124. }
  125. });
  126. MTextField.setText("3");
  127. MLabel.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
  128. MLabel.setText("M");
  129. LTextField.setText("3");
  130. LLabel.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
  131. LLabel.setText("L");
  132. downloadR1.setText("Download result");
  133. downloadR1.addActionListener(new java.awt.event.ActionListener() {
  134. public void actionPerformed(java.awt.event.ActionEvent evt) {
  135. downloadR1ActionPerformed(evt);
  136. }
  137. });
  138. buttonGroup1.add(RB_LM);
  139. RB_LM.setSelected(true);
  140. RB_LM.setText("=>");
  141. RB_LM.addActionListener(new java.awt.event.ActionListener() {
  142. public void actionPerformed(java.awt.event.ActionEvent evt) {
  143. RB_LMActionPerformed(evt);
  144. }
  145. });
  146. buttonGroup1.add(RB_notLM);
  147. RB_notLM.setText("=>");
  148. RB_notLM.addActionListener(new java.awt.event.ActionListener() {
  149. public void actionPerformed(java.awt.event.ActionEvent evt) {
  150. RB_notLMActionPerformed(evt);
  151. }
  152. });
  153. buttonGroup2.add(jCheckBox_graphite);
  154. jCheckBox_graphite.setText("graphite");
  155. jCheckBox_graphite.setContentAreaFilled(false);
  156. jCheckBox_graphite.setEnabled(false);
  157. buttonGroup2.add(jCheckBox_pentahept);
  158. jCheckBox_pentahept.setText("pentahept");
  159. jCheckBox_pentahept.setEnabled(false);
  160. buttonGroup3.add(jRB_dos1);
  161. jRB_dos1.setFont(new java.awt.Font("Lucida Grande", 1, 18)); // NOI18N
  162. jRB_dos1.setSelected(true);
  163. jRB_dos1.setText("1");
  164. buttonGroup3.add(jRB_dos2);
  165. jRB_dos2.setFont(new java.awt.Font("Lucida Grande", 1, 18)); // NOI18N
  166. jRB_dos2.setText("2");
  167. org.jdesktop.layout.GroupLayout jPanel20Layout = new org.jdesktop.layout.GroupLayout(jPanel20);
  168. jPanel20.setLayout(jPanel20Layout);
  169. jPanel20Layout.setHorizontalGroup(
  170. jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  171. .add(jPanel20Layout.createSequentialGroup()
  172. .add(jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  173. .add(jPanel20Layout.createSequentialGroup()
  174. .add(RB_LM)
  175. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  176. .add(LLabel)
  177. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  178. .add(LTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  179. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  180. .add(MLabel)
  181. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  182. .add(MTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  183. .add(jPanel20Layout.createSequentialGroup()
  184. .add(RB_notLM)
  185. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  186. .add(jCheckBox_graphite)
  187. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  188. .add(jCheckBox_pentahept))
  189. .add(downloadR1))
  190. .add(18, 18, 18)
  191. .add(jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  192. .add(jPanel20Layout.createSequentialGroup()
  193. .add(jLabel3)
  194. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  195. .add(jRB_dos1)
  196. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  197. .add(jRB_dos2))
  198. .add(sendSIMDosknee12Button, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
  199. );
  200. jPanel20Layout.setVerticalGroup(
  201. jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  202. .add(jPanel20Layout.createSequentialGroup()
  203. .add(jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  204. .add(RB_LM)
  205. .add(LLabel)
  206. .add(LTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  207. .add(MLabel)
  208. .add(MTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  209. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  210. .add(jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  211. .add(RB_notLM)
  212. .add(jCheckBox_graphite)
  213. .add(jCheckBox_pentahept))
  214. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  215. .add(downloadR1))
  216. .add(jPanel20Layout.createSequentialGroup()
  217. .add(9, 9, 9)
  218. .add(jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  219. .add(jLabel3)
  220. .add(jRB_dos1)
  221. .add(jRB_dos2))
  222. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  223. .add(sendSIMDosknee12Button, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  224. );
  225. jPanel14.setBackground(new java.awt.Color(0, 102, 204));
  226. sendSIMDosknee3Button.setText("<HTML> <center> <b>Send the simulation</b><br> the simulation will start at server side </HTML>");
  227. sendSIMDosknee3Button.addActionListener(new java.awt.event.ActionListener() {
  228. public void actionPerformed(java.awt.event.ActionEvent evt) {
  229. sendSIMDosknee3ButtonActionPerformed(evt);
  230. }
  231. });
  232. jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 18)); // NOI18N
  233. jLabel1.setText("DOSKNEE 3");
  234. downloadR2.setText("Download result");
  235. downloadR2.addActionListener(new java.awt.event.ActionListener() {
  236. public void actionPerformed(java.awt.event.ActionEvent evt) {
  237. downloadR2ActionPerformed(evt);
  238. }
  239. });
  240. LLabel2.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
  241. LLabel2.setText("L");
  242. LTextField2.setText("3");
  243. MLabel2.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
  244. MLabel2.setText("M");
  245. MTextField2.setText("3");
  246. org.jdesktop.layout.GroupLayout jPanel14Layout = new org.jdesktop.layout.GroupLayout(jPanel14);
  247. jPanel14.setLayout(jPanel14Layout);
  248. jPanel14Layout.setHorizontalGroup(
  249. jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  250. .add(jPanel14Layout.createSequentialGroup()
  251. .add(jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  252. .add(jPanel14Layout.createSequentialGroup()
  253. .addContainerGap()
  254. .add(LLabel2)
  255. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  256. .add(LTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  257. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  258. .add(MLabel2)
  259. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  260. .add(MTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  261. .add(downloadR2))
  262. .add(18, 18, 18)
  263. .add(jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  264. .add(jLabel1)
  265. .add(sendSIMDosknee3Button, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 290, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
  266. );
  267. jPanel14Layout.setVerticalGroup(
  268. jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  269. .add(jPanel14Layout.createSequentialGroup()
  270. .add(jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  271. .add(LLabel2)
  272. .add(LTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  273. .add(MLabel2)
  274. .add(MTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  275. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  276. .add(downloadR2))
  277. .add(jPanel14Layout.createSequentialGroup()
  278. .add(jLabel1)
  279. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  280. .add(sendSIMDosknee3Button, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  281. );
  282. jLabel2.setFont(new java.awt.Font("Lucida Grande", 1, 18)); // NOI18N
  283. jLabel2.setText("Band structure (BNDSTR)");
  284. jPanel7.setBackground(new java.awt.Color(153, 153, 255));
  285. openClustepInputFileLabel4.setText("Open the \"tbener\" input file");
  286. displayClustepInputFileButton3.setText("Display");
  287. displayClustepInputFileButton3.addActionListener(new java.awt.event.ActionListener() {
  288. public void actionPerformed(java.awt.event.ActionEvent evt) {
  289. displayClustepInputFileButton3ActionPerformed(evt);
  290. }
  291. });
  292. geditClustepInputButton3.setText("Edit");
  293. geditClustepInputButton3.addActionListener(new java.awt.event.ActionListener() {
  294. public void actionPerformed(java.awt.event.ActionEvent evt) {
  295. geditClustepInputButton3ActionPerformed(evt);
  296. }
  297. });
  298. openClustepInputFileDialogButton3.setText("...");
  299. openClustepInputFileDialogButton3.addActionListener(new java.awt.event.ActionListener() {
  300. public void actionPerformed(java.awt.event.ActionEvent evt) {
  301. openClustepInputFileDialogButton3ActionPerformed(evt);
  302. }
  303. });
  304. buttonGroup4.add(jRB1);
  305. jRB1.setSelected(true);
  306. jRB1.setText("6,6");
  307. buttonGroup4.add(jRB2);
  308. jRB2.setText("12,0");
  309. buttonGroup4.add(jRB3);
  310. jRB3.setText("11,0");
  311. sendSIMBNDSTRButton.setText("<HTML> <center> <b>Send the simulation</b><br> the simulation will start at server side </HTML>");
  312. sendSIMBNDSTRButton.addActionListener(new java.awt.event.ActionListener() {
  313. public void actionPerformed(java.awt.event.ActionEvent evt) {
  314. sendSIMBNDSTRButtonActionPerformed(evt);
  315. }
  316. });
  317. downloadR3.setText("Download result");
  318. downloadR3.addActionListener(new java.awt.event.ActionListener() {
  319. public void actionPerformed(java.awt.event.ActionEvent evt) {
  320. downloadR3ActionPerformed(evt);
  321. }
  322. });
  323. org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
  324. jPanel7.setLayout(jPanel7Layout);
  325. jPanel7Layout.setHorizontalGroup(
  326. jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  327. .add(jPanel7Layout.createSequentialGroup()
  328. .add(openClustepInputFileDialogButton3)
  329. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  330. .add(openTBbndstrInputFileTextField))
  331. .add(jPanel7Layout.createSequentialGroup()
  332. .add(openClustepInputFileLabel4)
  333. .add(18, 18, 18)
  334. .add(displayClustepInputFileButton3)
  335. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  336. .add(geditClustepInputButton3)
  337. .add(44, 44, 44)
  338. .add(jRB1)
  339. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  340. .add(jRB2)
  341. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  342. .add(jRB3))
  343. .add(jPanel7Layout.createSequentialGroup()
  344. .addContainerGap()
  345. .add(sendSIMBNDSTRButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  346. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  347. .add(downloadR3))
  348. );
  349. jPanel7Layout.setVerticalGroup(
  350. jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  351. .add(jPanel7Layout.createSequentialGroup()
  352. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  353. .add(openClustepInputFileLabel4)
  354. .add(displayClustepInputFileButton3)
  355. .add(jRB1)
  356. .add(jRB2)
  357. .add(jRB3)
  358. .add(geditClustepInputButton3))
  359. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  360. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  361. .add(openTBbndstrInputFileTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  362. .add(openClustepInputFileDialogButton3))
  363. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  364. .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
  365. .add(sendSIMBNDSTRButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  366. .add(downloadR3)))
  367. );
  368. compileTBCheckBox.setText("Compile");
  369. sendTBCheckBox.setText("Send data and source code");
  370. sendTBCheckBox.addActionListener(new java.awt.event.ActionListener() {
  371. public void actionPerformed(java.awt.event.ActionEvent evt) {
  372. sendTBCheckBoxActionPerformed(evt);
  373. }
  374. });
  375. org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
  376. getContentPane().setLayout(layout);
  377. layout.setHorizontalGroup(
  378. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  379. .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
  380. .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  381. .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  382. .add(jLabel2)
  383. .add(jLabel4)
  384. .add(jPanel20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  385. .add(jPanel14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  386. .add(jPanel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  387. .add(layout.createSequentialGroup()
  388. .add(sendTBCheckBox)
  389. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  390. .add(compileTBCheckBox)))
  391. .addContainerGap())
  392. );
  393. layout.setVerticalGroup(
  394. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  395. .add(layout.createSequentialGroup()
  396. .addContainerGap()
  397. .add(jLabel4)
  398. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  399. .add(jPanel20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  400. .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  401. .add(jPanel14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  402. .add(18, 18, 18)
  403. .add(jLabel2)
  404. .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  405. .add(jPanel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  406. .add(18, 18, 18)
  407. .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  408. .add(sendTBCheckBox)
  409. .add(compileTBCheckBox))
  410. .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  411. );
  412. pack();
  413. }// </editor-fold>//GEN-END:initComponents
  414. private void sendTBCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendTBCheckBoxActionPerformed
  415. // TODO add your handling code here:
  416. }//GEN-LAST:event_sendTBCheckBoxActionPerformed
  417. private void displayClustepInputFileButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_displayClustepInputFileButton3ActionPerformed
  418. MF.clustepInputFileDisplayer.setVisible(true);
  419. // TODO : pour quand ce sera éditable
  420. //clustepInputFileDisplayer.setEditable(true);
  421. String fileContent = "";
  422. try {
  423. File file = new File(openTBbndstrInputFileTextField.getText());
  424. FileInputStream fis = new FileInputStream(file);
  425. // Here BufferedInputStream is added for fast reading.
  426. BufferedInputStream bis = new BufferedInputStream(fis);
  427. DataInputStream dis = new DataInputStream(bis);
  428. while (dis.available() != 0) {
  429. fileContent += dis.readLine() + "\n";
  430. }
  431. // dispose all the resources after using them.
  432. fis.close();
  433. bis.close();
  434. dis.close();
  435. } catch (FileNotFoundException e) {
  436. MF.printERR(e.getMessage());
  437. } catch (IOException e) {
  438. MF.printERR(e.getMessage());
  439. }
  440. MF.clustepInputFileDisplayer.setText(fileContent);
  441. }//GEN-LAST:event_displayClustepInputFileButton3ActionPerformed
  442. private void geditClustepInputButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_geditClustepInputButton3ActionPerformed
  443. Runnable r = new Runnable() {
  444. @Override
  445. public void run() {
  446. String fileName = openTBbndstrInputFileTextField.getText();
  447. // ****************************************************************************
  448. MF.editFile(fileName, false);
  449. // ****************************************************************************
  450. }
  451. };
  452. Thread t = new Thread(r);
  453. t.start();
  454. }//GEN-LAST:event_geditClustepInputButton3ActionPerformed
  455. private void openClustepInputFileDialogButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openClustepInputFileDialogButton3ActionPerformed
  456. JFileChooser fc = new JFileChooser(".");
  457. File currDir = new File(".");
  458. String currPath = currDir.getAbsolutePath();
  459. String basePath = basePath = currPath.replace("\\", "/").replace(".", "");
  460. MF.printDEB(basePath);
  461. fc.setMultiSelectionEnabled(false);
  462. int retValue = fc.showOpenDialog(this);
  463. if (retValue == JFileChooser.APPROVE_OPTION) {
  464. File file = fc.getSelectedFile();
  465. String relPath = file.getAbsolutePath().replace("\\", "/").replace(basePath, "./");
  466. openTBbndstrInputFileTextField.setText(relPath);
  467. }
  468. }//GEN-LAST:event_openClustepInputFileDialogButton3ActionPerformed
  469. private void sendSIMBNDSTRButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendSIMBNDSTRButtonActionPerformed
  470. JButton sendSIM = sendSIMBNDSTRButton;
  471. sendSIM.setEnabled(false);
  472. Runnable r = new Runnable() {
  473. @Override
  474. public void run() {
  475. JButton sendSIM = sendSIMBNDSTRButton;
  476. if (MF.localAbinitRadioButton().isSelected() && Utils.osName().startsWith("Windows")) {
  477. MF.printERR("Please connect to a remote Tight-Binding host before submitting a simulation !");
  478. sendSIM.setEnabled(true);
  479. return;
  480. }
  481. if ((MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) && MF.remoteExec == null) {
  482. MF.printERR("Please connect to a Tight-Binding host before submitting a simulation !");
  483. sendSIM.setEnabled(true);
  484. return;
  485. }
  486. MF.createFiletree();
  487. String rootPath = MF.mySimulationsTextField().getText();
  488. String TBfolderL = "Tight-Binding";
  489. String TBrootR = "./Tight-Binding_src/BS";
  490. String TBrootL = TBfolderL + "/BS";
  491. // ***************************************************************
  492. // Creation du dossier Tight-Binding local
  493. MF.mkdir(rootPath + "/" + TBfolderL);
  494. // Creation du dossier BS dans Tight-Binding local
  495. MF.mkdir(rootPath + "/" + TBrootL);
  496. // ***************************************************************
  497. String cwd = "";
  498. String CMD = "pwd";
  499. RetMSG retmsg;
  500. if (MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) {
  501. if (MF.remoteExec != null) {
  502. retmsg = MF.remoteExec.sendCommand(CMD);
  503. if (retmsg.getRetCode() == RetMSG.SUCCES) {
  504. MF.printOUT("PWD: " + retmsg.getRetMSG());
  505. cwd = MF.removeEndl(retmsg.getRetMSG());
  506. } else {
  507. //printERR("Error (RetVal = " + retmsg.getRetCode() + "): " + retmsg.getRetMSG());
  508. MF.printERR("Error: " + retmsg.getRetMSG() + " !");
  509. }
  510. } else {
  511. MF.printERR("First connect to an CLUSTEP host please !");
  512. }
  513. } else if (MF.localAbinitRadioButton().isSelected()) {
  514. if (MF.localExec != null) {
  515. retmsg = MF.localExec.sendCommand(CMD);
  516. if (retmsg.getRetCode() == RetMSG.SUCCES) {
  517. MF.printOUT("PWD: " + retmsg.getRetMSG());
  518. cwd = MF.removeEndl(retmsg.getRetMSG());
  519. } else {
  520. //printERR("Error (RetVal = " + retmsg.getRetCode() + "): " + retmsg.getRetMSG());
  521. MF.printERR("Error: " + retmsg.getRetMSG() + " !");
  522. }
  523. }
  524. } else { // Le choix n'a pas été fait
  525. MF.printERR("Choose a destination option please at config. tab !");
  526. }
  527. // ***************************************************************
  528. String sep = Utils.fileSeparator();
  529. String inputFile = openTBbndstrInputFileTextField.getText();
  530. String inputFileName = Utils.getLastToken(inputFile.replace('\\', '/'), "/");
  531. // Test de l'existance de inputfile
  532. if (!Utils.exists(inputFile)) {
  533. MF.printERR("The file " + inputFile + " doesn't exist !");
  534. sendSIM.setEnabled(true);
  535. return;
  536. }
  537. String simName = "BScalc";
  538. if (sendTBCheckBox.isSelected()) {
  539. // Envoie du code source pour les calculs TB (remote ou local)
  540. MF.putFile("./Tight-Binding_src.tar.gz ./Tight-Binding_src.tar.gz");
  541. // Unzip the compressed file CLUSTEP_src.tar.gz
  542. MF.sendCommand("tar -zxf ./Tight-Binding_src.tar.gz");
  543. if (MF.remoteGatewayRadioButton().isSelected()
  544. || MF.remoteAbinitRadioButton().isSelected()) {
  545. MF.sendCommand("rm -f ./Tight-Binding_src.tar.gz");
  546. }
  547. }
  548. int compile;
  549. if (compileTBCheckBox.isSelected()) {
  550. compile = 1;
  551. } else {
  552. compile = 0;
  553. }
  554. int option = 1;
  555. if (jRB1.isSelected()) {
  556. option = 1;
  557. }
  558. if (jRB2.isSelected()) {
  559. option = 2;
  560. }
  561. if (jRB3.isSelected()) {
  562. option = 3;
  563. }
  564. if (!inputFile.equals("")) {
  565. int nbProc;
  566. if (CD.abinitParaTextField().isEnabled()) { // Tjs actif pour cette version du gui
  567. try {
  568. nbProc = Integer.parseInt(CD.abinitParaTextField().getText());
  569. } finally {
  570. MF.printDEB("Please set up the number of processors to use ! nbProc was set to 1!");
  571. nbProc = 1;
  572. }
  573. } else {
  574. nbProc = 1;
  575. }
  576. if (CD.needSGECheckBox().isSelected()) {
  577. int time, nodes, ram, hdm;
  578. String email;
  579. try {
  580. time = Integer.parseInt(CD.timeTextField().getText());
  581. nodes = Integer.parseInt(CD.nodesTextField().getText());
  582. ram = Integer.parseInt(CD.ramTextField().getText());
  583. hdm = Integer.parseInt(CD.hdmTextField().getText());
  584. email = CD.emailTextField().getText();
  585. } catch (Exception e) {
  586. //printERR("Exception in sendSIMButtonActionPerformed:" + e + "");
  587. MF.printERR("The SGE script configurations are probably wrong !");
  588. sendSIM.setEnabled(true);
  589. return;
  590. }
  591. // Création du script SGE
  592. try {
  593. String PBSfileName = rootPath + "/" + TBrootL + "/" + simName + ".SGE.sh";
  594. OutputStreamWriter fw = new OutputStreamWriter(new FileOutputStream(PBSfileName), MF.CharSet);
  595. //FileWriter fw = new FileWriter(PBSfileName);
  596. BufferedWriter bw = new BufferedWriter(fw);
  597. PrintWriter pw = new PrintWriter(bw);
  598. //*********************************************************************************************
  599. String fileContent = "#!/bin/bash" + "\n"
  600. + "#" + "\n"
  601. + "# On old Green node" + "\n"
  602. + "#$ -l nb=false" + "\n"
  603. + "#" + "\n"
  604. + "# Ask for pe=parrallel environment, snode or openmpi" + "\n"
  605. + "# snode= same node, as the shared memory communication is the fastest" + "\n"
  606. + "#$ -pe openmpi 1" + "\n"
  607. + "# -pe snode8 8" + "\n"
  608. + "\n"
  609. + "# keep current working directory" + "\n"
  610. + "#$ -cwd" + "\n"
  611. + "\n"
  612. + "#$ -o SGE_out-$JOB_ID.log" + "\n"
  613. + "#$ -e SGE_err-$JOB_ID.log" + "\n"
  614. + "\n"
  615. + "# give a name to your job" + "\n"
  616. + "#$ -N " + simName + "\n"
  617. + "\n"
  618. + "# keep all the defined variables" + "\n"
  619. + "#$ -V" + "\n"
  620. + "#$ -l nb=false" + "\n"
  621. + "\n"
  622. + "# not mandatory: highmem=true (hm=true) for 32GB node" + "\n"
  623. + "# or hm=false for 16GB node" + "\n"
  624. + "# no hm argument does not take about the kind of node ram (16/32)" + "\n"
  625. + "# -l hm=true" + "\n"
  626. + "\n"
  627. + "# IMPORTANT: You need to specify the mem_free" + "\n"
  628. + "# h_vmem can also be set but mf is mandatory!" + "\n"
  629. + "# max 31G if hm=true and max 15G if hm=false" + "\n"
  630. + "#$ -l mf=" + ram + "M" + "\n"
  631. + "\n"
  632. + "# Specify the requested time" + "\n"
  633. + "#$ -l h_rt=" + time + ":00:00" + "\n"
  634. + "\n"
  635. + "# To be informed by email (besa= begin,end,stop,abort)" + "\n"
  636. + "#$ -M " + email + "\n"
  637. + "#$ -m besa" + "\n"
  638. //+ "# ---------------------------" + "\n"
  639. + "\n"
  640. + "echo \"Simulation " + simName + " is running!\"" + "\n"
  641. + "cd " + TBrootR + "\n"
  642. + "bash " + "execBS.sh" + " " + compile + " " + inputFileName + " " + option + " >& BS.log";
  643. pw.print(fileContent);
  644. //*********************************************************************************************
  645. pw.println();
  646. pw.close();
  647. bw.close();
  648. fw.close();
  649. } catch (IOException e) {
  650. //printERR("Exception in sendSIMButtonActionPerformed:" + e + "");
  651. MF.printERR("The SGE script could not be created !");
  652. sendSIM.setEnabled(true);
  653. return;
  654. }
  655. } else {
  656. // Création du script BASH
  657. try {
  658. String BASHfileName = rootPath + "/" + TBrootL + "/" + simName + ".sh";
  659. OutputStreamWriter fw = new OutputStreamWriter(new FileOutputStream(BASHfileName), MF.CharSet);
  660. //FileWriter fw = new FileWriter(BASHfileName);
  661. BufferedWriter bw = new BufferedWriter(fw);
  662. PrintWriter pw = new PrintWriter(bw);
  663. pw.println("#!/bin/bash");
  664. pw.println("echo \"Simulation " + simName + " is running!\"");
  665. pw.println("cd " + TBrootR);
  666. pw.print("bash " + "execBS.sh" + " " + compile + " " + inputFileName + " " + option + " >& BS.log");
  667. pw.println();
  668. pw.close();
  669. bw.close();
  670. fw.close();
  671. } catch (IOException e) {
  672. //printDEB("Exception in sendSIMButtonActionPerformed:" + e + "");
  673. MF.printERR("The bash script could not be created !");
  674. sendSIM.setEnabled(true);
  675. return;
  676. }
  677. }
  678. // Envoie (copie) du fichier d'input *******************************************************************
  679. String inputFileR = TBrootR + "/" + inputFileName;
  680. if (MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) {
  681. if (Utils.osName().startsWith("Windows")) {
  682. Utils.dos2unix(new File(inputFile));
  683. }
  684. }
  685. MF.putFile(inputFile + " " + inputFileR);
  686. if (CD.needSGECheckBox().isSelected()) {
  687. if (MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) {
  688. String sgeSHFile = rootPath + "/" + TBrootL + "/" + simName + ".SGE.sh";
  689. String sgeSHFileR = TBrootR + "/" + simName + ".SGE.sh";
  690. if (Utils.osName().startsWith("Windows")) {
  691. Utils.dos2unix(new File(sgeSHFile));
  692. }
  693. // Envoie du fichier SGE
  694. MF.putFile(sgeSHFile + " " + sgeSHFileR);
  695. }
  696. // lancement des commandes d'exécution de la simulation
  697. MF.sendCommand("qsub " + TBrootR + "/" + simName + ".SGE.sh");
  698. } else {
  699. String SHFile = rootPath + "/" + TBrootL + "/" + simName + ".sh";
  700. String SHFileR = TBrootR + "/" + simName + ".sh";
  701. if (MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) {
  702. if (Utils.osName().startsWith("Windows")) {
  703. Utils.dos2unix(new File(SHFile));
  704. }
  705. // Envoie du fichier BASH
  706. MF.putFile(SHFile + " " + SHFileR);
  707. }
  708. // lancement des commandes d'exécution de la simulation
  709. MF.sendCommand("bash " + SHFileR);
  710. }
  711. } else {
  712. MF.printERR("Please setup the inputfile textfield !");
  713. sendSIM.setEnabled(true);
  714. return;
  715. }
  716. if (MF.localAbinitRadioButton().isSelected()) {
  717. MF.printOUT("The simulation was submitted to the local Tight-Binding server.");
  718. } else {
  719. MF.printOUT("The simulation was submitted to the remote Tight-Binding server " + MF.hostTextField().getText());
  720. if (MF.remoteGatewayRadioButton().isSelected()) {
  721. MF.printOUT(" via the gateway " + MF.gatewayHostTextField().getText() + ".");
  722. } else {
  723. //printOUT(".");
  724. }
  725. }
  726. MF.printDEB("The submission thread ended successfully! (Tight-Binding)");
  727. sendSIM.setEnabled(true);
  728. }
  729. };
  730. Thread t = new Thread(r);
  731. t.start();
  732. }//GEN-LAST:event_sendSIMBNDSTRButtonActionPerformed
  733. private void downloadR3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadR3ActionPerformed
  734. Runnable r = new Runnable() {
  735. @Override
  736. public void run() {
  737. if ((MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) && MF.remoteExec == null) {
  738. MF.printERR("Please connect to a Tight-Binding host before doing anything!");
  739. //getEvolutionFileButton.setEnabled(true);
  740. downloadR3.setEnabled(true);
  741. return;
  742. }
  743. String rootPath = MF.mySimulationsTextField().getText();
  744. String TBrootR = "./Tight-Binding_src/BS";
  745. String TBrootL = rootPath + "/Tight-Binding/BS";
  746. String LMParams = "6,6";
  747. if (jRB1.isSelected()) {
  748. LMParams = "6,6";
  749. }
  750. if (jRB2.isSelected()) {
  751. LMParams = "12,0";
  752. }
  753. if (jRB3.isSelected()) {
  754. LMParams = "11,0";
  755. }
  756. String fileNameR = TBrootR + "/results/result-" + LMParams;
  757. String fileNameL = TBrootL + "/result-" + LMParams;
  758. if (!Utils.exists(fileNameL)) {
  759. // Réception (copie) du fichier d'output si celui-ci est distant
  760. if (MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) {
  761. MF.getFile(fileNameR + " " + fileNameL);
  762. if (Utils.osName().startsWith("Windows")) {
  763. Utils.unix2dos(new File(fileNameL));
  764. }
  765. }
  766. } else {
  767. MF.printOUT("File " + fileNameL + " exists in your local filetree!\n"
  768. + "Please remove the local file before you download the new file version!");
  769. }
  770. String logfileNameR = TBrootR + "/BS.log";
  771. String logfileNameL = TBrootL + "/BS.log";
  772. // Réception (copie) du fichier d'output si celui-ci est distant
  773. if (MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) {
  774. MF.getFile(logfileNameR + " " + logfileNameL);
  775. if (Utils.osName().startsWith("Windows")) {
  776. Utils.unix2dos(new File(fileNameL));
  777. }
  778. }
  779. // ****************************************************************************
  780. // Tester l'existance du fichier
  781. if (!Utils.exists(fileNameL)) {
  782. MF.editFile(logfileNameL.replace("/./", "/"), false);
  783. } else {
  784. MF.editFile(fileNameL.replace("/./", "/"), false);
  785. }
  786. }
  787. };
  788. Thread t = new Thread(r);
  789. t.start();
  790. }//GEN-LAST:event_downloadR3ActionPerformed
  791. private void sendSIMDosknee12ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendSIMDosknee12ButtonActionPerformed
  792. JButton sendSIM = sendSIMDosknee12Button;
  793. sendSIM.setEnabled(false);
  794. Runnable r = new Runnable() {
  795. @Override
  796. public void run() {
  797. JButton sendSIM = sendSIMDosknee12Button;
  798. if (MF.localAbinitRadioButton().isSelected() && Utils.osName().startsWith("Windows")) {
  799. MF.printERR("Please connect to a remote Tight-Binding host before submitting a simulation !");
  800. sendSIM.setEnabled(true);
  801. return;
  802. }
  803. if ((MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) && MF.remoteExec == null) {
  804. MF.printERR("Please connect to a Tight-Binding host before submitting a simulation !");
  805. sendSIM.setEnabled(true);
  806. return;
  807. }
  808. MF.createFiletree();
  809. String rootPath = MF.mySimulationsTextField().getText();
  810. String TBfolderL = "Tight-Binding";
  811. String TBrootR = "./Tight-Binding_src/DOS";
  812. String TBrootL = TBfolderL + "/DOS";
  813. // ***************************************************************
  814. // Creation du dossier Tight-Binding local
  815. MF.mkdir(rootPath + "/" + TBfolderL);
  816. // Creation du dossier DOS dans Tight-Binding local
  817. MF.mkdir(rootPath + "/" + TBrootL);
  818. // ***************************************************************
  819. String cwd = "";
  820. String CMD = "pwd";
  821. RetMSG retmsg;
  822. if (MF.remoteGatewayRadioButton().isSelected() || MF.remoteAbinitRadioButton().isSelected()) {
  823. if (MF.remoteExec != null) {
  824. retmsg = MF.remoteExec.sendCommand(CMD);
  825. if (retmsg.getRetCode() == RetMSG.SUCCES) {
  826. MF.printOUT("PWD: " + retmsg.getRetMSG());
  827. cwd = MF.removeEndl(retmsg.getRetMSG());
  828. } else {
  829. //printERR("Error (RetVal = " + retmsg.getRetCode() + "): " + retmsg.getRetMSG());
  830. MF.printERR("Error: " + retmsg.getRetMSG() + " !");
  831. }
  832. } else {
  833. MF.printERR("First connect to an CLUSTEP host please !");
  834. }
  835. } else if (MF.localAbinitRadioButton().isSelected()) {
  836. if (MF.localExec != null) {
  837. retmsg = MF.localExec.sendCommand(CMD);
  838. if (retmsg.getRetCode() == RetMSG.SUCCES) {
  839. MF.printOUT("PWD: " + retmsg.getRetMSG());
  840. cwd = MF.removeEndl(retmsg.getRetMSG());
  841. } else {
  842. //printERR("Error (RetVal = " + retmsg.getRetCode() + "): " + retmsg.getRetMSG());
  843. MF.printERR("Error: " + retmsg.getRetMSG() + " !");
  844. }
  845. }
  846. } else { // Le choix n'a pas été fait
  847. MF.printERR("Choose a destination option please at config. tab !");
  848. }
  849. // ***************************************************************
  850. // String sep = Utils.fileSeparator();
  851. String simName = "DOScalc";
  852. if (sendTBCheckBox.isSelected()) {
  853. // Envoie du code source pour les calculs TB (remote ou local)
  854. MF.putFile("./Tight-Binding_src.tar.gz ./Tight-Binding_src.tar.gz");
  855. // Unzip the compressed file CLUSTEP_src.tar.gz
  856. MF.sendCommand("tar -zxf ./Tight-Binding_src.tar.gz");
  857. if (MF.remoteGatewayRadioButton().isSelected()
  858. || MF.remoteAbinitRadioButton().isSelected()) {
  859. …

Large files files are truncated, but you can click here to view the full file