PageRenderTime 31ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/apbs-1.3-source/tools/matlab/solver/MATLAB_PB_SOLVER_6/inmcreator.m

#
MATLAB | 669 lines | 250 code | 137 blank | 282 comment | 28 complexity | 93b39dad5072402cdd9dfe34a3b7341e MD5 | raw file
Possible License(s): LGPL-2.0, BSD-3-Clause, GPL-2.0
  1. function varargout = inmcreator(varargin)
  2. % INMCREATOR M-file for inmcreator.fig
  3. % INMCREATOR, by itself, creates a new INMCREATOR or raises the existing
  4. % singleton*.
  5. %
  6. % H = INMCREATOR returns the handle to a new INMCREATOR or the handle to
  7. % the existing singleton*.
  8. %
  9. % INMCREATOR('CALLBACK',hObject,eventData,handles,...) calls the local
  10. % function named CALLBACK in INMCREATOR.M with the given input arguments.
  11. %
  12. % INMCREATOR('Property','Value',...) creates a new INMCREATOR or raises the
  13. % existing singleton*. Starting from the left, property value pairs are
  14. % applied to the GUI before inmcreator_OpeningFcn gets called. An
  15. % unrecognized property name or invalid value makes property application
  16. % stop. All inputs are passed to inmcreator_OpeningFcn via varargin.
  17. %
  18. % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
  19. % instance to run (singleton)".
  20. %
  21. % See also: GUIDE, GUIDATA, GUIHANDLES
  22. % Edit the above text to modify the response to help inmcreator
  23. % Last Modified by GUIDE v2.5 05-Dec-2009 23:04:20
  24. % Begin initialization code - DO NOT EDIT
  25. gui_Singleton = 1;
  26. gui_State = struct('gui_Name', mfilename, ...
  27. 'gui_Singleton', gui_Singleton, ...
  28. 'gui_OpeningFcn', @inmcreator_OpeningFcn, ...
  29. 'gui_OutputFcn', @inmcreator_OutputFcn, ...
  30. 'gui_LayoutFcn', [] , ...
  31. 'gui_Callback', []);
  32. if nargin && ischar(varargin{1})
  33. gui_State.gui_Callback = str2func(varargin{1});
  34. end
  35. if nargout
  36. [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
  37. else
  38. gui_mainfcn(gui_State, varargin{:});
  39. end
  40. % End initialization code - DO NOT EDIT
  41. % --- Executes just before inmcreator is made visible.
  42. function inmcreator_OpeningFcn(hObject, eventdata, handles, varargin)
  43. % This function has no output args, see OutputFcn.
  44. % hObject handle to figure
  45. % eventdata reserved - to be defined in a future version of MATLAB
  46. % handles structure with handles and user data (see GUIDATA)
  47. % varargin command line arguments to inmcreator (see VARARGIN)
  48. % Choose default command line output for inmcreator
  49. handles.output = hObject;
  50. handles.dime1=0;
  51. handles.dime2=1;
  52. handles.dime3=2;
  53. handles.glen1=0;
  54. handles.glen2=0;
  55. handles.glen3=0;
  56. handles.temp=0;
  57. handles.ionic=0;
  58. handles.solvent=0;
  59. handles.dielx='o';
  60. handles.diely='o';
  61. handles.dielz='o';
  62. handles.kappa='o';
  63. handles.mol1='o';
  64. handles.mol2='o';
  65. handles.cin='o';
  66. handles.cout='o';
  67. handles.ener='calcenerno';
  68. handles.bc='focusname.inm';
  69. handles.digit=4;
  70. handles.filename='inputfile.inm';
  71. % Update handles structure
  72. guidata(hObject, handles);
  73. % UIWAIT makes inmcreator wait for user response (see UIRESUME)
  74. %uiwait(handles.figure1);
  75. % --- Outputs from this function are returned to the command line.
  76. function varargout = inmcreator_OutputFcn(hObject, eventdata, handles)
  77. % varargout cell array for returning output args (see VARARGOUT);
  78. % hObject handle to figure
  79. % eventdata reserved - to be defined in a future version of MATLAB
  80. % handles structure with handles and user data (see GUIDATA)
  81. % Get default command line output from handles structure
  82. varargout{1} = handles.output;
  83. function edit2_Callback(hObject, eventdata, handles)
  84. % hObject handle to edit2 (see GCBO)
  85. % eventdata reserved - to be defined in a future version of MATLAB
  86. % handles structure with handles and user data (see GUIDATA)
  87. % Hints: get(hObject,'String') returns contents of edit2 as text
  88. % str2double(get(hObject,'String')) returns contents of edit2 as a double
  89. handles.dime2=int16(str2double(get(hObject,'String')));
  90. guidata(hObject,handles);
  91. % --- Executes during object creation, after setting all properties.
  92. function edit2_CreateFcn(hObject, eventdata, handles)
  93. % hObject handle to edit2 (see GCBO)
  94. % eventdata reserved - to be defined in a future version of MATLAB
  95. % handles empty - handles not created until after all CreateFcns called
  96. % Hint: edit controls usually have a white background on Windows.
  97. % See ISPC and COMPUTER.
  98. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  99. set(hObject,'BackgroundColor','white');
  100. end
  101. function edit3_Callback(hObject, eventdata, handles)
  102. % hObject handle to edit3 (see GCBO)
  103. % eventdata reserved - to be defined in a future version of MATLAB
  104. % handles structure with handles and user data (see GUIDATA)
  105. % Hints: get(hObject,'String') returns contents of edit3 as text
  106. % str2double(get(hObject,'String')) returns contents of edit3 as a double
  107. handles.dime3=int16(str2double(get(hObject,'String')));
  108. guidata(hObject,handles);
  109. % --- Executes during object creation, after setting all properties.
  110. function edit3_CreateFcn(hObject, eventdata, handles)
  111. % hObject handle to edit3 (see GCBO)
  112. % eventdata reserved - to be defined in a future version of MATLAB
  113. % handles empty - handles not created until after all CreateFcns called
  114. % Hint: edit controls usually have a white background on Windows.
  115. % See ISPC and COMPUTER.
  116. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  117. set(hObject,'BackgroundColor','white');
  118. end
  119. function edit4_Callback(hObject, eventdata, handles,glen1)
  120. % hObject handle to edit4 (see GCBO)
  121. % eventdata reserved - to be defined in a future version of MATLAB
  122. % handles structure with handles and user data (see GUIDATA)
  123. % Hints: get(hObject,'String') returns contents of edit4 as text
  124. % str2double(get(hObject,'String')) returns contents of edit4 as a double
  125. handles.glen1=str2double(get(hObject,'String'));
  126. guidata(hObject,handles);
  127. % --- Executes during object creation, after setting all properties.
  128. function edit4_CreateFcn(hObject, eventdata, handles)
  129. % hObject handle to edit4 (see GCBO)
  130. % eventdata reserved - to be defined in a future version of MATLAB
  131. % handles empty - handles not created until after all CreateFcns called
  132. % Hint: edit controls usually have a white background on Windows.
  133. % See ISPC and COMPUTER.
  134. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  135. set(hObject,'BackgroundColor','white');
  136. end
  137. function edit5_Callback(hObject, eventdata, handles,glen2)
  138. % hObject handle to edit5 (see GCBO)
  139. % eventdata reserved - to be defined in a future version of MATLAB
  140. % handles structure with handles and user data (see GUIDATA)
  141. % Hints: get(hObject,'String') returns contents of edit5 as text
  142. % str2double(get(hObject,'String')) returns contents of edit5 as a double
  143. handles.glen2=str2double(get(hObject,'String'));
  144. guidata(hObject,handles);
  145. % --- Executes during object creation, after setting all properties.
  146. function edit5_CreateFcn(hObject, eventdata, handles)
  147. % hObject handle to edit5 (see GCBO)
  148. % eventdata reserved - to be defined in a future version of MATLAB
  149. % handles empty - handles not created until after all CreateFcns called
  150. % Hint: edit controls usually have a white background on Windows.
  151. % See ISPC and COMPUTER.
  152. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  153. set(hObject,'BackgroundColor','white');
  154. end
  155. function edit6_Callback(hObject, eventdata, handles,glen3)
  156. % hObject handle to edit6 (see GCBO)
  157. % eventdata reserved - to be defined in a future version of MATLAB
  158. % handles structure with handles and user data (see GUIDATA)
  159. % Hints: get(hObject,'String') returns contents of edit6 as text
  160. % str2double(get(hObject,'String')) returns contents of edit6 as a double
  161. handles.glen3=str2double(get(hObject,'String'));
  162. guidata(hObject,handles);
  163. % --- Executes during object creation, after setting all properties.
  164. function edit6_CreateFcn(hObject, eventdata, handles)
  165. % hObject handle to edit6 (see GCBO)
  166. % eventdata reserved - to be defined in a future version of MATLAB
  167. % handles empty - handles not created until after all CreateFcns called
  168. % Hint: edit controls usually have a white background on Windows.
  169. % See ISPC and COMPUTER.
  170. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  171. set(hObject,'BackgroundColor','white');
  172. end
  173. function edit7_Callback(hObject, eventdata, handles)
  174. % hObject handle to edit7 (see GCBO)
  175. % eventdata reserved - to be defined in a future version of MATLAB
  176. % handles structure with handles and user data (see GUIDATA)
  177. % Hints: get(hObject,'String') returns contents of edit7 as text
  178. % str2double(get(hObject,'String')) returns contents of edit7 as a double
  179. handles.dielx=get(hObject,'String');
  180. guidata(hObject,handles);
  181. % --- Executes during object creation, after setting all properties.
  182. function edit7_CreateFcn(hObject, eventdata, handles)
  183. % hObject handle to edit7 (see GCBO)
  184. % eventdata reserved - to be defined in a future version of MATLAB
  185. % handles empty - handles not created until after all CreateFcns called
  186. % Hint: edit controls usually have a white background on Windows.
  187. % See ISPC and COMPUTER.
  188. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  189. set(hObject,'BackgroundColor','white');
  190. end
  191. function edit9_Callback(hObject, eventdata, handles)
  192. % hObject handle to edit9 (see GCBO)
  193. % eventdata reserved - to be defined in a future version of MATLAB
  194. % handles structure with handles and user data (see GUIDATA)
  195. % Hints: get(hObject,'String') returns contents of edit9 as text
  196. % str2double(get(hObject,'String')) returns contents of edit9 as a double
  197. handles.dielz=get(hObject,'String');
  198. guidata(hObject,handles);
  199. % --- Executes during object creation, after setting all properties.
  200. function edit9_CreateFcn(hObject, eventdata, handles)
  201. % hObject handle to edit9 (see GCBO)
  202. % eventdata reserved - to be defined in a future version of MATLAB
  203. % handles empty - handles not created until after all CreateFcns called
  204. % Hint: edit controls usually have a white background on Windows.
  205. % See ISPC and COMPUTER.
  206. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  207. set(hObject,'BackgroundColor','white');
  208. end
  209. function edit10_Callback(hObject, eventdata, handles)
  210. % hObject handle to edit10 (see GCBO)
  211. % eventdata reserved - to be defined in a future version of MATLAB
  212. % handles structure with handles and user data (see GUIDATA)
  213. % Hints: get(hObject,'String') returns contents of edit10 as text
  214. % str2double(get(hObject,'String')) returns contents of edit10 as a double
  215. handles.temp=str2double(get(hObject,'String'));
  216. guidata(hObject, handles);
  217. % --- Executes during object creation, after setting all properties.
  218. function edit10_CreateFcn(hObject, eventdata, handles)
  219. % hObject handle to edit10 (see GCBO)
  220. % eventdata reserved - to be defined in a future version of MATLAB
  221. % handles empty - handles not created until after all CreateFcns called
  222. % Hint: edit controls usually have a white background on Windows.
  223. % See ISPC and COMPUTER.
  224. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  225. set(hObject,'BackgroundColor','white');
  226. end
  227. function edit12_Callback(hObject, eventdata, handles)
  228. % hObject handle to edit12 (see GCBO)
  229. % eventdata reserved - to be defined in a future version of MATLAB
  230. % handles structure with handles and user data (see GUIDATA)
  231. % Hints: get(hObject,'String') returns contents of edit12 as text
  232. % str2double(get(hObject,'String')) returns contents of edit12 as a double
  233. handles.diely=get(hObject,'String');
  234. guidata(hObject, handles);
  235. % --- Executes during object creation, after setting all properties.
  236. function edit12_CreateFcn(hObject, eventdata, handles)
  237. % hObject handle to edit12 (see GCBO)
  238. % eventdata reserved - to be defined in a future version of MATLAB
  239. % handles empty - handles not created until after all CreateFcns called
  240. % Hint: edit controls usually have a white background on Windows.
  241. % See ISPC and COMPUTER.
  242. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  243. set(hObject,'BackgroundColor','white');
  244. end
  245. function edit13_Callback(hObject, eventdata, handles)
  246. % hObject handle to edit13 (see GCBO)
  247. % eventdata reserved - to be defined in a future version of MATLAB
  248. % handles structure with handles and user data (see GUIDATA)
  249. % Hints: get(hObject,'String') returns contents of edit13 as text
  250. % str2double(get(hObject,'String')) returns contents of edit13 as a double
  251. handles.dielz=get(hObject,'String');
  252. guidata(hObject, handles);
  253. % --- Executes during object creation, after setting all properties.
  254. function edit13_CreateFcn(hObject, eventdata, handles)
  255. % hObject handle to edit13 (see GCBO)
  256. % eventdata reserved - to be defined in a future version of MATLAB
  257. % handles empty - handles not created until after all CreateFcns called
  258. % Hint: edit controls usually have a white background on Windows.
  259. % See ISPC and COMPUTER.
  260. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  261. set(hObject,'BackgroundColor','white');
  262. end
  263. function edit14_Callback(hObject, eventdata, handles)
  264. % hObject handle to edit14 (see GCBO)
  265. % eventdata reserved - to be defined in a future version of MATLAB
  266. % handles structure with handles and user data (see GUIDATA)
  267. % Hints: get(hObject,'String') returns contents of edit14 as text
  268. % str2double(get(hObject,'String')) returns contents of edit14 as a double
  269. handles.kappa=get(hObject,'String');
  270. guidata(hObject, handles);
  271. % --- Executes during object creation, after setting all properties.
  272. function edit14_CreateFcn(hObject, eventdata, handles)
  273. % hObject handle to edit14 (see GCBO)
  274. % eventdata reserved - to be defined in a future version of MATLAB
  275. % handles empty - handles not created until after all CreateFcns called
  276. % Hint: edit controls usually have a white background on Windows.
  277. % See ISPC and COMPUTER.
  278. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  279. set(hObject,'BackgroundColor','white');
  280. end
  281. function edit15_Callback(hObject, eventdata, handles)
  282. % hObject handle to edit15 (see GCBO)
  283. % eventdata reserved - to be defined in a future version of MATLAB
  284. % handles structure with handles and user data (see GUIDATA)
  285. % Hints: get(hObject,'String') returns contents of edit15 as text
  286. % str2double(get(hObject,'String')) returns contents of edit15 as a double
  287. handles.mol1=get(hObject,'String');
  288. guidata(hObject, handles);
  289. % --- Executes during object creation, after setting all properties.
  290. function edit15_CreateFcn(hObject, eventdata, handles)
  291. % hObject handle to edit15 (see GCBO)
  292. % eventdata reserved - to be defined in a future version of MATLAB
  293. % handles empty - handles not created until after all CreateFcns called
  294. % Hint: edit controls usually have a white background on Windows.
  295. % See ISPC and COMPUTER.
  296. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  297. set(hObject,'BackgroundColor','white');
  298. end
  299. function edit16_Callback(hObject, eventdata, handles)
  300. % hObject handle to edit16 (see GCBO)
  301. % eventdata reserved - to be defined in a future version of MATLAB
  302. % handles structure with handles and user data (see GUIDATA)
  303. % Hints: get(hObject,'String') returns contents of edit16 as text
  304. % str2double(get(hObject,'String')) returns contents of edit16 as a double
  305. handles.mol2=get(hObject,'String');
  306. guidata(hObject, handles);
  307. % --- Executes during object creation, after setting all properties.
  308. function edit16_CreateFcn(hObject, eventdata, handles)
  309. % hObject handle to edit16 (see GCBO)
  310. % eventdata reserved - to be defined in a future version of MATLAB
  311. % handles empty - handles not created until after all CreateFcns called
  312. % Hint: edit controls usually have a white background on Windows.
  313. % See ISPC and COMPUTER.
  314. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  315. set(hObject,'BackgroundColor','white');
  316. end
  317. function edit17_Callback(hObject, eventdata, handles)
  318. % hObject handle to edit17 (see GCBO)
  319. % eventdata reserved - to be defined in a future version of MATLAB
  320. % handles structure with handles and user data (see GUIDATA)
  321. % Hints: get(hObject,'String') returns contents of edit17 as text
  322. % str2double(get(hObject,'String')) returns contents of edit17 as a double
  323. handles.digit=int8(str2double(get(hObject,'String')));
  324. guidata(hObject, handles);
  325. % --- Executes during object creation, after setting all properties.
  326. function edit17_CreateFcn(hObject, eventdata, handles)
  327. % hObject handle to edit17 (see GCBO)
  328. % eventdata reserved - to be defined in a future version of MATLAB
  329. % handles empty - handles not created until after all CreateFcns called
  330. % Hint: edit controls usually have a white background on Windows.
  331. % See ISPC and COMPUTER.
  332. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  333. set(hObject,'BackgroundColor','white');
  334. end
  335. function edit18_Callback(hObject, eventdata, handles)
  336. % hObject handle to edit18 (see GCBO)
  337. % eventdata reserved - to be defined in a future version of MATLAB
  338. % handles structure with handles and user data (see GUIDATA)
  339. % Hints: get(hObject,'String') returns contents of edit18 as text
  340. % str2double(get(hObject,'String')) returns contents of edit18 as a double
  341. handles.ionic=str2double(get(hObject,'String'));
  342. guidata(hObject, handles);
  343. % --- Executes during object creation, after setting all properties.
  344. function edit18_CreateFcn(hObject, eventdata, handles)
  345. % hObject handle to edit18 (see GCBO)
  346. % eventdata reserved - to be defined in a future version of MATLAB
  347. % handles empty - handles not created until after all CreateFcns called
  348. % Hint: edit controls usually have a white background on Windows.
  349. % See ISPC and COMPUTER.
  350. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  351. set(hObject,'BackgroundColor','white');
  352. end
  353. function edit19_Callback(hObject, eventdata, handles)
  354. % hObject handle to edit19 (see GCBO)
  355. % eventdata reserved - to be defined in a future version of MATLAB
  356. % handles structure with handles and user data (see GUIDATA)
  357. % Hints: get(hObject,'String') returns contents of edit19 as text
  358. % str2double(get(hObject,'String')) returns contents of edit19 as a double
  359. handles.solvent=str2double(get(hObject,'String'));
  360. guidata(hObject, handles);
  361. % --- Executes during object creation, after setting all properties.
  362. function edit19_CreateFcn(hObject, eventdata, handles)
  363. % hObject handle to edit19 (see GCBO)
  364. % eventdata reserved - to be defined in a future version of MATLAB
  365. % handles empty - handles not created until after all CreateFcns called
  366. % Hint: edit controls usually have a white background on Windows.
  367. % See ISPC and COMPUTER.
  368. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  369. set(hObject,'BackgroundColor','white');
  370. end
  371. function edit20_Callback(hObject, eventdata, handles)
  372. % hObject handle to edit20 (see GCBO)
  373. % eventdata reserved - to be defined in a future version of MATLAB
  374. % handles structure with handles and user data (see GUIDATA)
  375. % Hints: get(hObject,'String') returns contents of edit20 as text
  376. % str2double(get(hObject,'String')) returns contents of edit20 as a double
  377. handles.cin=get(hObject,'String');
  378. guidata(hObject, handles);
  379. % --- Executes during object creation, after setting all properties.
  380. function edit20_CreateFcn(hObject, eventdata, handles)
  381. % hObject handle to edit20 (see GCBO)
  382. % eventdata reserved - to be defined in a future version of MATLAB
  383. % handles empty - handles not created until after all CreateFcns called
  384. % Hint: edit controls usually have a white background on Windows.
  385. % See ISPC and COMPUTER.
  386. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  387. set(hObject,'BackgroundColor','white');
  388. end
  389. function edit23_Callback(hObject, eventdata, handles)
  390. % hObject handle to edit23 (see GCBO)
  391. % eventdata reserved - to be defined in a future version of MATLAB
  392. % handles structure with handles and user data (see GUIDATA)
  393. % Hints: get(hObject,'String') returns contents of edit23 as text
  394. % str2double(get(hObject,'String')) returns contents of edit23 as a double
  395. handles.cout=get(hObject,'String');
  396. guidata(hObject, handles);
  397. % --- Executes during object creation, after setting all properties.
  398. function edit23_CreateFcn(hObject, eventdata, handles)
  399. % hObject handle to edit23 (see GCBO)
  400. % eventdata reserved - to be defined in a future version of MATLAB
  401. % handles empty - handles not created until after all CreateFcns called
  402. % Hint: edit controls usually have a white background on Windows.
  403. % See ISPC and COMPUTER.
  404. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  405. set(hObject,'BackgroundColor','white');
  406. end
  407. function edit24_Callback(hObject, eventdata, handles)
  408. % hObject handle to edit24 (see GCBO)
  409. % eventdata reserved - to be defined in a future version of MATLAB
  410. % handles structure with handles and user data (see GUIDATA)
  411. % Hints: get(hObject,'String') returns contents of edit24 as text
  412. % str2double(get(hObject,'String')) returns contents of edit24 as a double
  413. handles.dime1=int16(str2double(get(hObject,'String')));
  414. guidata(hObject,handles);
  415. % --- Executes during object creation, after setting all properties.
  416. function edit24_CreateFcn(hObject, eventdata, handles)
  417. % hObject handle to edit24 (see GCBO)
  418. % eventdata reserved - to be defined in a future version of MATLAB
  419. % handles empty - handles not created until after all CreateFcns called
  420. % Hint: edit controls usually have a white background on Windows.
  421. % See ISPC and COMPUTER.
  422. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  423. set(hObject,'BackgroundColor','white');
  424. end
  425. % --- Executes on button press in radiobutton1.
  426. function radiobutton1_Callback(hObject, eventdata, handles)
  427. % hObject handle to radiobutton1 (see GCBO)
  428. % eventdata reserved - to be defined in a future version of MATLAB
  429. % handles structure with handles and user data (see GUIDATA)
  430. %bt1=get(hObject,'Value')
  431. if (get(hObject,'Value') == get(hObject,'Max'))
  432. handles.bc='sdh';
  433. guidata(hObject, handles);
  434. else
  435. handles.bc='focusname.inm';
  436. guidata(hObject, handles);
  437. end
  438. % Hint: get(hObject,'Value') returns toggle state of radiobutton1
  439. % --- Executes on button press in radiobutton2.
  440. function radiobutton2_Callback(hObject, eventdata, handles)
  441. % hObject handle to radiobutton2 (see GCBO)
  442. % eventdata reserved - to be defined in a future version of MATLAB
  443. % handles structure with handles and user data (see GUIDATA)
  444. %bt2=get(hObject,'Value')
  445. if (get(hObject,'Value') == get(hObject,'Max'))
  446. handles.bc='focusname.inm';
  447. guidata(hObject, handles);
  448. else
  449. handles.bc='sdh';
  450. guidata(hObject, handles);
  451. end
  452. % Hint: get(hObject,'Value') returns toggle state of radiobutton2
  453. % --- Executes on button press in radiobutton3.
  454. function radiobutton3_Callback(hObject, eventdata, handles)
  455. % hObject handle to radiobutton3 (see GCBO)
  456. % eventdata reserved - to be defined in a future version of MATLAB
  457. % handles structure with handles and user data (see GUIDATA)
  458. %bt3=get(hObject,'Value')
  459. if (get(hObject,'Value') == get(hObject,'Max'))
  460. handles.ener='calceneryes';
  461. guidata(hObject, handles);
  462. else
  463. handles.ener='calcenerno';
  464. guidata(hObject, handles);
  465. end
  466. % Hint: get(hObject,'Value') returns toggle state of radiobutton3
  467. % --- Executes on button press in radiobutton4.
  468. function radiobutton4_Callback(hObject, eventdata, handles)
  469. % hObject handle to radiobutton4 (see GCBO)
  470. % eventdata reserved - to be defined in a future version of MATLAB
  471. % handles structure with handles and user data (see GUIDATA)
  472. %bt4=get(hObject,'Value')
  473. if (get(hObject,'Value') == get(hObject,'Max'))
  474. handles.ener='calcenerno';
  475. guidata(hObject, handles);
  476. else
  477. handles.ener='calceneryes';
  478. guidata(hObject, handles);
  479. end
  480. % Hint: get(hObject,'Value') returns toggle state of radiobutton4
  481. % --- Executes on button press in pushbutton2.
  482. function pushbutton2_Callback(hObject, eventdata, handles)
  483. % hObject handle to pushbutton2 (see GCBO)
  484. % eventdata reserved - to be defined in a future version of MATLAB
  485. % handles structure with handles and user data (see GUIDATA)
  486. %data=guidata(hOject);
  487. dime(1)=handles.dime1;
  488. dime(2)=handles.dime2;
  489. dime(3)=handles.dime3;
  490. glen(1)=handles.glen1;
  491. glen(2)=handles.glen2;
  492. glen(3)=handles.glen3;
  493. bulk(1)=handles.ionic;
  494. bulk(2)=handles.solvent;
  495. fid = fopen(handles.filename, 'wt');
  496. fprintf(fid,'%g %g %g\n',dime);
  497. fprintf(fid,'%f %f %f\n', glen);
  498. fprintf(fid,'%f\n', handles.temp);
  499. fprintf(fid,'%f %f\n', bulk);
  500. fprintf(fid,'%s\n',handles.bc);
  501. fprintf(fid,'%g\n',handles.digit);
  502. fprintf(fid,'%s\n',handles.dielx);
  503. fprintf(fid,'%s\n',handles.diely);
  504. fprintf(fid,'%s\n',handles.dielz);
  505. fprintf(fid,'%s\n',handles.kappa);
  506. fprintf(fid,'%s\n',handles.mol1);
  507. fprintf(fid,'%s\n',handles.mol2);
  508. fprintf(fid,'%s\n',handles.ener);
  509. fprintf(fid,'%s\n',handles.cin);
  510. fprintf(fid,'%s\n',handles.cout);
  511. fclose(fid);
  512. if strcmp(handles.filename, 'focusname.inm')==1
  513. msgbox('The focusname.inm was successfully generated. Please, press Run MAPBS','GREAT','none')
  514. end
  515. if (strcmp(handles.filename, 'inputfile.inm')==1 && strcmp(handles.bc, 'sdh')==1)
  516. msgbox('The inputfile.inm was successfully generated. Please, press Run MAPBS','GREAT','none')
  517. end
  518. if strcmp(handles.bc, 'focusname.inm')==1
  519. warndlg('The inputfile.inm was generated. Please type now the corresponding values for the coarse grid calculation and then press Generate Input Files again','!! Warning, Focus Boundary Condition !!')
  520. handles.filename='focusname.inm';
  521. guidata(hObject, handles);
  522. end
  523. % --- Executes on button press in pushbutton3.
  524. function pushbutton3_Callback(hObject, eventdata, handles)
  525. % hObject handle to pushbutton3 (see GCBO)
  526. % eventdata reserved - to be defined in a future version of MATLAB
  527. % handles structure with handles and user data (see GUIDATA)
  528. msgbox('The MAPBS is running in your MATLAB command windows. you can close any other matlab windows anytime.','MAPBS Calculation','none')
  529. pause(6)
  530. close
  531. pause(6)
  532. MAPBS('inputfile.inm')