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.Arrays;
28import java.util.HashMap;
32import javax.swing.BoxLayout;
33import javax.swing.GroupLayout;
34import javax.swing.JButton;
35import javax.swing.JComboBox;
36import javax.swing.JLabel;
37import javax.swing.JOptionPane;
38import javax.swing.JPanel;
39import javax.swing.JRadioButton;
40import javax.swing.JScrollPane;
41import javax.swing.JTable;
42import javax.swing.JTextField;
43import javax.swing.SwingConstants;
44import javax.swing.UIManager;
45import javax.swing.table.DefaultTableModel;
47import denoptim.fragspace.FragmentSpace;
48import denoptim.graph.rings.RingClosureParameters;
99 String
keyPar3 =
"FS-CappingFragmentLibFile";
245 String
keyPar34 =
"RC-ExtraDistanceToleranceFactor";
252 String
NL = System.getProperty(
"line.separator");
260 this.setLayout(
new BorderLayout());
262 JPanel
block =
new JPanel();
263 JScrollPane scrollablePane =
new JScrollPane(
block);
264 block.setLayout(
new BoxLayout(
block, SwingConstants.VERTICAL));
286 String toolTipSrcOrNew =
"Tick here to use parameters from a previously "
287 +
"defined space of building blocks.";
288 lineSrcOrNew =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
289 rdbSrcOrNew =
new JRadioButton(
"Use parameters from existing file");
291 rdbSrcOrNew.addActionListener(
new ActionListener(){
292 public void actionPerformed(ActionEvent e){
314 String toolTipFSSource =
"<html>Pathname of a DENOPTIM's parameter file with GA settings.</html>";
315 lineFSSource =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
316 lblFSSource =
new JLabel(
"Previous parameters file:", SwingConstants.LEFT);
322 btnFSSource.addActionListener(
new ActionListener() {
323 public void actionPerformed(ActionEvent e) {
328 txtFSSource.setToolTipText(
"<html>Specify a file with parameters to "
329 +
"be loaded in this form.</html>");
331 public void actionPerformed(ActionEvent e) {
338 if (e1.getMessage().equals(
"") || e1.getMessage() ==
null)
340 e1.printStackTrace();
342 "<html>Exception occurred while importing parameters.<br>Please, report this to the DENOPTIM team.</html>",
344 JOptionPane.ERROR_MESSAGE,
345 UIManager.getIcon(
"OptionPane.errorIcon"));
352 JOptionPane.ERROR_MESSAGE,
353 UIManager.getIcon(
"OptionPane.errorIcon"));
365 String toolTipPar1 =
"Pathname of the file containing the list of scaffolds.";
366 linePar1 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
367 lblPar1 =
new JLabel(
"Library of Scaffolds:", SwingConstants.LEFT);
369 lblPar1.setToolTipText(toolTipPar1);
371 txtPar1.setToolTipText(toolTipPar1);
375 btnPar1 =
new JButton(
"Browse");
376 btnPar1.addActionListener(
new ActionListener() {
377 public void actionPerformed(ActionEvent e) {
386 String toolTipPar2 =
"Pathname of the file containing the list of fragments.";
387 linePar2 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
388 lblPar2 =
new JLabel(
"Library of vertices:", SwingConstants.LEFT);
390 lblPar2.setToolTipText(toolTipPar2);
392 txtPar2.setToolTipText(toolTipPar2);
396 btnPar2 =
new JButton(
"Browse");
397 btnPar2.addActionListener(
new ActionListener() {
398 public void actionPerformed(ActionEvent e) {
407 String toolTipPar3 =
"Pathname of the file containing the list of capping groups.";
408 linePar3 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
409 lblPar3 =
new JLabel(
"Capping groups library:", SwingConstants.LEFT);
411 lblPar3.setToolTipText(toolTipPar3);
413 txtPar3.setToolTipText(toolTipPar3);
417 btnPar3 =
new JButton(
"Browse");
418 btnPar3.addActionListener(
new ActionListener() {
419 public void actionPerformed(ActionEvent e) {
428 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>";
429 lineCPMat =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
430 lblCPMat =
new JLabel(
"Compatibility matrix file:", SwingConstants.LEFT);
432 lblCPMat.setToolTipText(toolTipCPMat);
434 txtCPMat.setToolTipText(toolTipCPMat);
439 btnCPMat.addActionListener(
new ActionListener() {
440 public void actionPerformed(ActionEvent e) {
449 String toolTipPar6 =
"<html>Pathname of the file containing the definition of the rotatable bonds.<br>Must be a list of SMARTS.</html>";
450 linePar6 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
451 lblPar6 =
new JLabel(
"Rotatable bonds list:", SwingConstants.LEFT);
453 lblPar6.setToolTipText(toolTipPar6);
455 txtPar6.setToolTipText(toolTipPar6);
459 btnPar6 =
new JButton(
"Browse");
460 btnPar6.addActionListener(
new ActionListener() {
461 public void actionPerformed(ActionEvent e) {
470 String toolTipPar7 =
"Maximum number of heavy (non-hydrogen) atoms for a candidate.";
471 linePar7 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
472 lblPar7 =
new JLabel(
"Max non-H atoms:", SwingConstants.LEFT);
474 lblPar7.setToolTipText(toolTipPar7);
476 txtPar7.setToolTipText(toolTipPar7);
484 String toolTipPar8 =
"Maximum molecular weight accepted for a candidate";
485 linePar8 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
486 lblPar8 =
new JLabel(
"Max molecular weight: ", SwingConstants.LEFT);
488 lblPar8.setToolTipText(toolTipPar8);
490 txtPar8.setToolTipText(toolTipPar8);
498 String toolTipPar9 =
"Maximum number of rotatable bonds accepted for a candidate";
499 linePar9 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
500 lblPar9 =
new JLabel(
"Max rotatable bonds:", SwingConstants.LEFT);
502 lblPar9.setToolTipText(toolTipPar9);
504 txtPar9.setToolTipText(toolTipPar9);
512 String toolTipPar10 =
"<html>Forces constitutional symmetry whenever possible.<br>Corresponds to setting the symmetric substitution probability to 100%.</html>";
513 linePar10 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
514 rdbPar10 =
new JRadioButton(
"Enforce symmetry:");
515 rdbPar10.setToolTipText(toolTipPar10);
521 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>";
522 linePar11 =
new JPanel(
new GridLayout(2, 2));
523 lblPar11 =
new JLabel(
"Symmetry constraints:", SwingConstants.LEFT);
525 lblPar11.setToolTipText(toolTipPar11);
531 tabPar11.putClientProperty(
"terminateEditOnFocusLost", Boolean.TRUE);
533 btnPar11Insert.setToolTipText(
"Click to choose an AP-Class from the "
534 +
"compatibility matrix specified above.");
536 public void actionPerformed(ActionEvent e){
542 boolean apClassesFromCPMap =
false;
543 Object[] allAPClasses =
new Object[]{};
550 apClassesFromCPMap=
true;
555 "<html>The current parameters do not create a valid "
556 +
"space of building blocks.<br>"
557 +
"It looks like you want to manually insert APClasses.<br>"
558 +
"If this is not true, you must adjust the parameters defining the "
559 +
"space of building blocks.</html>",
560 "No valid FragmentSpace",
561 JOptionPane.WARNING_MESSAGE);
564 if (apClassesFromCPMap)
566 boolean done =
false;
569 String apClass = (String)JOptionPane.showInputDialog(
571 "Choose attachment point class:",
573 JOptionPane.PLAIN_MESSAGE,
578 if ((apClass !=
null) && (apClass.length() > 0))
580 boolean goodChoice =
true;
583 for (
int i=0; i<
tabPar11.getRowCount(); i++)
585 if (apClass.equals(
tabPar11.getValueAt(i, 0)))
587 JOptionPane.showMessageDialog(
589 "<html>apClass already in the "
590 +
"table.<br>Choose another "
593 JOptionPane.ERROR_MESSAGE);
613 boolean done =
false;
616 String apClass = (String)JOptionPane.showInputDialog(
618 "<html>No fragment library found.<br>Type an attachment point class:</html>",
620 JOptionPane.PLAIN_MESSAGE);
622 if ((apClass !=
null) && (apClass.length() > 0))
624 boolean goodChoice =
true;
627 for (
int i=0; i<
tabPar11.getRowCount(); i++)
629 if (apClass.equals(
tabPar11.getValueAt(i, 0)))
631 JOptionPane.showMessageDialog(
633 "<html>apClass already in the table.<br>Choose another class.",
635 JOptionPane.ERROR_MESSAGE);
655 btnPar11Cleanup.setToolTipText(
"Remove all selected entries from list.");
657 public void actionPerformed(ActionEvent e){
660 if (
tabPar11.getSelectedRowCount() > 0)
662 int selectedRowIds[] =
tabPar11.getSelectedRows();
663 Arrays.sort(selectedRowIds);
664 for (
int i=(selectedRowIds.length-1); i>-1; i--)
672 GroupLayout grpLyoPar11 =
new GroupLayout(
linePar11);
674 grpLyoPar11.setAutoCreateGaps(
true);
675 grpLyoPar11.setAutoCreateContainerGaps(
true);
676 grpLyoPar11.setHorizontalGroup(grpLyoPar11.createSequentialGroup()
678 .addGroup(grpLyoPar11.createParallelGroup()
679 .addGroup(grpLyoPar11.createSequentialGroup()
684 grpLyoPar11.setVerticalGroup(grpLyoPar11.createParallelGroup(GroupLayout.Alignment.LEADING)
686 .addGroup(grpLyoPar11.createSequentialGroup()
687 .addGroup(grpLyoPar11.createParallelGroup()
694 String toolTipPar12 =
"<html>Activates search and handling of rings of fragments.</html>";
695 linePar12 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
696 rdbPar12 =
new JRadioButton(
"Enable cyclic graphs (create rings of fragments)");
697 rdbPar12.setToolTipText(toolTipPar12);
700 rdbPar12.addActionListener(
new ActionListener(){
701 public void actionPerformed(ActionEvent e){
705 scrollablePane.validate();
706 scrollablePane.repaint();
707 scrollablePane.getVerticalScrollBar().setValue(
708 scrollablePane.getVerticalScrollBar().getValue() + (
int)
preferredHeight*2/3);
720 String toolTipPar5 =
"Pathname of the file containing the compatibility matrix for ring closures";
721 linePar5 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
722 lblPar5 =
new JLabel(
"Compatibility matrix for ring closures:", SwingConstants.LEFT);
724 lblPar5.setToolTipText(toolTipPar5);
726 txtPar5.setToolTipText(toolTipPar5);
730 btnPar5 =
new JButton(
"Browse");
731 btnPar5.addActionListener(
new ActionListener() {
732 public void actionPerformed(ActionEvent e) {
741 String toolTipPar15 =
"Specifies the minimum number of rings to be closed in order to accept a candidate graph.";
742 linePar15 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
743 lblPar15 =
new JLabel(
"Min. number of ring closures:", SwingConstants.LEFT);
745 lblPar15.setToolTipText(toolTipPar15);
747 txtPar15.setToolTipText(toolTipPar15);
755 String toolTipPar16 =
"Maximum number of ring closures per graph.";
756 linePar16 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
757 lblPar16 =
new JLabel(
"Max. number of ring closures:", SwingConstants.LEFT);
759 lblPar16.setToolTipText(toolTipPar16);
761 txtPar16.setToolTipText(toolTipPar16);
769 String toolTipPar17 =
"Minimum number of ring closing attractors (RCA) of the same type per graph.";
770 linePar17 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
771 lblPar17 =
new JLabel(
"<html>Min. num. RCA<sub>type</sub> per graph:</html>", SwingConstants.LEFT);
773 lblPar17.setToolTipText(toolTipPar17);
775 txtPar17.setToolTipText(toolTipPar17);
783 String toolTipPar18 =
"Maximum number of ring closing attractors (RCA) of the same type that are accepted for a single graph.";
784 linePar18 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
785 lblPar18 =
new JLabel(
"<html>Max. num. RCA<sub>type</sub> per graph:</html>", SwingConstants.LEFT);
787 lblPar18.setToolTipText(toolTipPar18);
789 txtPar18.setToolTipText(toolTipPar18);
797 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>";
798 linePar22 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
799 lblPar22 =
new JLabel(
"Ring size preference biases:", SwingConstants.LEFT);
801 lblPar22.setToolTipText(toolTipPar22);
804 tabModPar22.addRow(
new Object[]{
"<html><b>Ring Size</b></html>",
805 "<html><b>Bias (int)</b></html>"});
808 for (
int ib=0; ib<ringSizeBias.size(); ib++)
810 int w = ringSizeBias.get(ib);
819 tabPar22.putClientProperty(
"terminateEditOnFocusLost", Boolean.TRUE);
820 tabPar22.setToolTipText(
"Ring size (1st column) and bias (2nd column) must be positive integers.");
822 btnPar22Insert.setToolTipText(
"Click to set a new ring size bias.");
824 public void actionPerformed(ActionEvent e){
825 boolean done =
false;
828 String rsBias = (String)JOptionPane.showInputDialog(
830 "Specify ring size:",
832 JOptionPane.PLAIN_MESSAGE);
834 if ((rsBias !=
null) && (rsBias.length() > 0))
836 boolean goodChoice =
true;
839 for (
int i=0; i<
tabPar22.getRowCount(); i++)
841 if (rsBias.equals(
tabPar22.getValueAt(i, 0)))
843 JOptionPane.showMessageDialog(
845 "<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);
855 tabModPar22.addRow(
new Object[]{
"<html><b>Ring Size</b></html>",
"<html><b>Bias (int)</b></html>"});
869 btnPar22Cleanup.setToolTipText(
"Remove all selected entries from list.");
871 public void actionPerformed(ActionEvent e){
874 if (
tabPar22.getSelectedRowCount() > 0)
876 int selectedRowIds[] =
tabPar22.getSelectedRows();
877 Arrays.sort(selectedRowIds);
878 for (
int i=(selectedRowIds.length-1); i>-1; i--)
880 if (selectedRowIds[i] != 0)
894 GroupLayout grpLyoPar22 =
new GroupLayout(
linePar22);
896 grpLyoPar22.setAutoCreateGaps(
true);
897 grpLyoPar22.setAutoCreateContainerGaps(
true);
898 grpLyoPar22.setHorizontalGroup(grpLyoPar22.createSequentialGroup()
900 .addGroup(grpLyoPar22.createParallelGroup()
901 .addGroup(grpLyoPar22.createSequentialGroup()
906 grpLyoPar22.setVerticalGroup(grpLyoPar22.createParallelGroup(GroupLayout.Alignment.LEADING)
908 .addGroup(grpLyoPar22.createSequentialGroup()
909 .addGroup(grpLyoPar22.createParallelGroup()
917 String toolTipPar23 =
"Specifies the maximum number of ring members for rings created from scratch";
918 linePar23 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
919 lblPar23 =
new JLabel(
"Max. size of new rings:", SwingConstants.LEFT);
921 lblPar23.setToolTipText(toolTipPar23);
923 txtPar23.setToolTipText(toolTipPar23);
931 String toolTipPar19 =
"Defined the closability condition's evaluation mode.";
932 linePar19 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
933 lblPar19 =
new JLabel(
"Type of ring-closability conditions", SwingConstants.LEFT);
935 lblPar19.setToolTipText(toolTipPar19);
936 cmbPar19 =
new JComboBox<String>(
new String[] {
"Ring_size",
"Constitution",
"3D-Conformation",
"Constitution_and_3D-Conformation"});
937 cmbPar19.setToolTipText(toolTipPar19);
940 cmbPar19.addActionListener(
new ActionListener(){
941 public void actionPerformed(ActionEvent e){
942 switch (
cmbPar19.getSelectedItem().toString())
949 case "3D-Conformation":
954 case "Constitution_and_3D-Conformation":
967 String toolTipPar21 =
"Specifies the constitutional ring closability conditions by SMARTS string.";
968 linePar21 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
969 lblPar21 =
new JLabel(
"Constitutional ring-closability rules:", SwingConstants.LEFT);
971 lblPar21.setToolTipText(toolTipPar21);
977 tabPar21.putClientProperty(
"terminateEditOnFocusLost", Boolean.TRUE);
979 btnPar21Insert.setToolTipText(
"Click to set a new ring size bias.");
981 public void actionPerformed(ActionEvent e){
982 boolean done =
false;
985 String rcRule = (String)JOptionPane.showInputDialog(
987 "Specify ring-closability rules:",
988 "Add Constitutional Closability Rule",
989 JOptionPane.PLAIN_MESSAGE);
991 if ((rcRule !=
null) && (rcRule.length() > 0))
993 boolean goodChoice =
true;
996 for (
int i=0; i<
tabPar21.getRowCount(); i++)
998 if (rcRule.equals(
tabPar21.getValueAt(i, 0)))
1000 JOptionPane.showMessageDialog(
1002 "<html>Rule already in the table.</html>",
1004 JOptionPane.ERROR_MESSAGE);
1024 btnPar21Cleanup.setToolTipText(
"Remove all selected entries from list.");
1026 public void actionPerformed(ActionEvent e){
1029 if (
tabPar21.getSelectedRowCount() > 0)
1031 int selectedRowIds[] =
tabPar21.getSelectedRows();
1032 Arrays.sort(selectedRowIds);
1033 for (
int i=(selectedRowIds.length-1); i>-1; i--)
1041 GroupLayout grpLyoPar21 =
new GroupLayout(
linePar21);
1043 grpLyoPar21.setAutoCreateGaps(
true);
1044 grpLyoPar21.setAutoCreateContainerGaps(
true);
1045 grpLyoPar21.setHorizontalGroup(grpLyoPar21.createSequentialGroup()
1047 .addGroup(grpLyoPar21.createParallelGroup()
1048 .addGroup(grpLyoPar21.createSequentialGroup()
1053 grpLyoPar21.setVerticalGroup(grpLyoPar21.createParallelGroup(
1054 GroupLayout.Alignment.LEADING)
1056 .addGroup(grpLyoPar21.createSequentialGroup()
1057 .addGroup(grpLyoPar21.createParallelGroup()
1064 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>";
1065 linePar25 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1066 lblPar25 =
new JLabel(
"Max. rotatable bonds:", SwingConstants.LEFT);
1068 lblPar25.setToolTipText(toolTipPar25);
1070 txtPar25.setToolTipText(toolTipPar25);
1078 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>";
1079 linePar26 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1080 lblPar26 =
new JLabel(
"Dihedral angle step:", SwingConstants.LEFT);
1082 lblPar26.setToolTipText(toolTipPar26);
1084 txtPar26.setToolTipText(toolTipPar26);
1092 String toolTipPar27 =
"Specifies the bond angle above which three atoms are considered to be in a linear arragement.";
1093 linePar27 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1094 lblPar27 =
new JLabel(
"Bond angle - linearity threshold:", SwingConstants.LEFT);
1096 lblPar27.setToolTipText(toolTipPar27);
1098 txtPar27.setToolTipText(toolTipPar27);
1106 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>";
1107 linePar24 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1108 rdbPar24 =
new JRadioButton(
"Check interdependent chain closability.");
1109 rdbPar24.setToolTipText(toolTipPar24);
1115 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>";
1116 linePar28 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1117 rdbPar28 =
new JRadioButton(
"Extensive chain conformational search:");
1118 rdbPar28.setToolTipText(toolTipPar28);
1124 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.";
1125 linePar30 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1126 lblPar30 =
new JLabel(
"Index of closable chain archive:", SwingConstants.LEFT);
1128 lblPar30.setToolTipText(toolTipPar30);
1130 txtPar30.setToolTipText(toolTipPar30);
1135 btnPar30.addActionListener(
new ActionListener() {
1136 public void actionPerformed(ActionEvent e) {
1145 String toolTipPar31 =
"Pathname of the folder containing the archive of ring closing conformations.";
1146 linePar31 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1147 lblPar31 =
new JLabel(
"Root folder of chains archive:", SwingConstants.LEFT);
1149 lblPar31.setToolTipText(toolTipPar31);
1151 txtPar31.setToolTipText(toolTipPar31);
1156 btnPar31.addActionListener(
new ActionListener() {
1157 public void actionPerformed(ActionEvent e) {
1166 String toolTipPar32 =
"Specifies the maximum value of the dot product of the two AP-vectors.";
1167 linePar32 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1168 lblPar32 =
new JLabel(
"Closability – Dot product threshold:", SwingConstants.LEFT);
1170 lblPar32.setToolTipText(toolTipPar32);
1172 txtPar32.setToolTipText(toolTipPar32);
1180 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";
1181 linePar33 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1182 lblPar33 =
new JLabel(
"Closability – Distance deviation:", SwingConstants.LEFT);
1184 lblPar33.setToolTipText(toolTipPar33);
1186 txtPar33.setToolTipText(toolTipPar33);
1194 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.";
1195 linePar34 =
new JPanel(
new FlowLayout(FlowLayout.LEFT));
1196 lblPar34 =
new JLabel(
"Closability – Additional tolerance:", SwingConstants.LEFT);
1198 lblPar34.setToolTipText(toolTipPar34);
1200 txtPar34.setToolTipText(toolTipPar34);
1210 block.add(super.getPanelForUnformattedInput());
1212 this.add(scrollablePane);
1238 switch (
cmbPar19.getSelectedItem().toString())
1240 case "Constitution":
1245 case "3D-Conformation":
1250 case "Constitution_and_3D-Conformation":
1260 @SuppressWarnings(
"unchecked")
1265 String valueFieldClass;
1269 valueFieldClass = valueField.getClass().toString();
1277 switch (valueFieldClass)
1279 case "class javax.swing.JTextField":
1280 ((JTextField) valueField).setText(value);
1283 case "class javax.swing.JRadioButton":
1284 ((JRadioButton) valueField).setSelected(
true);
1287 case "class javax.swing.JComboBox":
1288 ((JComboBox<String>) valueField).setSelectedItem(value);
1291 case "class javax.swing.table.DefaultTableModel":
1297 (((DefaultTableModel) valueField).getRowCount() == 0))
1299 ((DefaultTableModel) valueField).addRow(
new Object[]{
1300 "<html><b>Ring Size</b></html>",
1301 "<html><b>Bias</b></html>"});
1304 ((DefaultTableModel) valueField).addRow(value.split(
" "));
1308 throw new Exception(
"<html>Unexpected type for parameter: "
1309 + key +
" (" + valueFieldClass
1310 +
").<br>Please report this to"
1311 +
"the DEMOPTIM team.</html>");
1325 throw new Exception(
"<html>No source specified for the "
1326 +
"parameters defining the space of building blocks."
1327 +
"<br>Please, specify the file name.</html>");
1340 sb.append(
"# Building Blocks Space - parameters").append(
NL);
1362 switch (
cmbPar19.getSelectedItem().toString())
1364 case "Constitution":
1369 case "3D-Conformation":
1382 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)