21import java.awt.BorderLayout;
22import java.awt.Dimension;
23import java.awt.FlowLayout;
24import java.awt.GridLayout;
25import java.awt.event.ActionEvent;
26import java.awt.event.ActionListener;
27import java.util.ArrayList;
28import java.util.Arrays;
29import java.util.HashMap;
33import javax.swing.BoxLayout;
34import javax.swing.GroupLayout;
35import javax.swing.JButton;
36import javax.swing.JComboBox;
37import javax.swing.JLabel;
38import javax.swing.JOptionPane;
39import javax.swing.JPanel;
40import javax.swing.JRadioButton;
41import javax.swing.JScrollPane;
42import javax.swing.JTable;
43import javax.swing.JTextField;
44import javax.swing.SwingConstants;
45import javax.swing.UIManager;
46import javax.swing.table.DefaultTableModel;
48import denoptim.fragspace.FragmentSpace;
49import denoptim.graph.rings.RingClosureParameters;
246 String
keyPar34 =
"RC-ExtraDistanceToleranceFactor";
253 String
NL = System.getProperty(
"line.separator");
261 this.setLayout(
new BorderLayout());
263 JPanel
block =
new JPanel();
264 JScrollPane scrollablePane =
new JScrollPane(
block);
265 block.setLayout(
new BoxLayout(
block, SwingConstants.VERTICAL));
287 String toolTipSrcOrNew =
"Tick here to use parameters from a previously "
288 +
"defined space of building blocks.";
289 lineSrcOrNew =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
290 rdbSrcOrNew =
new JRadioButton(
"Use parameters from existing file");
292 rdbSrcOrNew.addActionListener(
new ActionListener(){
293 public void actionPerformed(ActionEvent e){
315 String toolTipFSSource =
"<html>Pathname of a DENOPTIM's parameter file with GA settings.</html>";
316 lineFSSource =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
317 lblFSSource =
new JLabel(
"Previous parameters file:", SwingConstants.LEFT);
323 btnFSSource.addActionListener(
new ActionListener() {
324 public void actionPerformed(ActionEvent e) {
329 txtFSSource.setToolTipText(
"<html>Specify a file with parameters to "
330 +
"be loaded in this form.</html>");
332 public void actionPerformed(ActionEvent e) {
339 if (e1.getMessage().equals(
"") || e1.getMessage() ==
null)
341 e1.printStackTrace();
343 "<html>Exception occurred while importing parameters.<br>Please, report this to the DENOPTIM team.</html>",
345 JOptionPane.ERROR_MESSAGE,
346 UIManager.getIcon(
"OptionPane.errorIcon"));
353 JOptionPane.ERROR_MESSAGE,
354 UIManager.getIcon(
"OptionPane.errorIcon"));
366 String toolTipPar1 =
"Pathname of the file containing the list of scaffolds.";
367 linePar1 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
368 lblPar1 =
new JLabel(
"Library of Scaffolds:", SwingConstants.LEFT);
370 lblPar1.setToolTipText(toolTipPar1);
372 txtPar1.setToolTipText(toolTipPar1);
376 btnPar1 =
new JButton(
"Browse");
377 btnPar1.addActionListener(
new ActionListener() {
378 public void actionPerformed(ActionEvent e) {
387 String toolTipPar2 =
"Pathname of the file containing the list of fragments.";
388 linePar2 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
389 lblPar2 =
new JLabel(
"Library of vertices:", SwingConstants.LEFT);
391 lblPar2.setToolTipText(toolTipPar2);
393 txtPar2.setToolTipText(toolTipPar2);
397 btnPar2 =
new JButton(
"Browse");
398 btnPar2.addActionListener(
new ActionListener() {
399 public void actionPerformed(ActionEvent e) {
408 String toolTipPar3 =
"Pathname of the file containing the list of capping groups.";
409 linePar3 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
410 lblPar3 =
new JLabel(
"Capping groups library:", SwingConstants.LEFT);
412 lblPar3.setToolTipText(toolTipPar3);
414 txtPar3.setToolTipText(toolTipPar3);
418 btnPar3 =
new JButton(
"Browse");
419 btnPar3.addActionListener(
new ActionListener() {
420 public void actionPerformed(ActionEvent e) {
429 String toolTipCPMat =
"<html>Pathname of the compatibility matrix file.<br>Note that this file contains the compatibility matrix, map of AP-Class to bond order, the capping rules, and the list of forbidden ends.</html>";
430 lineCPMat =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
431 lblCPMat =
new JLabel(
"Compatibility matrix file:", SwingConstants.LEFT);
433 lblCPMat.setToolTipText(toolTipCPMat);
435 txtCPMat.setToolTipText(toolTipCPMat);
440 btnCPMat.addActionListener(
new ActionListener() {
441 public void actionPerformed(ActionEvent e) {
450 String toolTipPar6 =
"<html>Pathname of the file containing the definition of the rotatable bonds.<br>Must be a list of SMARTS.</html>";
451 linePar6 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
452 lblPar6 =
new JLabel(
"Rotatable bonds list:", SwingConstants.LEFT);
454 lblPar6.setToolTipText(toolTipPar6);
456 txtPar6.setToolTipText(toolTipPar6);
460 btnPar6 =
new JButton(
"Browse");
461 btnPar6.addActionListener(
new ActionListener() {
462 public void actionPerformed(ActionEvent e) {
471 String toolTipPar7 =
"Maximum number of heavy (non-hydrogen) atoms for a candidate.";
472 linePar7 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
473 lblPar7 =
new JLabel(
"Max non-H atoms:", SwingConstants.LEFT);
475 lblPar7.setToolTipText(toolTipPar7);
477 txtPar7.setToolTipText(toolTipPar7);
485 String toolTipPar8 =
"Maximum molecular weight accepted for a candidate";
486 linePar8 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
487 lblPar8 =
new JLabel(
"Max molecular weight: ", SwingConstants.LEFT);
489 lblPar8.setToolTipText(toolTipPar8);
491 txtPar8.setToolTipText(toolTipPar8);
499 String toolTipPar9 =
"Maximum number of rotatable bonds accepted for a candidate";
500 linePar9 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
501 lblPar9 =
new JLabel(
"Max rotatable bonds:", SwingConstants.LEFT);
503 lblPar9.setToolTipText(toolTipPar9);
505 txtPar9.setToolTipText(toolTipPar9);
513 String toolTipPar10 =
"<html>Forces constitutional symmetry whenever possible.<br>Corresponds to setting the symmetric substitution probability to 100%.</html>";
514 linePar10 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
515 rdbPar10 =
new JRadioButton(
"Enforce symmetry:");
516 rdbPar10.setToolTipText(toolTipPar10);
522 String toolTipPar11 =
"<html>List of constraints in the symmetric substitution probability.<br>These constraints overwrite the any other settings only for the specific AP-classes.</html>";
523 linePar11 =
new JPanel(
new GridLayout(2, 2));
524 lblPar11 =
new JLabel(
"Symmetry constraints:", SwingConstants.LEFT);
526 lblPar11.setToolTipText(toolTipPar11);
532 tabPar11.putClientProperty(
"terminateEditOnFocusLost", Boolean.TRUE);
534 btnPar11Insert.setToolTipText(
"Click to choose an AP-Class from the "
535 +
"compatibility matrix specified above.");
537 public void actionPerformed(ActionEvent e){
543 boolean apClassesFromCPMap =
false;
544 Object[] allAPClasses =
new Object[]{};
551 apClassesFromCPMap=
true;
556 "<html>The current parameters do not create a valid "
557 +
"space of building blocks.<br>"
558 +
"It looks like you want to manually insert APClasses.<br>"
559 +
"If this is not true, you must adjust the parameters defining the "
560 +
"space of building blocks.</html>",
561 "No valid FragmentSpace",
562 JOptionPane.WARNING_MESSAGE);
565 if (apClassesFromCPMap)
567 boolean done =
false;
570 String apClass = (String)JOptionPane.showInputDialog(
572 "Choose attachment point class:",
574 JOptionPane.PLAIN_MESSAGE,
579 if ((apClass !=
null) && (apClass.length() > 0))
581 boolean goodChoice =
true;
584 for (
int i=0; i<
tabPar11.getRowCount(); i++)
586 if (apClass.equals(
tabPar11.getValueAt(i, 0)))
588 JOptionPane.showMessageDialog(
590 "<html>apClass already in the "
591 +
"table.<br>Choose another "
594 JOptionPane.ERROR_MESSAGE);
614 boolean done =
false;
617 String apClass = (String)JOptionPane.showInputDialog(
619 "<html>No fragment library found.<br>Type an attachment point class:</html>",
621 JOptionPane.PLAIN_MESSAGE);
623 if ((apClass !=
null) && (apClass.length() > 0))
625 boolean goodChoice =
true;
628 for (
int i=0; i<
tabPar11.getRowCount(); i++)
630 if (apClass.equals(
tabPar11.getValueAt(i, 0)))
632 JOptionPane.showMessageDialog(
634 "<html>apClass already in the table.<br>Choose another class.",
636 JOptionPane.ERROR_MESSAGE);
656 btnPar11Cleanup.setToolTipText(
"Remove all selected entries from list.");
658 public void actionPerformed(ActionEvent e){
661 if (
tabPar11.getSelectedRowCount() > 0)
663 int selectedRowIds[] =
tabPar11.getSelectedRows();
664 Arrays.sort(selectedRowIds);
665 for (
int i=(selectedRowIds.length-1); i>-1; i--)
673 GroupLayout grpLyoPar11 =
new GroupLayout(
linePar11);
675 grpLyoPar11.setAutoCreateGaps(
true);
676 grpLyoPar11.setAutoCreateContainerGaps(
true);
677 grpLyoPar11.setHorizontalGroup(grpLyoPar11.createSequentialGroup()
679 .addGroup(grpLyoPar11.createParallelGroup()
680 .addGroup(grpLyoPar11.createSequentialGroup()
685 grpLyoPar11.setVerticalGroup(grpLyoPar11.createParallelGroup(GroupLayout.Alignment.LEADING)
687 .addGroup(grpLyoPar11.createSequentialGroup()
688 .addGroup(grpLyoPar11.createParallelGroup()
695 String toolTipPar12 =
"<html>Activates search and handling of rings of fragments.</html>";
696 linePar12 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
697 rdbPar12 =
new JRadioButton(
"Enable cyclic graphs (create rings of fragments)");
698 rdbPar12.setToolTipText(toolTipPar12);
701 rdbPar12.addActionListener(
new ActionListener(){
702 public void actionPerformed(ActionEvent e){
706 scrollablePane.validate();
707 scrollablePane.repaint();
708 scrollablePane.getVerticalScrollBar().setValue(
709 scrollablePane.getVerticalScrollBar().getValue() + (
int)
preferredHeight*2/3);
721 String toolTipPar5 =
"Pathname of the file containing the compatibility matrix for ring closures";
722 linePar5 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
723 lblPar5 =
new JLabel(
"Compatibility matrix for ring closures:", SwingConstants.LEFT);
725 lblPar5.setToolTipText(toolTipPar5);
727 txtPar5.setToolTipText(toolTipPar5);
731 btnPar5 =
new JButton(
"Browse");
732 btnPar5.addActionListener(
new ActionListener() {
733 public void actionPerformed(ActionEvent e) {
742 String toolTipPar15 =
"Specifies the minimum number of rings to be closed in order to accept a candidate graph.";
743 linePar15 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
744 lblPar15 =
new JLabel(
"Min. number of ring closures:", SwingConstants.LEFT);
746 lblPar15.setToolTipText(toolTipPar15);
748 txtPar15.setToolTipText(toolTipPar15);
756 String toolTipPar16 =
"Maximum number of ring closures per graph.";
757 linePar16 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
758 lblPar16 =
new JLabel(
"Max. number of ring closures:", SwingConstants.LEFT);
760 lblPar16.setToolTipText(toolTipPar16);
762 txtPar16.setToolTipText(toolTipPar16);
770 String toolTipPar17 =
"Minimum number of ring closing attractors (RCA) of the same type per graph.";
771 linePar17 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
772 lblPar17 =
new JLabel(
"<html>Min. num. RCA<sub>type</sub> per graph:</html>", SwingConstants.LEFT);
774 lblPar17.setToolTipText(toolTipPar17);
776 txtPar17.setToolTipText(toolTipPar17);
784 String toolTipPar18 =
"Maximum number of ring closing attractors (RCA) of the same type that are accepted for a single graph.";
785 linePar18 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
786 lblPar18 =
new JLabel(
"<html>Max. num. RCA<sub>type</sub> per graph:</html>", SwingConstants.LEFT);
788 lblPar18.setToolTipText(toolTipPar18);
790 txtPar18.setToolTipText(toolTipPar18);
798 String toolTipPar22 =
"<html>Specifies the bias associated to a given ring size.<br> The bias is an integer used as a weight when chosing among<br>combination of rings (i.e., RCAs) for a given graph.</html>";
799 linePar22 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
800 lblPar22 =
new JLabel(
"Ring size preference biases:", SwingConstants.LEFT);
802 lblPar22.setToolTipText(toolTipPar22);
805 tabModPar22.addRow(
new Object[]{
"<html><b>Ring Size</b></html>",
806 "<html><b>Bias (int)</b></html>"});
809 for (
int ib=0; ib<ringSizeBias.size(); ib++)
811 int w = ringSizeBias.get(ib);
820 tabPar22.putClientProperty(
"terminateEditOnFocusLost", Boolean.TRUE);
821 tabPar22.setToolTipText(
"Ring size (1st column) and bias (2nd column) must be positive integers.");
823 btnPar22Insert.setToolTipText(
"Click to set a new ring size bias.");
825 public void actionPerformed(ActionEvent e){
826 boolean done =
false;
829 String rsBias = (String)JOptionPane.showInputDialog(
831 "Specify ring size:",
833 JOptionPane.PLAIN_MESSAGE);
835 if ((rsBias !=
null) && (rsBias.length() > 0))
837 boolean goodChoice =
true;
840 for (
int i=0; i<
tabPar22.getRowCount(); i++)
842 if (rsBias.equals(
tabPar22.getValueAt(i, 0)))
844 JOptionPane.showMessageDialog(
846 "<html>Rins size already in the table.<br>Choose another size or modify the value of the bias in the table.</html>",
"Duplicate Entry", JOptionPane.ERROR_MESSAGE);
856 tabModPar22.addRow(
new Object[]{
"<html><b>Ring Size</b></html>",
"<html><b>Bias (int)</b></html>"});
870 btnPar22Cleanup.setToolTipText(
"Remove all selected entries from list.");
872 public void actionPerformed(ActionEvent e){
875 if (
tabPar22.getSelectedRowCount() > 0)
877 int selectedRowIds[] =
tabPar22.getSelectedRows();
878 Arrays.sort(selectedRowIds);
879 for (
int i=(selectedRowIds.length-1); i>-1; i--)
881 if (selectedRowIds[i] != 0)
895 GroupLayout grpLyoPar22 =
new GroupLayout(
linePar22);
897 grpLyoPar22.setAutoCreateGaps(
true);
898 grpLyoPar22.setAutoCreateContainerGaps(
true);
899 grpLyoPar22.setHorizontalGroup(grpLyoPar22.createSequentialGroup()
901 .addGroup(grpLyoPar22.createParallelGroup()
902 .addGroup(grpLyoPar22.createSequentialGroup()
907 grpLyoPar22.setVerticalGroup(grpLyoPar22.createParallelGroup(GroupLayout.Alignment.LEADING)
909 .addGroup(grpLyoPar22.createSequentialGroup()
910 .addGroup(grpLyoPar22.createParallelGroup()
918 String toolTipPar23 =
"Specifies the maximum number of ring members for rings created from scratch";
919 linePar23 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
920 lblPar23 =
new JLabel(
"Max. size of new rings:", SwingConstants.LEFT);
922 lblPar23.setToolTipText(toolTipPar23);
924 txtPar23.setToolTipText(toolTipPar23);
932 String toolTipPar19 =
"Defined the closability condition's evaluation mode.";
933 linePar19 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
934 lblPar19 =
new JLabel(
"Type of ring-closability conditions", SwingConstants.LEFT);
936 lblPar19.setToolTipText(toolTipPar19);
937 cmbPar19 =
new JComboBox<String>(
new String[] {
"Ring_size",
"Constitution",
"3D-Conformation",
"Constitution_and_3D-Conformation"});
938 cmbPar19.setToolTipText(toolTipPar19);
941 cmbPar19.addActionListener(
new ActionListener(){
942 public void actionPerformed(ActionEvent e){
943 switch (
cmbPar19.getSelectedItem().toString())
950 case "3D-Conformation":
955 case "Constitution_and_3D-Conformation":
968 String toolTipPar21 =
"Specifies the constitutional ring closability conditions by SMARTS string.";
969 linePar21 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
970 lblPar21 =
new JLabel(
"Constitutional ring-closability rules:", SwingConstants.LEFT);
972 lblPar21.setToolTipText(toolTipPar21);
978 tabPar21.putClientProperty(
"terminateEditOnFocusLost", Boolean.TRUE);
980 btnPar21Insert.setToolTipText(
"Click to set a new ring size bias.");
982 public void actionPerformed(ActionEvent e){
983 boolean done =
false;
986 String rcRule = (String)JOptionPane.showInputDialog(
988 "Specify ring-closability rules:",
989 "Add Constitutional Closability Rule",
990 JOptionPane.PLAIN_MESSAGE);
992 if ((rcRule !=
null) && (rcRule.length() > 0))
994 boolean goodChoice =
true;
997 for (
int i=0; i<
tabPar21.getRowCount(); i++)
999 if (rcRule.equals(
tabPar21.getValueAt(i, 0)))
1001 JOptionPane.showMessageDialog(
1003 "<html>Rule already in the table.</html>",
1005 JOptionPane.ERROR_MESSAGE);
1025 btnPar21Cleanup.setToolTipText(
"Remove all selected entries from list.");
1027 public void actionPerformed(ActionEvent e){
1030 if (
tabPar21.getSelectedRowCount() > 0)
1032 int selectedRowIds[] =
tabPar21.getSelectedRows();
1033 Arrays.sort(selectedRowIds);
1034 for (
int i=(selectedRowIds.length-1); i>-1; i--)
1042 GroupLayout grpLyoPar21 =
new GroupLayout(
linePar21);
1044 grpLyoPar21.setAutoCreateGaps(
true);
1045 grpLyoPar21.setAutoCreateContainerGaps(
true);
1046 grpLyoPar21.setHorizontalGroup(grpLyoPar21.createSequentialGroup()
1048 .addGroup(grpLyoPar21.createParallelGroup()
1049 .addGroup(grpLyoPar21.createSequentialGroup()
1054 grpLyoPar21.setVerticalGroup(grpLyoPar21.createParallelGroup(
1055 GroupLayout.Alignment.LEADING)
1057 .addGroup(grpLyoPar21.createSequentialGroup()
1058 .addGroup(grpLyoPar21.createParallelGroup()
1065 String toolTipPar25 =
"<html>Specifies the maximum number of rotatable bonds for which 3D chain closability is evaluated. <br>Chains with a number of rotatable bonds higher than this value are assumed closable.</html>";
1066 linePar25 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1067 lblPar25 =
new JLabel(
"Max. rotatable bonds:", SwingConstants.LEFT);
1069 lblPar25.setToolTipText(toolTipPar25);
1071 txtPar25.setToolTipText(toolTipPar25);
1079 String toolTipPar26 =
"<html>Specifies the torsion angle step (degrees) to be used for the evaluation of 3D chain closability by scanning the torsional space.</html>";
1080 linePar26 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1081 lblPar26 =
new JLabel(
"Dihedral angle step:", SwingConstants.LEFT);
1083 lblPar26.setToolTipText(toolTipPar26);
1085 txtPar26.setToolTipText(toolTipPar26);
1093 String toolTipPar27 =
"Specifies the bond angle above which three atoms are considered to be in a linear arragement.";
1094 linePar27 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1095 lblPar27 =
new JLabel(
"Bond angle - linearity threshold:", SwingConstants.LEFT);
1097 lblPar27.setToolTipText(toolTipPar27);
1099 txtPar27.setToolTipText(toolTipPar27);
1107 String toolTipPar24 =
"<html>Requires evaluation of interdependent closability condition.<br><b>WARNING:</b> this function require exhaustive conformational search, which is very time consuming.</html>";
1108 linePar24 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1109 rdbPar24 =
new JRadioButton(
"Check interdependent chain closability.");
1110 rdbPar24.setToolTipText(toolTipPar24);
1116 String toolTipPar28 =
"<html>Requires the search for closable conformations to explore the complete rotational space.<br><b>WARNING:</b> this is very time consuming, but is currently needed to evaluate closability of interdependent chains.</html>";
1117 linePar28 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1118 rdbPar28 =
new JRadioButton(
"Extensive chain conformational search:");
1119 rdbPar28.setToolTipText(toolTipPar28);
1125 String toolTipPar30 =
"Pathname of the text file containing the previously encountered candidate closable chains. This file constitutes the index of the archive of ring closing conformations.";
1126 linePar30 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1127 lblPar30 =
new JLabel(
"Index of closable chain archive:", SwingConstants.LEFT);
1129 lblPar30.setToolTipText(toolTipPar30);
1131 txtPar30.setToolTipText(toolTipPar30);
1136 btnPar30.addActionListener(
new ActionListener() {
1137 public void actionPerformed(ActionEvent e) {
1146 String toolTipPar31 =
"Pathname of the folder containing the archive of ring closing conformations.";
1147 linePar31 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1148 lblPar31 =
new JLabel(
"Root folder of chains archive:", SwingConstants.LEFT);
1150 lblPar31.setToolTipText(toolTipPar31);
1152 txtPar31.setToolTipText(toolTipPar31);
1157 btnPar31.addActionListener(
new ActionListener() {
1158 public void actionPerformed(ActionEvent e) {
1167 String toolTipPar32 =
"Specifies the maximum value of the dot product of the two AP-vectors.";
1168 linePar32 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1169 lblPar32 =
new JLabel(
"Closability – Dot product threshold:", SwingConstants.LEFT);
1171 lblPar32.setToolTipText(toolTipPar32);
1173 txtPar32.setToolTipText(toolTipPar32);
1181 String toolTipPar33 =
"Specifies the absolute normal deviation of the ideal value (a value between 0.0 and 1.0) that is considered acceptable for distances when evaluating the 3D ring closability of a conformation";
1182 linePar33 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1183 lblPar33 =
new JLabel(
"Closability – Distance deviation:", SwingConstants.LEFT);
1185 lblPar33.setToolTipText(toolTipPar33);
1187 txtPar33.setToolTipText(toolTipPar33);
1195 String toolTipPar34 =
"Specifies the factor multiplying the tolerance for interatomic distances when evaluating the closability of a chain by a discrete (vs. continuous) exploration of torsional space.";
1196 linePar34 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1197 lblPar34 =
new JLabel(
"Closability – Additional tolerance:", SwingConstants.LEFT);
1199 lblPar34.setToolTipText(toolTipPar34);
1201 txtPar34.setToolTipText(toolTipPar34);
1211 block.add(super.getPanelForUnformattedInput());
1213 this.add(scrollablePane);
1239 switch (
cmbPar19.getSelectedItem().toString())
1241 case "Constitution":
1246 case "3D-Conformation":
1251 case "Constitution_and_3D-Conformation":
1261 @SuppressWarnings(
"unchecked")
1266 String valueFieldClass;
1270 valueFieldClass = valueField.getClass().toString();
1278 switch (valueFieldClass)
1280 case "class javax.swing.JTextField":
1281 ((JTextField) valueField).setText(value);
1284 case "class javax.swing.JRadioButton":
1285 ((JRadioButton) valueField).setSelected(
true);
1288 case "class javax.swing.JComboBox":
1289 ((JComboBox<String>) valueField).setSelectedItem(value);
1292 case "class javax.swing.table.DefaultTableModel":
1298 (((DefaultTableModel) valueField).getRowCount() == 0))
1300 ((DefaultTableModel) valueField).addRow(
new Object[]{
1301 "<html><b>Ring Size</b></html>",
1302 "<html><b>Bias</b></html>"});
1305 ((DefaultTableModel) valueField).addRow(value.split(
" "));
1309 throw new Exception(
"<html>Unexpected type for parameter: "
1310 + key +
" (" + valueFieldClass
1311 +
").<br>Please report this to"
1312 +
"the DEMOPTIM team.</html>");
1326 throw new Exception(
"<html>No source specified for the "
1327 +
"parameters defining the space of building blocks."
1328 +
"<br>Please, specify the file name.</html>");
1341 sb.append(
"# Building Blocks Space - parameters").append(
NL);
1363 switch (
cmbPar19.getSelectedItem().toString())
1365 case "Constitution":
1370 case "3D-Conformation":
1383 case "Constitution_and_3D-Conformation":
Class defining a space of building blocks.
void importCompatibilityMatrixFromFile(String inFile)
Load info from a compatibility matrix file.
Set< APClass > getAllAPClassesFromCPMap()
Return the set of APClasses that used in the compatibility matrix for the growing graph APs.
Parameters and setting related to handling ring closures.
List< Integer > getRingSizeBias()
File opener for DENOPTIM GUI.
static File pickFolderForTxtField(JTextField txtField, Component parent)
static File pickFileForTxtField(JTextField txtField, Component parent)