Skip to content

Conversation

@rprospero
Copy link
Contributor

The SpeciesNode has been modified to output an actual "Species*" instead of "std::shared_ptr". This more closely matches the behaviour of the configuration node. Furthermore, the actual species is contained in a hidden parameter of the node, so there is no vestigial option that might confuse the user. This hidden parameter functionality can be used on other node types as well in the future for information that must be serialised but is not necessarily user facing.

This closes #2280 and #2277

@rprospero rprospero changed the title Direct species node refactor:Direct species node Dec 4, 2025
@rprospero rprospero force-pushed the direct_species_node branch from 9c38280 to 0b525a4 Compare December 4, 2025 15:10
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 0b525a4 Previous: 9c38280 Ratio
BM_Box_MinimumImage<CubicBox> 44.437278100022034 ns/iter 14.652445275756 ns/iter 3.03
BM_Box_MinimumVector<CubicBox> 32.07641271673076 ns/iter 10.591956632536805 ns/iter 3.03
BM_Box_MinimumImage<OrthorhombicBox> 44.72856806946292 ns/iter 17.434331951610655 ns/iter 2.57
BM_Box_MinimumVector<OrthorhombicBox> 29.62962506850058 ns/iter 10.664159302468638 ns/iter 2.78
BM_Box_MinimumImage<MonoclinicAlphaBox> 34.650182638775306 ns/iter 11.827506507171602 ns/iter 2.93
BM_Box_MinimumVector<MonoclinicAlphaBox> 22.06917170875414 ns/iter 7.974686808099608 ns/iter 2.77
BM_Box_MinimumImage<TriclinicBox> 36.40650323010368 ns/iter 16.697681181962114 ns/iter 2.18
BM_Box_MinimumVector<TriclinicBox> 27.53808544794917 ns/iter 8.926373529580362 ns/iter 3.09

This comment was automatically generated by workflow using github-action-benchmark.

CC: @disorderedmaterials/dissolve-devs

@rprospero rprospero marked this pull request as ready for review December 5, 2025 11:15
rprospero and others added 4 commits December 10, 2025 11:49
Fixup QML

Ensure that graph nodes have correct parent
Ensure that graph nodes have correct parent
Co-authored-by: RobBuchanan <106311829+RobBuchananCompPhys@users.noreply.github.com>
Copy link
Member

@trisyoungs trisyoungs left a comment

Choose a reason for hiding this comment

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

This all looks good, but I have one question - why does the SpeciesModel act as (from what I see) a producer of SpeciesNodes? I guess it depends on how we are utilising SpeciesModel in the UI, but In my head it should only ever be receiving the pointer to a SpeciesNode (or even just a Species...) from which it should be setting / getting data. I'm probably misunderstanding the intent here, so I had to ask!

src/nodes/node.h Outdated
Comment on lines 315 to 318
// Serialise any hidden content
virtual void hiddenSerialise(SerialisedValue &target) const {}
// Deserialise any hidden content
virtual void hiddenDeserialise(const SerialisedValue &node) {}
Copy link
Member

Choose a reason for hiding this comment

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

I might suggest that "internal" is a better definition than "hidden":

Suggested change
// Serialise any hidden content
virtual void hiddenSerialise(SerialisedValue &target) const {}
// Deserialise any hidden content
virtual void hiddenDeserialise(const SerialisedValue &node) {}
// Serialise any required internal content
virtual void serialiseInternal(SerialisedValue &target) const {}
// Deserialise any required internal content
virtual void deserialiseInternal(const SerialisedValue &node) {}

@rprospero rprospero merged commit c8eab2f into develop2 Dec 15, 2025
9 checks passed
@rprospero rprospero deleted the direct_species_node branch December 15, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants