Skip to content

feat: CIF handling#2339

Merged
RobBuchananCompPhys merged 6 commits intodevelop2from
dissolve2/cif-handling
Mar 31, 2026
Merged

feat: CIF handling#2339
RobBuchananCompPhys merged 6 commits intodevelop2from
dissolve2/cif-handling

Conversation

@RobBuchananCompPhys
Copy link
Copy Markdown
Contributor

@RobBuchananCompPhys RobBuchananCompPhys commented Mar 17, 2026

This work aims to encompass much of the existing functionality of the CIFHandler and ImportCIFDialog interfaces. It does this via passing a pointer to a CIFContext (which is a node type alias for CIFHandler) between various nodes.
Together these form a sort of CIF-node "family".

  • CIFLoaderNode: Initialises a CIFContext object and reads into it the contents of a .cif file.
  • CIFMolecularSpecies: Recieves and stores a CIFContext *, generating from it the detected molecular species and supercell configuration as output parameters
  • CIFSuperMolecule: Recieves and stores a CIFContext *, generating from it the supercell species
  • CIFPeriodicFramework: Recieves and stores a CIFContext *, generating from it the unit cell species and configuration as output parameters
  • CIFAtomicOptionsNode, CIFBondingOptionsNode, and CIFNETAOptionsNode operate on the context pointer and apply various settings to it (for instance removeAtomics, useCIFBondingDefinitions, and setMoietyRemovalNeta etc.`
  • SetCIFAtomGroupActivity takes the CIFContext * and allows for activation/deactivation of chosen CIFAssembly CIFAtomGroup instances.

@RobBuchananCompPhys RobBuchananCompPhys marked this pull request as ready for review March 23, 2026 13:20
Comment thread src/nodes/cifAtomicOptions.cpp Outdated
Comment thread src/nodes/cifConfiguration.cpp Outdated
Comment thread src/nodes/cifConfiguration.cpp Outdated
Comment thread src/nodes/cifConfiguration.h Outdated
Comment thread src/nodes/cifStructureCleanup.cpp
Comment thread src/nodes/cifAtomicOptions.cpp Outdated
Copy link
Copy Markdown
Contributor

@rprospero rprospero left a comment

Choose a reason for hiding this comment

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

Looks clearer than I'd expected from anything with CIF attached to it. I have some general comments and a few minor suggestions, but the only major concern is establishing a FilePath type in the long term.

Comment thread src/data/spaceGroups.cpp
Comment thread src/nodes/cifLoader.cpp
Comment thread src/nodes/cifMolecularSpecies.cpp Outdated
Comment thread src/nodes/cifRemoveWater.h Outdated
Comment thread src/nodes/cifRemoveWater.cpp Outdated
Comment thread src/nodes/cifRemoveWater.cpp Outdated
@RobBuchananCompPhys RobBuchananCompPhys mentioned this pull request Mar 31, 2026
44 tasks
Copy link
Copy Markdown
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.

I think this is a great start for the new CIF handling in Dissolve2. From looking through the nodes as they stand I think we should move away from operating on the context and passing it as a pointer, and move towards passing a proper CIFContext object around, each node making a copy of the input context, modifying it, and sending its own CIFContext as an output. If we do this then we can also have a pseudo-Configuration generated within each CIFContext at each stage of the graph.

Comment thread src/nodes/cifLoader.cpp
Comment thread src/nodes/cifPeriodicFramework.cpp
Comment thread src/nodes/cifPeriodicFramework.cpp
@RobBuchananCompPhys RobBuchananCompPhys merged commit eb329b1 into develop2 Mar 31, 2026
9 checks passed
@RobBuchananCompPhys RobBuchananCompPhys deleted the dissolve2/cif-handling branch March 31, 2026 15:06
github-actions Bot pushed a commit that referenced this pull request Mar 31, 2026
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