synchronize LAMMPS-GUI with upstream

This commit is contained in:
Axel Kohlmeyer
2025-04-03 22:39:38 -04:00
parent 6025dbd46f
commit 2d56b01153
8 changed files with 9 additions and 146 deletions

View File

@ -190,8 +190,6 @@ set(PROJECT_SOURCES
fileviewer.h
preferences.cpp
preferences.h
runwham.cpp
runwham.h
setvariables.cpp
setvariables.h
slideshow.h
@ -281,7 +279,7 @@ if(APPLE)
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE_ICON_FILE lammps.icns
MACOSX_BUNDLE_COPYRIGHT "(c) 2003 - 2024, The LAMMPS Developers"
MACOSX_BUNDLE_COPYRIGHT "(c) 2003 - 2025, The LAMMPS Developers"
MACOSX_BUNDLE TRUE
)
# additional targets to populate the bundle tree and create the .dmg image file

View File

@ -55,12 +55,19 @@
</provides>
<releases>
<release version="1.6.13" timestamp="1743734509">
<description>
Change working directory to user's home dir if initial directory is "/" or the Application folder
Add preferences option to set https proxy, if not already set via environment variable
</description>
</release>
<release version="1.6.12" timestamp="1734890080">
<description>
Update Tutorial menu entries to cover all 8 tutorials
Highlight warnings and error messages in Output window
Make Tutorial wizards more compact
Include download and compilation of WHAM software from Alan Grossfield
Add entry to Run menu to restart the LAMMPS instance
Use mutex to avoid corruption of thermo data
</description>
</release>

View File

@ -22,7 +22,6 @@
#include "lammpsrunner.h"
#include "logwindow.h"
#include "preferences.h"
#include "runwham.h"
#include "setvariables.h"
#include "slideshow.h"
#include "stdcapture.h"
@ -216,7 +215,6 @@ LammpsGui::LammpsGui(QWidget *parent, const QString &filename) :
connect(ui->actionRun_File, &QAction::triggered, this, &LammpsGui::run_file);
connect(ui->actionStop_LAMMPS, &QAction::triggered, this, &LammpsGui::stop_run);
connect(ui->actionRestart_LAMMPS, &QAction::triggered, this, &LammpsGui::restart_lammps);
// connect(ui->actionRun_WHAM, &QAction::triggered, this, &LammpsGui::run_wham);
connect(ui->actionSet_Variables, &QAction::triggered, this, &LammpsGui::edit_variables);
connect(ui->actionImage, &QAction::triggered, this, &LammpsGui::render_image);
connect(ui->actionLAMMPS_Tutorial, &QAction::triggered, this, &LammpsGui::tutorial_web);
@ -1863,13 +1861,6 @@ void LammpsGui::edit_variables()
}
}
void LammpsGui::run_wham()
{
RunWHAM do_run(this);
do_run.setFont(font());
do_run.exec();
}
void LammpsGui::findandreplace()
{
FindAndReplace find(ui->textEdit, this);

View File

@ -112,7 +112,6 @@ private slots:
void run_buffer() { do_run(true); }
void run_file() { do_run(false); }
void restart_lammps() { lammps.close(); };
void run_wham();
void edit_variables();
void render_image();

View File

@ -75,8 +75,6 @@
<addaction name="actionRun_File"/>
<addaction name="actionStop_LAMMPS"/>
<addaction name="actionRestart_LAMMPS"/>
<!-- <addaction name="separator"/>
<addaction name="actionRun_WHAM"/> -->
<addaction name="separator"/>
<addaction name="actionSet_Variables"/>
<addaction name="separator"/>
@ -298,14 +296,6 @@
<string>Restart &amp;LAMMPS</string>
</property>
</action>
<!-- <action name="actionRun_WHAM">
<property name="icon">
<iconset theme=":/icons/system-run.png"/>
</property>
<property name="text">
<string>Run &amp;WHAM Utility</string>
</property>
</action> -->
<action name="actionImage">
<property name="icon">
<iconset theme=":/icons/emblem-photos.png"/>

View File

@ -121,7 +121,6 @@ void LogWindow::stop_run()
void LogWindow::next_warning()
{
auto *doc = document();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
auto regex = QRegExp(QStringLiteral("^(ERROR|WARNING).*$"));
#else

View File

@ -1,87 +0,0 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "runwham.h"
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QIcon>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QSizePolicy>
RunWHAM::RunWHAM(QWidget *parent) : QDialog(parent)
{
int irow = 0;
auto *layout = new QGridLayout;
auto *top = new QLabel("Run WHAM Utility:");
layout->addWidget(top, irow++, 0, 1, 2, Qt::AlignHCenter);
auto *label = new QLabel("Units: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
auto *field = new QLineEdit("real");
layout->addWidget(field, irow++, 1, 1, 1);
label = new QLabel("Mininum value: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
field = new QLineEdit("");
layout->addWidget(field, irow++, 1, 1, 1);
label = new QLabel("Maximum value: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
field = new QLineEdit("");
layout->addWidget(field, irow++, 1, 1, 1);
label = new QLabel("Number of bins: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
field = new QLineEdit("50");
layout->addWidget(field, irow++, 1, 1, 1);
label = new QLabel("Tolerance: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
field = new QLineEdit("1.0e-8");
layout->addWidget(field, irow++, 1, 1, 1);
label = new QLabel("Temperature: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
field = new QLineEdit("300.0");
layout->addWidget(field, irow++, 1, 1, 1);
label = new QLabel("Metadata file: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
field = new QLineEdit("");
layout->addWidget(field, irow++, 1, 1, 1);
label = new QLabel("Output file: ");
layout->addWidget(label, irow, 0, 1, 1, Qt::AlignLeft);
field = new QLineEdit("");
layout->addWidget(field, irow++, 1, 1, 1);
auto *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel);
auto *add = new QPushButton("&Run WHAM");
add->setObjectName("run_wham");
buttonBox->addButton(add, QDialogButtonBox::ActionRole);
connect(add, &QPushButton::released, this, &RunWHAM::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
layout->addWidget(buttonBox, irow++, 0, 1, 2, Qt::AlignHCenter);
setLayout(layout);
setWindowIcon(QIcon(":/icons/lammps-icon-128x128.png"));
setWindowTitle("LAMMPS-GUI - Run WHAM Utility");
resize(300, 200);
}
void RunWHAM::accept()
{
// assemble command line and run WHAM
fprintf(stderr, "Running WHAM\n");
QDialog::accept();
}
// Local Variables:
// c-basic-offset: 4
// End:

View File

@ -1,34 +0,0 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifndef RUN_WHAM_H
#define RUN_WHAM_H
#include <QDialog>
class RunWHAM : public QDialog {
Q_OBJECT
public:
explicit RunWHAM(QWidget *parent = nullptr);
~RunWHAM() = default;
private slots:
void accept() override;
};
#endif
// Local Variables:
// c-basic-offset: 4
// End: