Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
52a8568
Initial BROKEN Species Node
rprospero Nov 12, 2025
c61e51e
Successfully parse a species
rprospero Nov 12, 2025
3e7687a
Move to passing Species directly to the Node
rprospero Nov 12, 2025
384f64f
Add species to GUI menu
rprospero Nov 12, 2025
14d5bde
Eliminate keyword widgets
rprospero Nov 14, 2025
38ddd98
Start showing species data in gui
rprospero Nov 14, 2025
972b5b9
Start creating species dialog
rprospero Nov 14, 2025
3bb3e41
Start displaying all species information
rprospero Nov 14, 2025
6426b76
Display atom type information
rprospero Nov 14, 2025
d1f2087
Add Element Combo Box
rprospero Nov 14, 2025
ed91049
Fix bug where nodes don't export options
rprospero Nov 14, 2025
329dc89
Start moving to immutable species
rprospero Nov 17, 2025
1ee2ec0
Test on SpeciesModel instead of SpeciesNode
rprospero Nov 17, 2025
6614631
Switch to shared_ptr
rprospero Nov 17, 2025
7eab1d6
Ensure that species is serialised
rprospero Nov 18, 2025
43a8bbf
Statr validating atom input
rprospero Nov 18, 2025
265990e
Start adding bond info to species dialog
rprospero Nov 18, 2025
e402383
Add Species Node icon
rprospero Nov 18, 2025
53d5e7e
Better finish on Bond model
rprospero Nov 18, 2025
a63fb40
Move add button to end of tab order
rprospero Nov 19, 2025
c3fa023
Better implicit widths
rprospero Nov 19, 2025
d57abf1
Add angle to model
rprospero Nov 19, 2025
48b3ae1
Add torsions to species model
rprospero Nov 19, 2025
0dc8bc3
Add impropers to species model
rprospero Nov 19, 2025
f00551e
Include atom type in species
rprospero Nov 19, 2025
cd50416
Fix loading species
rprospero Nov 19, 2025
181b12f
More comprehensive testing of SpeciesModel
rprospero Nov 20, 2025
05b2ba7
Fix formatting
rprospero Nov 20, 2025
d4f9b3d
Fixup from personal review
rprospero Nov 20, 2025
1abf327
Deactivate last bits of old GUI
rprospero Nov 20, 2025
d00006e
No special windows build for keywordWidgets
rprospero Nov 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build/windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ runs:
TEMPD=$(mktemp -d)
mkdir -p $TEMPD/bin
cmake ../ -G Ninja -DCMAKE_BUILD_TYPE:STRING="Release" -DCMAKE_C_COMPILER=cl -DANTLR_EXECUTABLE:string=$ANTLR_EXE -DJava_JAVA_EXECUTABLE:string=$JAVA_EXE -DCMAKE_CXX_COMPILER=cl -DMULTI_THREADING:bool=${{ inputs.threading }} -DGUI:bool=true -DCMAKE_INSTALL_PREFIX:PATH=$TEMPD
cmake --build . --config Release --target keywordWidgets
cmake --build . --config Release
cp bin/* $TEMPD/bin
ninja install
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ if(GUI)
${SRCS}/gui/qml/nodeGraph/GraphDelegate.qml
${SRCS}/gui/qml/nodeGraph/ParameterDelegate.qml
${SRCS}/gui/qml/nodeGraph/NodeBox.qml
${SRCS}/gui/qml/nodeGraph/SpeciesDialog.qml
${SRCS}/gui/qml/nodeGraph/ElementComboBox.qml
RESOURCES
)

Expand Down
3 changes: 2 additions & 1 deletion src/classes/atomType.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
#include "classes/shortRangeFunctions.h"
#include "data/elements.h"
#include <map>
#include <memory>
#include <vector>

// AtomType Definition
class AtomType : public Serialisable<>
class AtomType : public Serialisable<>, public std::enable_shared_from_this<AtomType>
{
public:
AtomType(Elements::Element Z = Elements::Unknown);
Expand Down
4 changes: 1 addition & 3 deletions src/classes/species.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ int Species::version() const { return version_; }
// Express as a serialisable value
void Species::serialise(std::string tag, SerialisedValue &target) const
{
if (forcefield_ == nullptr && atoms_.empty() && bonds_.empty() && angles_.empty() && torsions_.empty() &&
isotopologues_.empty() && sites_.empty())
return;
auto &result = target[tag];
result["name"] = name_;
if (forcefield_ != nullptr)
result["forcefield"] = forcefield_->name().data();

Expand Down
4 changes: 3 additions & 1 deletion src/classes/speciesAtom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ int SpeciesAtom::guessOxidationState(const SpeciesAtom *i)
// Express as a serialisable value
void SpeciesAtom::serialise(std::string tag, SerialisedValue &target) const
{
target[tag] = {{"index", userIndex()}, {"z", Z_}, {"r", r_}, {"charge", charge_}, {"type", atomType_->name().data()}};
target[tag] = {{"index", userIndex()}, {"z", Z_}, {"r", r_}, {"charge", charge_}};
if (atomType_)
target[tag]["type"] = atomType_->name().data();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we expect problems if atomType_ is null? It seems like in that case, the "type" key-value pair of target[tag] will be missing, which we may well need to catch somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The atomType_ is optional in the SpeciesAtom and line 499 (in the deserialise) method handles with case by checking for the "type" tag with optionalOn. That way, if the "type" tag is missing, the atomType_ is null.

}
void SpeciesAtom::deserialise(const SerialisedValue &node, CoreData &coreData)
{
Expand Down
169 changes: 1 addition & 168 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,171 +10,6 @@ add_library(
wizardFooter.ui
wizardHeader.h
wizardHeader.ui
# Viewers
configurationViewer.cpp
configurationViewer_input.cpp
configurationViewer_interaction.cpp
configurationViewer_render.cpp
configurationViewer.h
configurationViewerWidget.cpp
configurationViewerWidget.h
configurationViewerWidget.ui
dataViewer.cpp
dataViewer_input.cpp
dataViewer_interaction.cpp
dataViewer_contextMenu.cpp
dataViewer_render.cpp
dataViewer.h
dataWidget.cpp
dataWidget.h
dataWidget.ui
selectSymbol.cpp
selectSymbol.h
selectSymbol.ui
speciesEditor.cpp
speciesEditor.h
speciesEditor.ui
speciesViewer.h
speciesViewer.cpp
speciesViewer_input.cpp
speciesViewer_interaction.cpp
speciesViewer_render.cpp
speciesWidget.cpp
speciesWidget.h
speciesWidget.ui
viewer.cpp
viewer_input.cpp
viewer_interaction.cpp
viewer_options.cpp
viewer_query.cpp
viewer_render.cpp
viewer_renderables.cpp
viewer_view.cpp
viewer.h
# Widgets and Wizards
moduleControlWidget.cpp
moduleControlWidget.h
moduleControlWidget.ui
nodeControlWidget.cpp
nodeControlWidget.h
nodeControlWidget.ui
generatorWidget.cpp
generatorWidget.h
generatorWidget.ui
selectAtomTypeWidget.cpp
selectAtomTypeWidget.h
selectAtomTypeWidget.ui
selectForcefieldWidget.cpp
selectForcefieldWidget.h
selectForcefieldWidget.ui
selectSpeciesWidget.cpp
selectSpeciesWidget.h
selectSpeciesWidget.ui
# Dialogs
addConfigurationDialog.cpp
addConfigurationDialog.h
addConfigurationDialog.ui
addForcefieldTermsDialog.cpp
addForcefieldTermsDialog.h
copySpeciesTermsDialog.cpp
copySpeciesTermsDialog.h
copySpeciesTermsDialog.ui
createGrapheneSpeciesDialog.cpp
createGrapheneSpeciesDialog.h
createGrapheneSpeciesDialog.ui
dataManagerDialog.cpp
dataManagerDialog.h
editSpeciesDialog.cpp
editSpeciesDialog.h
editSpeciesDialog.ui
getConfigurationNameDialog.cpp
getConfigurationNameDialog.h
getConfigurationNameDialog.ui
getModuleLayerNameDialog.cpp
getModuleLayerNameDialog.h
getModuleLayerNameDialog.ui
getSpeciesNameDialog.cpp
getSpeciesNameDialog.h
getSpeciesNameDialog.ui
getTabNameDialog.cpp
getTabNameDialog.h
getTabNameDialog.ui
importCIFDialog.cpp
importCIFDialog.h
importCIFDialog.ui
importLigParGenDialog.cpp
importLigParGenDialog.h
importLigParGenDialog.ui
importSpeciesDialog.cpp
importSpeciesDialog.h
importSpeciesDialog.ui
intramolecularTermsDialog.cpp
intramolecularTermsDialog.h
intramolecularTermsDialog.ui
modifyChargesDialog.cpp
modifyChargesDialog.h
selectAtomTypeDialog.cpp
selectAtomTypeDialog.h
selectAtomTypeDialog.ui
selectElementDialog.cpp
selectElementDialog.h
selectElementDialog.ui
selectGenericItemDialog.cpp
selectGenericItemDialog.h
selectGenericItemDialog.ui
selectRestartFileDialog.cpp
selectRestartFileDialog.h
selectRestartFileDialog.ui
selectSpeciesDialog.cpp
selectSpeciesDialog.h
selectSpeciesDialog.ui
speciesCellDialog.cpp
speciesCellDialog.h
speciesCellDialog.ui
# Main Tabs
configurationTab.cpp
configurationTab.h
configurationTab.ui
forcefieldTab.cpp
forcefieldTab.h
forcefieldTab.ui
layerTab.cpp
layerTab.h
layerTab.ui
mainTab.cpp
mainTab.h
mainTabsBar.cpp
mainTabsBar.h
mainTabsWidget.cpp
mainTabsWidget.h
messagesTab.cpp
messagesTab.h
messagesTab.ui
overviewTab.cpp
overviewTab.h
speciesTab.cpp
speciesTab_geometry.cpp
speciesTab_isotopologues.cpp
speciesTab_sites.cpp
speciesTab.h
speciesTab.ui
# Main UI
gui.cpp
gui_simulation.cpp
gui.h
gui.ui
menu_configuration.cpp
menu_file.cpp
menu_help.cpp
menu_layer.cpp
menu_simulation.cpp
menu_species.cpp
outputHandler.cpp
outputHandler.h
stockColours.cpp
stockColours.h
thread.cpp
thread.h
)

target_include_directories(
Expand All @@ -190,8 +25,7 @@ target_include_directories(

target_link_libraries(
gui
PRIVATE keywordWidgets
delegates
PRIVATE delegates
widgets
models
base
Expand All @@ -207,7 +41,6 @@ target_link_libraries(
)

# Subdirectories
add_subdirectory(keywordWidgets)
add_subdirectory(delegates)
add_subdirectory(render)
add_subdirectory(widgets)
Expand Down
85 changes: 85 additions & 0 deletions src/gui/icons/nodes/Species.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading