automatically define variable "gui_run" to contain the run number

This commit is contained in:
Axel Kohlmeyer
2023-09-29 17:42:30 -04:00
parent ef575d5944
commit 5a750c8633
2 changed files with 9 additions and 0 deletions

View File

@ -417,6 +417,11 @@ void CodeEditor::setGroupList()
void CodeEditor::setVarNameList()
{
QStringList vars;
// variable "gui_run" is always defined by LAMMPS GUI
vars << QString("${gui_run}");
vars << QString("v_gui_run");
LammpsWrapper *lammps = &qobject_cast<LammpsGui *>(parent())->lammps;
int nvar = lammps->id_count("variable");
char buffer[200];