| 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_YAEHMOP_OUT_H |
| 7 |
#define AVOGADRO_QTPLUGINS_YAEHMOP_OUT_H |
| 8 |
|
| 9 |
#include <QString> |
| 10 |
#include <QVector> |
| 11 |
|
| 12 |
#include <avogadro/core/vector.h> |
| 13 |
|
| 14 |
namespace Avogadro::QtPlugins { |
| 15 |
|
| 16 |
typedef struct |
| 17 |
{ |
| 18 |
QString label; |
| 19 |
Vector3 coords; |
| 20 |
} specialKPoint; |
| 21 |
|
| 22 |
// Static class for Yaehmop output |
| 23 |
class YaehmopOut |
| 24 |
{ |
| 25 |
public: |
| 26 |
// Pass the yaehmop output in as 'data'. It would be faster if this only |
| 27 |
// included the section from BAND_DATA to END_BAND_DATA, but it is not |
| 28 |
// necessary. This sets bands, kpoints, and specialKPoints to be the |
| 29 |
// bands, the kpoints, and the special k points. Returns true if the |
| 30 |
// read was successful, and false if the read failed |
| 31 |
static bool readBandData(const QString& data, QVector<QVector<double>>& bands, |
| 32 |
QVector<Vector3>& kpoints, |
| 33 |
QVector<specialKPoint>& specialKPoints); |
| 34 |
}; |
| 35 |
|
| 36 |
} // namespace Avogadro::QtPlugins |
| 37 |
|
| 38 |
#endif // AVOGADRO_QTPLUGINS_YAEHMOPOUT_H |