Skip to content

refactor: Species AtomTypes#2349

Draft
trisyoungs wants to merge 19 commits intodevelop2from
dissolve2/species-atomtypes
Draft

refactor: Species AtomTypes#2349
trisyoungs wants to merge 19 commits intodevelop2from
dissolve2/species-atomtypes

Conversation

@trisyoungs
Copy link
Copy Markdown
Member

@trisyoungs trisyoungs commented Apr 8, 2026

This PR is the first significant step towards removing the old Dissolve and CoreData classes, removing the storage of AtomTypes in CoreData. It breaks a couple of things related to the AddForcefieldDialog but the justification for doing so is that this is likely to be completely rewritten (most likely in a more Node-y form) for Dissolve2.

Blockers

(In order to fully remove AtomTypes from CoreData)

  • PotentialSet stores AtomType pointers and needs to serialise them, so must be converted to use a DoubleKeyedMap of resolvables
  • AtomTypeVectorKeyword stores AtomType pointers and needs to serialise them, however is only used in a single place in the old NeutronSQModule.
  • EPSRModule::readPCof converts names into AtomTypes using CoreData.
  • ForcefieldSortFilterModel::filterAcceptsRow uses a temporary Dissolve and CoreData to assign atom types and check for forcefield validity.
  • DissolveModel exposes AtomTypes through its AtomTypeModel, but this is no longer relevant as they are local to Species (same for master terms).
  • AddForcefieldDialogModel uses temporary Dissolve and CoreData extensively, including but not limited to AtomTypes. Since AtomType and master term data are to be local to a Species, much of the existing checking is irrelevant.
  • EPSRModuleTest accesses the test object's CoreData to get the number of atom types which (currently) is both unnecessary and incorrect!
  • AtomTypeModel (used in lots of places) uses CoreData::atomTypes_ to check for unique naming when renaming an atom type.

@trisyoungs trisyoungs force-pushed the dissolve2/cells-unit-tests branch from e676a89 to f8789c6 Compare April 8, 2026 16:24
@trisyoungs trisyoungs force-pushed the dissolve2/species-atomtypes branch from 31d55b4 to d75fa65 Compare April 8, 2026 16:26
Base automatically changed from dissolve2/cells-unit-tests to develop2 April 9, 2026 10:03
@trisyoungs trisyoungs force-pushed the dissolve2/species-atomtypes branch 2 times, most recently from 40c007e to 0b757de Compare April 9, 2026 14:01
@trisyoungs trisyoungs force-pushed the dissolve2/species-atomtypes branch 3 times, most recently from 535f84a to 0817167 Compare April 9, 2026 15:14
@trisyoungs trisyoungs force-pushed the dissolve2/species-atomtypes branch from 0817167 to d93f9d2 Compare April 9, 2026 15:25
@trisyoungs trisyoungs mentioned this pull request Apr 10, 2026
4 tasks
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.

1 participant