| 1 |
/****************************************************************************** |
| 2 |
This source file is part of the Avogadro project. |
| 3 |
This source code is released under the 3-Clause BSD License, (see "LICENSE"). |
| 4 |
******************************************************************************/ |
| 5 |
|
| 6 |
#ifndef AVOGADRO_QTPLUGINS_APBS_APBSDIALOG_H |
| 7 |
#define AVOGADRO_QTPLUGINS_APBS_APBSDIALOG_H |
| 8 |
|
| 9 |
#include <avogadro/core/cube.h> |
| 10 |
|
| 11 |
#include <QDialog> |
| 12 |
|
| 13 |
namespace Ui { |
| 14 |
class ApbsDialog; |
| 15 |
} |
| 16 |
|
| 17 |
namespace Avogadro { |
| 18 |
namespace QtGui { |
| 19 |
class Molecule; |
| 20 |
} |
| 21 |
namespace MoleQueue { |
| 22 |
class InputGenerator; |
| 23 |
} |
| 24 |
|
| 25 |
namespace QtPlugins { |
| 26 |
|
| 27 |
/** |
| 28 |
* @brief Dialog for running APBS. |
| 29 |
*/ |
| 30 |
class ApbsDialog : public QDialog |
| 31 |
{ |
| 32 |
Q_OBJECT |
| 33 |
|
| 34 |
public: |
| 35 |
/** |
| 36 |
* Constructor for ApbsDialog. |
| 37 |
*/ |
| 38 |
ApbsDialog(QWidget* parent_ = nullptr); |
| 39 |
|
| 40 |
/** |
| 41 |
* Destructor for ApbsDialog. |
| 42 |
*/ |
| 43 |
~ApbsDialog() override; |
| 44 |
|
| 45 |
void setMolecule(QtGui::Molecule* molecule); |
| 46 |
|
| 47 |
/** |
| 48 |
* Returns the file name for the input .pqr file. |
| 49 |
*/ |
| 50 |
QString pqrFileName() const; |
| 51 |
|
| 52 |
/** |
| 53 |
* Returns the file name for the output .dx file. |
| 54 |
*/ |
| 55 |
QString cubeFileName() const; |
| 56 |
|
| 57 |
private slots: |
| 58 |
void openPdbFile(); |
| 59 |
void openPqrFile(); |
| 60 |
void runApbs(); |
| 61 |
void runPdb2Pqr(); |
| 62 |
void saveInputFile(); |
| 63 |
void saveInputFile(const QString& fileName); |
| 64 |
|
| 65 |
private: |
| 66 |
void updatePreviewTextImmediately(); |
| 67 |
|
| 68 |
private: |
| 69 |
Ui::ApbsDialog* m_ui; |
| 70 |
QString m_generatedPqrFileName; |
| 71 |
QtGui::Molecule* m_molecule; |
| 72 |
MoleQueue::InputGenerator* m_inputGenerator; |
| 73 |
QString m_cubeFileName; |
| 74 |
bool m_loadStructureFile; |
| 75 |
bool m_loadCubeFile; |
| 76 |
}; |
| 77 |
} // namespace QtPlugins |
| 78 |
} // namespace Avogadro |
| 79 |
|
| 80 |
#endif // AVOGADRO_QTPLUGINS_APBS_APBSDIALOG_H |