Skip to content

refactor: Remove ConfigurationAtom::globalIndex().#2514

Merged
trisyoungs merged 1 commit into
develop2from
dissolve2/remove-configurationatom-globalindex
Jun 18, 2026
Merged

refactor: Remove ConfigurationAtom::globalIndex().#2514
trisyoungs merged 1 commit into
develop2from
dissolve2/remove-configurationatom-globalindex

Conversation

@trisyoungs

@trisyoungs trisyoungs commented Jun 14, 2026

Copy link
Copy Markdown
Member

This PR addresses #2418 and removes the highly unnecessary ConfigurationAtom::globalIndex() function which used the internal molecule_ pointer and some pointer arithmetic to work out which index it was in the parent Configuration. We already had an Atom::index_ variable, so now we just set, update, and use that instead.

Running the benchmarks on my system suggest a 5% or so gain in the force routines as a direct result of doing this.

@trisyoungs trisyoungs force-pushed the dissolve2/benchmarks-with-graphs branch from c0451d8 to 6b1c178 Compare June 15, 2026 09:31
@trisyoungs trisyoungs force-pushed the dissolve2/remove-configurationatom-globalindex branch from c553d96 to b6cf956 Compare June 15, 2026 09:33
Base automatically changed from dissolve2/benchmarks-with-graphs to develop2 June 16, 2026 11:03
@trisyoungs trisyoungs force-pushed the dissolve2/remove-configurationatom-globalindex branch from b6cf956 to 83af209 Compare June 16, 2026 14:29
@trisyoungs trisyoungs force-pushed the dissolve2/remove-configurationatom-globalindex branch from 83af209 to 4d73b23 Compare June 16, 2026 19:29
@trisyoungs trisyoungs changed the title Remove ConfigurationAtom::globalIndex(). refactor: Remove ConfigurationAtom::globalIndex(). Jun 16, 2026
@RobBuchananCompPhys RobBuchananCompPhys self-requested a review June 17, 2026 09:39
@trisyoungs trisyoungs merged commit c9ed207 into develop2 Jun 18, 2026
7 of 9 checks passed
@trisyoungs trisyoungs deleted the dissolve2/remove-configurationatom-globalindex branch June 18, 2026 07:08
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.

2 participants