Skip to content

Cifadapter - #11

Closed
SurgeArrester wants to merge 11 commits into
datalab-industries:mainfrom
SurgeArrester:cifadapter
Closed

Cifadapter#11
SurgeArrester wants to merge 11 commits into
datalab-industries:mainfrom
SurgeArrester:cifadapter

Conversation

@SurgeArrester

@SurgeArrester SurgeArrester commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Modifies optimade.models.structures.cif.py by using the pycifrw adapter in PR 10 to process cifs using either a raw string or filepath to a optimade.models.StructureResourceAttributes object.

from_cif(cif_string: Union[bytes, str],
fp: bool=False,
id: Union[None, str] = None) -> StructureResourceAttributes:

cif_string: Either the filepath or raw cif data
fp: Boolean flag as to whether cif_string is a filepath or raw string
id: The unique id to assign to the resultant StructureResourceAttribute

Fixed Issues

  • Removed $ symbol from all cifs
  • Stopped semicolon initiating lines escaping multiline semicolon escape sequences
  • Stopped mid title apostrophes from breakng title escape sequence
  • Stopped apostrophes in _chemical_name_common and _chemical_name_structure_type from breaking the escape sequeces

@ml-evs

ml-evs commented Jun 21, 2026

Copy link
Copy Markdown
Member

Superseded by #10

@ml-evs ml-evs closed this Jun 21, 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.

2 participants