UltraScan III
us_adv_dmgamc.cpp
Go to the documentation of this file.
1 
3 #include "us_adv_dmgamc.h"
4 #include "us_fematch.h"
5 #include "us_settings.h"
6 #include "us_gui_settings.h"
7 #include "qwt_legend.h"
8 
9 // constructor: advanced analysis control widget
11  QVector< US_Model >& aimodels,
12  QMap< QString, QString >& adv_vals, QWidget* p ) :
13  US_WidgetsDialog( p, 0 ), imodels( aimodels ), parmap( adv_vals )
14 {
15  model = amodel;
16  parentw = p;
17  umodel = *model;
19 
20  setObjectName( "US_AdvDmgaMC" );
21  setPalette( US_GuiSettings::frameColor() );
23 
24  // lay out the GUI
25  setWindowTitle( tr( "DMGA-MC Advanced Controls" ) );
26 
27  mainLayout = new QVBoxLayout( this );
28  paramLayout = new QGridLayout();
30  tr( "Attribute Distribution" ),
31  tr( "Attribute Name" ),
32  tr( "Frequency" ) );
33 
34  data_plot->setCanvasBackground( Qt::black );
35 
36  mainLayout->setSpacing ( 2 );
37  mainLayout->setContentsMargins( 2, 2, 2, 2 );
38 
39  QLabel* lb_modelsim = us_banner( tr( "Simulate data using parameters from " "Monte Carlo statistics or from "
40  "current iteration model" ) );
41 
42  QButtonGroup* um_group = new QButtonGroup( this );
43  lo_mean = us_radiobutton( tr( "Mean" ), rb_mean, true );
44  lo_median = us_radiobutton( tr( "Median" ), rb_median, false );
45  lo_mode = us_radiobutton( tr( "Mode" ), rb_mode, false );
46  lo_curmod = us_radiobutton( tr( "Current Model" ), rb_curmod, false );
47  um_group->addButton( rb_mean, 0 );
48  um_group->addButton( rb_median, 1 );
49  um_group->addButton( rb_mode, 2 );
50  um_group->addButton( rb_curmod, 3 );
51  QPushButton* pb_help = us_pushbutton( tr( "Help" ) );
52  QPushButton* pb_simulate = us_pushbutton( tr( "Simulate" ) );
53  QPushButton* pb_close = us_pushbutton( tr( "Close" ) );
54 
55  le_modtype = us_lineedit( "", -1, true );
56  QPalette mtpal = le_modtype->palette();
57  mtpal.setColor( QPalette::Text, Qt::blue );
58  le_modtype->setPalette( mtpal );
59 
60  pb_nextmodel = us_pushbutton( tr( "Next Model" ) );
61  QPushButton* pb_nextparm = us_pushbutton( tr( "Next Parameter >" ) );
62  QPushButton* pb_prevparm = us_pushbutton( tr( "< Previous Parameter" ) );
64  ls_params .clear();
65  ls_params << tr( "Component 1 Sedimentation Coefficient" );
66  ls_params << tr( "Component 1 Diffusion Coefficient" );
67  ls_params << tr( "Component 1 Molecular Weight" );
68  ls_params << tr( "Component 1 Frictional Ratio" );
69  ls_params << tr( "Component 1 Vbar (20_W)" );
70  ls_params << tr( "Component 1 Partial Concentration" );
71  ls_params << tr( "Reaction 1 k_Dissociation:" );
72  ls_params << tr( "Reaction 1 k_off Rate:" );
73  cb_params->addItems( ls_params );
74 
75  ct_modelnbr = us_counter( 2, 1, 50, 1 );
76 
77  QLabel* lb_ms_mean = us_label( tr( "Mean" ) );
78  QLabel* lb_ms_95lo = us_label( tr( "95% Conf.Low" ) );
79  QLabel* lb_ms_95hi = us_label( tr( "95% Conf.High" ) );
80  QLabel* lb_ms_medi = us_label( tr( "Median" ) );
81  QLabel* lb_ms_mode = us_label( tr( "Mode" ) );
82  lb_ms_iter = us_label( tr( "Iteration 25" ) );
83  le_ms_mean = us_lineedit( "", -1, true );
84  le_ms_95lo = us_lineedit( "", -1, true );
85  le_ms_95hi = us_lineedit( "", -1, true );
86  le_ms_medi = us_lineedit( "", -1, true );
87  le_ms_mode = us_lineedit( "", -1, true );
88  le_ms_iter = us_lineedit( "", -1, true );
89 
90  int row = 0;
91  paramLayout->addWidget( lb_ms_mean, row, 0, 1, 2 );
92  paramLayout->addWidget( lb_ms_95lo, row, 2, 1, 2 );
93  paramLayout->addWidget( lb_ms_95hi, row, 4, 1, 2 );
94  paramLayout->addWidget( lb_ms_medi, row, 6, 1, 2 );
95  paramLayout->addWidget( lb_ms_mode, row, 8, 1, 2 );
96  paramLayout->addWidget( lb_ms_iter, row++, 10, 1, 2 );
97  paramLayout->addWidget( le_ms_mean, row, 0, 1, 2 );
98  paramLayout->addWidget( le_ms_95lo, row, 2, 1, 2 );
99  paramLayout->addWidget( le_ms_95hi, row, 4, 1, 2 );
100  paramLayout->addWidget( le_ms_medi, row, 6, 1, 2 );
101  paramLayout->addWidget( le_ms_mode, row, 8, 1, 2 );
102  paramLayout->addWidget( le_ms_iter, row++, 10, 1, 2 );
103  paramLayout->addWidget( lb_modelsim, row++, 0, 1, 12 );
104  paramLayout->addLayout( lo_mean, row, 0, 1, 3 );
105  paramLayout->addLayout( lo_median, row, 3, 1, 3 );
106  paramLayout->addLayout( lo_mode, row, 6, 1, 3 );
107  paramLayout->addLayout( lo_curmod, row++, 9, 1, 3 );
108  paramLayout->addWidget( le_modtype, row, 0, 1, 6 );
109  paramLayout->addWidget( pb_nextmodel, row, 6, 1, 3 );
110  paramLayout->addWidget( ct_modelnbr, row++, 9, 1, 3 );
111  paramLayout->addWidget( pb_prevparm, row, 0, 1, 3 );
112  paramLayout->addWidget( pb_nextparm, row, 3, 1, 3 );
113  paramLayout->addWidget( cb_params, row++, 6, 1, 6 );
114  paramLayout->addWidget( pb_help, row, 0, 1, 4 );
115  paramLayout->addWidget( pb_simulate, row, 4, 1, 4 );
116  paramLayout->addWidget( pb_close, row++, 8, 1, 4 );
117 
118  mainLayout ->addLayout( plotLayout );
119  mainLayout ->addLayout( paramLayout );
120 
121  ct_modelnbr ->setValue( 0 );
122  ct_modelnbr ->setStep( 1 );
123 
124  pb_nextmodel->setEnabled( false );
125  ct_modelnbr ->setEnabled( false );
126 
127  connect( pb_nextmodel, SIGNAL( clicked () ),
128  this, SLOT ( next_model () ) );
129  connect( ct_modelnbr, SIGNAL( valueChanged ( double ) ),
130  this, SLOT ( change_model ( double ) ) );
131  connect( rb_mean, SIGNAL( toggled ( bool ) ),
132  this, SLOT ( set_model_type( bool ) ) );
133  connect( rb_median, SIGNAL( toggled ( bool ) ),
134  this, SLOT ( set_model_type( bool ) ) );
135  connect( rb_mode, SIGNAL( toggled ( bool ) ),
136  this, SLOT ( set_model_type( bool ) ) );
137  connect( rb_curmod, SIGNAL( toggled ( bool ) ),
138  this, SLOT ( set_model_type( bool ) ) );
139  connect( pb_prevparm, SIGNAL( clicked () ),
140  this, SLOT ( prev_param () ) );
141  connect( pb_nextparm, SIGNAL( clicked () ),
142  this, SLOT ( next_param () ) );
143  connect( cb_params, SIGNAL( activated ( int ) ),
144  this, SLOT ( plot_distrib () ) );
145 
146  connect( pb_help, SIGNAL( clicked() ),
147  this, SLOT ( help() ) );
148  connect( pb_simulate, SIGNAL( clicked() ),
149  this, SLOT ( simulate() ) );
150  connect( pb_close, SIGNAL( clicked() ),
151  this, SLOT ( done() ) );
152 
153  adjustSize();
154  QFontMetrics fmet( QFont( US_GuiSettings::fontFamily(),
155  US_GuiSettings::fontSize() - 1 ) );
156  int fwid = fmet.maxWidth();
157  int rhgt = lb_modelsim->height();
158  int csizw = fwid * 2;
159  ct_modelnbr ->resize( csizw, rhgt );
160  ct_modelnbr ->setMaximumWidth( csizw * 3 );
161 
163 
165  int ncomp = umodel.components.size();
166  int nreac = umodel.associations.size();
167 
168  le_modtype ->setText( tr( "Mean model, %1 components, %2 reaction(s)" )
169  .arg( ncomp ).arg( nreac ) );
170 
171  ls_params.clear();
172 
173  for ( int ii = 0; ii < ncomp; ii++ )
174  {
175  QString comp = tr( "Component %1 " ).arg( ii + 1 );
176  ls_params << comp + tr( "Sedimentation Coefficient" );
177  ls_params << comp + tr( "Diffusion Coefficient" );
178  ls_params << comp + tr( "Molecular Weight" );
179  ls_params << comp + tr( "Frictional Ratio" );
180  ls_params << comp + tr( "Vbar (20_W)" );
181  ls_params << comp + tr( "Partial Concentration" );
182  }
183 
184  for ( int ii = 0; ii < nreac; ii++ )
185  {
186  QString reac = tr( "Reaction %1 " ).arg( ii + 1 );
187  ls_params << reac + tr( "k_Dissociation:" );
188  ls_params << reac + tr( "k_off Rate:" );
189  }
190 
191  cb_params->clear();
192  cb_params->addItems( ls_params );
193  cb_params->setCurrentIndex( 0 );
194  lb_ms_iter->setText( tr( "Iteration 1" ) );
195 
196 qDebug() << "AdvD:Pre-adjust size" << size();
197  adjustSize();
198 qDebug() << "AdvD:Post-adjust size" << size();
199  resize( 720, 640 );
200 qDebug() << "AdvD:Post-resize size" << size();
201 
202  plot_distrib();
203 
204  qApp->processEvents();
205 }
206 
207 // Private slot to pass parameters then close with an accepted() signal
208 void US_AdvDmgaMc::done( void )
209 {
210  parmap[ "modelnbr" ] = QString::number( ct_modelnbr ->value() );
211  parmap[ "modelsim" ] = rb_mean ->isChecked() ? "mean" :
212  ( rb_median->isChecked() ? "median" :
213  ( rb_mode ->isChecked() ? "mode" :
214  ( rb_curmod->isChecked() ? "model" : "" ) ) );
215 
216  *model = umodel;
217 
218  accept();
219 }
220 
221 // Private slot to advance to the next iteration model
223 {
224  int imodl = (int)ct_modelnbr->value();
225  int nmodl = imodels.size();
226 
227  imodl = ( imodl < nmodl ) ? ( imodl + 1 ) : 1;
228  ct_modelnbr->setValue( (double)imodl );
229 }
230 
231 // Private slot to change the iteration number for the used model
232 void US_AdvDmgaMc::change_model( double mnbr )
233 {
234  int mx = (int)mnbr - 1;
235  umodel = imodels[ mx ];
236 
237  set_model_type( true );
238 }
239 
240 // Private slot to set model type and change used model
242 {
243  if ( ! chekd ) return;
244 
245  bool ck_cmod = rb_curmod->isChecked();
246  bool ck_mean = rb_mean ->isChecked();
247  bool ck_medi = rb_median->isChecked();
248  bool ck_mode = rb_mode ->isChecked();
249  int iter = (int)ct_modelnbr->value();
250 
251  QString smtype = ck_mean ? tr( "mean" ) : "";
252  smtype = ck_medi ? tr( "median" ) : smtype;
253  smtype = ck_mode ? tr( "mode" ) : smtype;
254  smtype = ck_cmod ? tr( "model" ) : smtype;
255 
257 
258  if ( ! ck_cmod )
260  int ncomp = umodel.components .size();
261  int nreac = umodel.associations.size();
262  QString mtlabl = ck_mean ? tr( "Mean" ) : "";
263  mtlabl = ck_medi ? tr( "Median" ) : mtlabl;
264  mtlabl = ck_mode ? tr( "Mode" ) : mtlabl;
265  mtlabl = ck_cmod ? tr( "Iteration %1" ).arg( iter ) : mtlabl;
266  le_modtype ->setText( mtlabl + tr( " model, %1 components, %2 reaction(s)" )
267  .arg( ncomp ).arg( nreac ) );
268 
269  pb_nextmodel->setEnabled( ck_cmod );
270  ct_modelnbr ->setEnabled( ck_cmod );
271 
272  plot_distrib();
273 }
274 
275 // Plot distribution for a specified attribute
277 {
278  const QString ytitle = tr( "Frequency" );
279  const double pad_lo = 0.95;
280  const double pad_hi = 1.05;
281  QVector< double > xvec_in;
282  QVector< double > xvec_pl;
283  QVector< double > yvec_pl;
284 
285  int iter = (int)ct_modelnbr->value();
286  int nxi = imodels.size();
287  QString attrib = cb_params->currentText();
288  int jc = attrib.section( " ", 1, 1 ).toInt() - 1;
289  int jr = jc;
290  jc = attrib.contains( tr( "Component" ) ) ? jc : -1;
291  jr = attrib.contains( tr( "Reaction" ) ) ? jr : -1;
292  QString xtitle = attrib.section( " ", 2, -1 ).simplified();
293  xvec_in.clear();
294  double xvalcm = 0.0;
295  int hx = iter - 1;
296 
297  for ( int ii = 0; ii < nxi; ii++ )
298  { // Accumulate the input model X distribution values
301  double xval = 0.0;
302 
303  if ( jr < 0 )
304  { // Get a component attribute value
305  sc = &imodels[ ii ].components[ jc ];
306  xval = sc->s;
307  xval = xtitle.contains( tr( "Diffusion" ) ) ? sc->D : xval;
308  xval = xtitle.contains( tr( "Molecular" ) ) ? sc->mw : xval;
309  xval = xtitle.contains( tr( "Frictional" ) ) ? sc->f_f0 : xval;
310  xval = xtitle.contains( tr( "Vbar" ) ) ? sc->vbar20 : xval;
311  xval = xtitle.contains( tr( "Concentration" ) )
312  ? sc->signal_concentration : xval;
313  }
314 
315  else
316  { // Get a reaction attribute value
317  as = &imodels[ ii ].associations[ jr ];
318  xval = as->k_d;
319  xval = xtitle.contains( tr( "Rate" ) ) ? as->k_off : xval;
320  }
321 
322  xvec_in << xval;
323 
324  if ( ii == hx )
325  xvalcm = xval;
326  }
327 
328  // Sort the X values
329  qSort( xvec_in );
330  double* xvi = xvec_in.data();
331 
332  // Build unique X's and their frequencies (Y's)
333  xvec_pl.clear();
334  yvec_pl.clear();
335  double xprev = xvi[ 0 ];
336  double xkmax = 1.0;
337  double xknt = 1.0;
338 
339  for ( int ii = 1; ii < nxi; ii++ )
340  {
341  double xval = xvi[ ii ];
342 
343  if ( xval == xprev )
344  {
345  xknt += 1.0;
346  xkmax = qMax( xkmax, xknt );
347  }
348 
349  else
350  {
351  xvec_pl << xprev;
352  yvec_pl << xknt;
353  xknt = 1.0;
354  xprev = xval;
355  }
356  }
357 
358  // Store the last pair
359  xvec_pl << xprev;
360  yvec_pl << xknt;
361 
362  double* xvp = xvec_pl.data();
363  double* yvp = yvec_pl.data();
364  int nxyp = xvec_pl.size();
365  double ymax = xkmax * pad_hi; // Add a slight pad to Y maximum
366 
367  if ( nxyp < 3 )
368  { // If only 1 or 2 points, expand to center points in X
369  nxyp += 2;
370  xvec_pl.resize( nxyp );
371  yvec_pl.resize( nxyp );
372 
373  if ( nxyp == 3 )
374  { // If there was 1, expand to 3
375  xvec_pl[ 1 ] = xvec_pl[ 0 ];
376  yvec_pl[ 1 ] = yvec_pl[ 0 ];
377  xvec_pl[ 0 ] = xvec_pl[ 1 ] * pad_lo;
378  yvec_pl[ 0 ] = 0.0;
379  xvec_pl[ 2 ] = xvec_pl[ 1 ] * pad_hi;
380  yvec_pl[ 2 ] = 0.0;
381  }
382 
383  else
384  { // If there were 2, expand to 4
385  xvec_pl[ 2 ] = xvec_pl[ 1 ];
386  yvec_pl[ 2 ] = yvec_pl[ 1 ];
387  xvec_pl[ 1 ] = xvec_pl[ 0 ];
388  yvec_pl[ 1 ] = yvec_pl[ 0 ];
389  xvec_pl[ 0 ] = xvec_pl[ 1 ] * pad_lo;
390  yvec_pl[ 0 ] = 0.0;
391  xvec_pl[ 3 ] = xvec_pl[ 2 ] * pad_hi;
392  yvec_pl[ 3 ] = 0.0;
393  }
394 
395  xvp = xvec_pl.data();
396  yvp = yvec_pl.data();
397  }
398 
399  // Do the plot
400  data_plot->detachItems();
401  data_plot->setTitle ( tr( "Distribution" ) );
402  data_plot->setAxisTitle ( QwtPlot::yLeft, ytitle );
403  data_plot->setAxisTitle ( QwtPlot::xBottom, xtitle );
404  data_plot->setAxisScale ( QwtPlot::yLeft, 0.0, ymax );
405  data_plot->setAxisAutoScale( QwtPlot::xBottom );
406  us_grid( data_plot );
407  QwtPlotCurve* curve = us_curve( data_plot, tr( "Curve " ) + xtitle );
408  curve->setPen ( QPen( US_GuiSettings::plotCurve(), 2 ) );
409  curve->setStyle( QwtPlotCurve::Sticks );
410  curve->setData ( xvp, yvp, nxyp );
411 
412  // Fill in the model statistics summary for the attribute
413  QVector< QVector< double > > mstats;
414  int niters = imodels.size();
415  int dx = cb_params->currentIndex();
416  int ncomp = imodels[ 0 ].components.size();
417 
418  if ( dx < ( ncomp * 6 ) )
419  { // Remap from distribution index to model stats index
420  int cx = ( dx / 6 ) * 6;
421  int ax = dx - cx;
422  dx = ( ax == 0 ) ? ( cx + 3 ) : dx;
423  dx = ( ax == 1 ) ? ( cx + 4 ) : dx;
424  dx = ( ax == 2 ) ? ( cx + 2 ) : dx;
425  dx = ( ax == 3 ) ? ( cx + 5 ) : dx;
426  dx = ( ax == 4 ) ? ( cx + 1 ) : dx;
427  dx = ( ax == 5 ) ? ( cx ) : dx;
428  }
429 
430  US_DmgaMcStats::build_model_stats( niters, imodels, mstats );
431 
432  le_ms_mean->setText( QString::number( mstats[ dx ][ 2 ] ) );
433  le_ms_95lo->setText( QString::number( mstats[ dx ][ 9 ] ) );
434  le_ms_95hi->setText( QString::number( mstats[ dx ][ 10 ] ) );
435  le_ms_medi->setText( QString::number( mstats[ dx ][ 3 ] ) );
436  le_ms_mode->setText( QString::number( mstats[ dx ][ 8 ] ) );
437  le_ms_iter->setText( QString::number( xvalcm ) );
438 
439  // Add single points and legend entries for Mean, Median, ...
440  QwtLegend* legend = new QwtLegend;
441  double xm[ 4 ];
442  double ym[ 4 ];
443  xm[ 0 ] = mstats[ dx ][ 2 ];
444  xm[ 1 ] = mstats[ dx ][ 3 ];
445  xm[ 2 ] = mstats[ dx ][ 8 ];
446  xm[ 3 ] = xvalcm;
447  ym[ 0 ] = xkmax * 1.015;
448  ym[ 1 ] = xkmax * 1.025;
449  ym[ 2 ] = xkmax * 1.035;
450  ym[ 3 ] = xkmax * 1.045;
451  const QString cl_mean = tr( "Mean" );
452  const QString cl_medi = tr( "Median" );
453  const QString cl_mode = tr( "Mode" );
454  QString cl_iter = tr( "Iteration %1" ).arg( iter );
455  lb_ms_iter->setText( cl_iter );
456  const QColor co_bord ( Qt::blue );
457  const QColor co_mean ( Qt::cyan );
458  const QColor co_medi ( "orange" );
459  const QColor co_mode ( Qt::red );
460  const QColor co_iter ( "lime" );
461  legend->setFrameStyle( QFrame::Box | QFrame::Sunken );
462  legend->setFont( QFont( US_GuiSettings::fontFamily(),
463  US_GuiSettings::fontSize() - 2 ) );
464  data_plot->insertLegend( legend, QwtPlot::BottomLegend );
465  curve->setItemAttribute( QwtPlotItem::Legend, false );
466  QwtPlotCurve* curv_mean = us_curve( data_plot, cl_mean );
467  QwtPlotCurve* curv_medi = us_curve( data_plot, cl_medi );
468  QwtPlotCurve* curv_mode = us_curve( data_plot, cl_mode );
469  QwtPlotCurve* curv_iter = us_curve( data_plot, cl_iter );
470  QwtSymbol sym_mean;
471  QwtSymbol sym_medi;
472  QwtSymbol sym_mode;
473  QwtSymbol sym_iter;
474  sym_mean.setStyle( QwtSymbol::Ellipse );
475  sym_mean.setPen ( QPen ( co_bord ) );
476  sym_mean.setBrush( QBrush( co_mean ) );
477  sym_mean.setSize ( 6 );
478  curv_mean->setStyle( QwtPlotCurve::NoCurve );
479  curv_mean->setSymbol( sym_mean );
480  curv_mean->setItemAttribute( QwtPlotItem::Legend, true );
481  sym_medi.setStyle( QwtSymbol::Rect );
482  sym_medi.setPen ( QPen ( co_bord ) );
483  sym_medi.setBrush( QBrush( co_medi ) );
484  sym_medi.setSize ( 6 );
485  curv_medi->setStyle( QwtPlotCurve::NoCurve );
486  curv_medi->setSymbol( sym_medi );
487  curv_medi->setItemAttribute( QwtPlotItem::Legend, true );
488  sym_mode.setStyle( QwtSymbol::DTriangle );
489  sym_mode.setPen ( QPen ( co_bord ) );
490  sym_mode.setBrush( QBrush( co_mode ) );
491  sym_mode.setSize ( 8 );
492  curv_mode->setStyle( QwtPlotCurve::NoCurve );
493  curv_mode->setSymbol( sym_mode );
494  curv_mode->setItemAttribute( QwtPlotItem::Legend, true );
495  sym_iter.setStyle( QwtSymbol::Cross );
496  sym_iter.setPen ( QPen ( co_iter ) );
497  sym_iter.setBrush( QBrush( co_iter ) );
498  sym_iter.setSize ( 8 );
499  curv_iter->setStyle( QwtPlotCurve::NoCurve );
500  curv_iter->setSymbol( sym_iter );
501  curv_iter->setItemAttribute( QwtPlotItem::Legend, true );
502  curv_mean->setData ( xm , ym , 1 );
503  curv_medi->setData ( xm + 1, ym + 1, 1 );
504  curv_mode->setData ( xm + 2, ym + 2, 1 );
505  curv_iter->setData ( xm + 3, ym + 3, 1 );
506 
507  // Show the plot
508  data_plot->replot();
509 }
510 
511 // Bump selected distribution parameter to the next one
513 {
514  // Bump distribute choice to the next one
515  int disx = cb_params->currentIndex();
516  disx++;
517  disx = ( disx < ls_params.size() ) ? disx : 0;
518  cb_params->setCurrentIndex( disx );
519 
520  plot_distrib();
521 }
522 
523 // Bump selected distribution parameter to the previous one
525 {
526  // Bump distribute choice to the next one
527  int disx = cb_params->currentIndex();
528  disx--;
529  disx = ( disx < 0 ) ? ( ls_params.size() - 1 ) : disx;
530  cb_params->setCurrentIndex( disx );
531 
532  plot_distrib();
533 }
534 
535 // Signal main-window Simulate, after insuring parameter settings are saved
537 {
538  parmap[ "modelnbr" ] = QString::number( ct_modelnbr ->value() );
539  parmap[ "modelsim" ] = rb_mean ->isChecked() ? "mean" :
540  ( rb_median->isChecked() ? "median" :
541  ( rb_mode ->isChecked() ? "mode" :
542  ( rb_curmod->isChecked() ? "model" : "" ) ) );
543 
544  if ( ! rb_curmod->isChecked() )
546  *model = umodel;
547  US_FeMatch* fem_wind = (US_FeMatch*)parentw;
548 
549  fem_wind->simulate();
550 }
551