{
selectedPdbFileName = chooser.getSelectedFile().getPath();
Cache.setProperty("LAST_DIRECTORY", selectedPdbFileName);
+ boolean guessTFType = localPdbPaeMatrixFileName == null;
localPdbPaeMatrixFileName = guessPAEFilename();
+ guessTFType |= localPdbPaeMatrixFileName != null;
+ if (guessTFType
+ && new File(selectedPdbFileName).getName().startsWith("AF-")
+ && !tempFacAsChanged)
+ {
+ // localPdbPaeMatrixFileName was null and now isn't and filename could
+ // well be AlphaFold and user hasn't adjusted the tempFacType
+ combo_tempFacAs.setSelectedItem(TFType.PLDDT);
+ }
validateSelections();
}
}
protected JComboBox<StructureImportSettings.TFType> combo_tempFacAs = new JComboBox<>();
+ protected boolean tempFacAsChanged = false;
+
protected JButton btn_paeMatrixFile = new JButton();
protected JLabel lbl_paeFile = new JLabel();
{
combo_tempFacAs.addItem(t);
}
+ combo_tempFacAs.addItemListener(new ItemListener()
+ {
+ @Override
+ public void itemStateChanged(ItemEvent e)
+ {
+ // used to determine if we should guess pLDDT or leave a user-choice
+ tempFacAsChanged = true;
+ }
+ });
btn_paeMatrixFile.setFont(VERDANA_12);
btn_paeMatrixFile.setText(new StringBuilder()