Skip to content

refactor: Argon nodes testing - #2215

Merged
RobBuchananCompPhys merged 77 commits into
develop2from
argon-nodes-testing
Sep 26, 2025
Merged

refactor: Argon nodes testing#2215
RobBuchananCompPhys merged 77 commits into
develop2from
argon-nodes-testing

Conversation

@RobBuchananCompPhys

Copy link
Copy Markdown
Contributor

No description provided.

@trisyoungs trisyoungs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lots happening here! This is probably going to turn into a fairly big PR, but I think it needs to be to capture all the bits that are being changed coherently in one place.

Comment thread src/nodes/atomicMC/atomicMC.cpp Outdated
Comment thread src/nodes/atomicSpecies.cpp Outdated
{
// Create atom and AtomType
auto at = atomTypes_.emplace_back(std::make_shared<AtomType>(Z));
auto &at = DissolveGraph::addAtomType(atomTypes_, Z);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, now, here this is conforming to the old adage of "Mr Dissolve owns it all", whereas now I think AtomTypes need to be stored as local objects on the Species itself (meaning that DissolveNode owns no AtomTypes at all). This way, a Species truly owns all of its data (we'll also need to the same with MasterTerms at some point). How do we share AtomTypes between Species if we do this? We'd need some way of configuring that at the point of creation of the Species, but this is an issue for another day.

Comment thread src/nodes/atomicSpecies.cpp
Comment thread src/nodes/dissolve.cpp Outdated
Comment thread src/nodes/dissolve.cpp Outdated
Comment thread src/nodes/energy/energy.cpp Outdated
Comment thread src/nodes/insert.cpp Outdated
Comment thread src/nodes/md/md.cpp Outdated
Comment thread src/nodes/insert.cpp Outdated
Comment thread src/nodes/insert.cpp Outdated
@RobBuchananCompPhys RobBuchananCompPhys mentioned this pull request Aug 1, 2025
44 tasks
Comment thread src/classes/configuration_contents.cpp Outdated
Comment thread src/nodes/insert.cpp Outdated
Comment thread src/nodes/dissolve.h Outdated
Comment thread src/nodes/dissolve.cpp Outdated
Comment thread src/nodes/dissolve.cpp Outdated
Comment thread src/nodes/dissolve.cpp
Comment thread src/classes/potentialMap.cpp Outdated
Comment thread src/classes/potentialMap.cpp Outdated
Comment thread src/classes/potentialMap.cpp Outdated
Comment thread src/classes/potentialMap.cpp Outdated
Comment on lines +138 to +139
potentialMatrix_[{i, j}] = pp;
potentialMatrix_[{j, i}] = pp;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting - I don't remember storing the full matrix here (i.e. i,j and j,i) since they are very obviously pointing to the same pairpotential. Still valid, however, as the code to lookup an element in a full array is simpler / faster, and this will be called a lot in the energy functions.

Comment thread src/nodes/atomicMC/process.cpp Outdated
Comment thread src/nodes/dissolve.h Outdated
Comment thread src/nodes/dissolve.h Outdated
Comment thread src/nodes/dissolve.cpp Outdated
Comment thread src/nodes/dissolve.cpp Outdated
Comment thread src/nodes/dissolve.h
Comment thread src/classes/partialSet.cpp Outdated
Comment thread src/classes/potentialMap.cpp Outdated
Comment thread src/io/import/data1D.cpp Outdated
Comment on lines +68 to +69
auto cwd = std::filesystem::current_path();
auto path = cwd.parent_path().parent_path() / filename_;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should remove this kind of path-hacking in the code, but I understand why it's here. Since the present example is created programmatically there is no context of a source input file and hence no reference directory. This may be another thing that we have to bring on to the table to discuss sooner rather than later - in #2196 I detailed my thoughts on moving to project folders rather than "bare input files in a random directory" that we have now.

Comment thread src/math/history.h Outdated
Comment thread src/nodes/gr/gr.h Outdated
Comment thread src/nodes/neutronSQ/helpers.cpp Outdated
Comment thread src/nodes/sq/sq.h Outdated
Comment thread src/nodes/dissolve.h
Comment thread src/nodes/node.cpp Outdated
Comment thread .gitignore Outdated

@trisyoungs trisyoungs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One final suggested change, then I think we're good to go!

Comment thread src/math/history.h Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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: 8fd9abb Previous: 7119883 Ratio
BM_Box_MinimumVector<CubicBox> 11.206905762293081 ns/iter 5.290696943791192 ns/iter 2.12
BM_Box_MinimumVector<TriclinicBox> 14.537282484820324 ns/iter 6.53439697251303 ns/iter 2.22

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

CC: @disorderedmaterials/dissolve-devs

@RobBuchananCompPhys
RobBuchananCompPhys merged commit 05c64ab into develop2 Sep 26, 2025
10 of 11 checks passed
@RobBuchananCompPhys
RobBuchananCompPhys deleted the argon-nodes-testing branch September 26, 2025 10:49
rprospero added a commit that referenced this pull request Feb 4, 2026
Co-authored-by: Adam Washington <adam.washington@stfc.ac.uk>
Co-authored-by: Tristan Youngs <tristan.youngs@stfc.ac.uk>
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.

3 participants