-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added yaehmop with band structure calc #339
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
295204c
WIP: Added yaehmop with band structure calc
psavery b88152f
VTK Plot: added ability for custom ticks
psavery ad5a7ba
Add special k point tick markers
psavery 387f3b8
Merge https://github.com/openchemistry/avogadrolibs into yaehmop-added
psavery 5dfdad4
Removed checkbox to display data
psavery bd22b8e
Core Molecule: Cache the most recent space group
psavery 01c959d
Yaehmop band structure: Generate special k points
psavery 47fd192
Yaehmop: Show yaehmop input if user requests it
psavery d1ec0c8
Merge branch 'make-vtkplot-more-object-oriented' of https://github.co…
psavery 6b0a38d
VtkPlot: re-add custom tick markers for x axis
psavery ceef9d2
Yaehmop: update band plot with new VtkPlot API
psavery 8c670cb
VtkPlot: added ability to set axis limits
psavery 901b28d
Yaehmop: limiting the y range now works
psavery 7850f9c
Yaehmop band: stop x axis at its exact limits
psavery 4017c3a
Yaehmop: turn off execution debug
psavery 15e164d
VtkPlot: make custom tick labels func more generic
psavery 9fea179
VtkPlot: Added ability to change line style
psavery bf74e92
Yaehmop band: added ability to plot/zero the fermi
psavery d82f32e
Merge branch 'master' into yaehmop-added
ghutchis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
set(yaehmop_srcs | ||
banddialog.cpp | ||
specialkpoints.cpp | ||
yaehmop.cpp | ||
yaehmopout.cpp | ||
) | ||
|
||
set(yaehmop_uis | ||
banddialog.ui | ||
) | ||
|
||
avogadro_plugin(Yaehmop | ||
"Use yaehmop to perform extended Hückel calculations." | ||
ExtensionPlugin | ||
yaehmop.h | ||
Yaehmop | ||
"${yaehmop_srcs}" | ||
"${yaehmop_uis}" | ||
) | ||
|
||
target_link_libraries(Yaehmop LINK_PRIVATE AvogadroVtk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/****************************************************************************** | ||
|
||
This source file is part of the Avogadro project. | ||
|
||
Copyright 2018 Kitware, Inc. | ||
|
||
This source code is released under the New BSD License, (the "License"). | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
******************************************************************************/ | ||
|
||
#include "banddialog.h" | ||
#include "ui_banddialog.h" | ||
|
||
#include <QSettings> | ||
|
||
namespace Avogadro { | ||
namespace QtPlugins { | ||
|
||
BandDialog::BandDialog(QWidget* aParent, YaehmopSettings& yaehmopSettings) | ||
: QDialog(aParent), m_ui(new Ui::BandDialog), | ||
m_yaehmopSettings(yaehmopSettings) | ||
{ | ||
m_ui->setupUi(this); | ||
} | ||
|
||
BandDialog::~BandDialog() = default; | ||
|
||
int BandDialog::exec() | ||
{ | ||
// Load the settings then exec | ||
m_ui->spin_numKPoints->setValue(m_yaehmopSettings.numBandKPoints); | ||
m_ui->edit_specialKPoints->setText(m_yaehmopSettings.specialKPoints); | ||
m_ui->cb_displayYaehmopInput->setChecked( | ||
m_yaehmopSettings.displayYaehmopInput); | ||
m_ui->cb_limitY->setChecked(m_yaehmopSettings.limitY); | ||
m_ui->spin_minY->setValue(m_yaehmopSettings.minY); | ||
m_ui->spin_maxY->setValue(m_yaehmopSettings.maxY); | ||
m_ui->cb_plotFermi->setChecked(m_yaehmopSettings.plotFermi); | ||
m_ui->spin_fermi->setValue(m_yaehmopSettings.fermi); | ||
m_ui->cb_zeroFermi->setChecked(m_yaehmopSettings.zeroFermi); | ||
m_ui->spin_numDim->setValue(m_yaehmopSettings.numDim); | ||
|
||
return QDialog::exec(); | ||
} | ||
|
||
void BandDialog::accept() | ||
{ | ||
// Save the settings and accept | ||
m_yaehmopSettings.numBandKPoints = m_ui->spin_numKPoints->value(); | ||
m_yaehmopSettings.specialKPoints = m_ui->edit_specialKPoints->toPlainText(); | ||
m_yaehmopSettings.displayYaehmopInput = | ||
m_ui->cb_displayYaehmopInput->isChecked(); | ||
m_yaehmopSettings.limitY = m_ui->cb_limitY->isChecked(); | ||
m_yaehmopSettings.minY = m_ui->spin_minY->value(); | ||
m_yaehmopSettings.maxY = m_ui->spin_maxY->value(); | ||
m_yaehmopSettings.plotFermi = m_ui->cb_plotFermi->isChecked(); | ||
m_yaehmopSettings.fermi = m_ui->spin_fermi->value(); | ||
m_yaehmopSettings.zeroFermi = m_ui->cb_zeroFermi->isChecked(); | ||
m_yaehmopSettings.numDim = m_ui->spin_numDim->value(); | ||
|
||
QDialog::accept(); | ||
} | ||
|
||
} // namespace QtPlugins | ||
} // namespace Avogadro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/****************************************************************************** | ||
|
||
This source file is part of the Avogadro project. | ||
|
||
Copyright 2018 Kitware, Inc. | ||
|
||
This source code is released under the New BSD License, (the "License"). | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
******************************************************************************/ | ||
|
||
#ifndef AVOGADRO_QTPLUGINS_YAEHMOPBANDDIALOG_H | ||
#define AVOGADRO_QTPLUGINS_YAEHMOPBANDDIALOG_H | ||
|
||
#include <memory> | ||
|
||
#include <QDialog> | ||
|
||
#include "yaehmopsettings.h" | ||
|
||
namespace Avogadro { | ||
namespace QtPlugins { | ||
|
||
namespace Ui { | ||
class BandDialog; | ||
} | ||
|
||
/** | ||
* @brief Dialog to perform a band structure calculation with yaehmop. | ||
*/ | ||
class BandDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit BandDialog(QWidget* parent, YaehmopSettings& yaehmopSettings); | ||
~BandDialog(); | ||
|
||
public slots: | ||
int exec() override; | ||
|
||
protected slots: | ||
void accept() override; | ||
|
||
private: | ||
std::unique_ptr<Ui::BandDialog> m_ui; | ||
YaehmopSettings& m_yaehmopSettings; | ||
}; | ||
|
||
} // namespace QtPlugins | ||
} // namespace Avogadro | ||
#endif // AVOGADRO_QTPLUGINS_YAEHMOPBANDDIALOG_H |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cryos
What do you think about initializing class members at their declaration like this?
Personally, I think it is a nice addition in C++11, since it allows for a default value for all constructors that can be overridden (if desired) by a constructor's member initializer list.