Skip to content

CIF files #48

Description

@pcpatfire

Hi,
Is there a way using diffpy.structure to save a CIF with the correct space group instead of using 'P 1'?

Activity

  1. sbillinge commented on Nov 19, 2021

    @sbillinge
    Contributor

    Thanks for the question @pcpatfire

    I am asking around about this, but I think it may be hard if symmetry breaking distortions have been introduced in the modelling. In that case we would have to run the resulting structure through a program that tries to determine space group symmetry from the coordinates.

    What is your use-case? Do you just want a round-trip, so a CIF is read in, run through PDFgui/diffpy-cmi and then output without breaking symmetry? Or you want a tool that "finds" the highest new symmetry after allowing distortions?

  2. pcpatfire commented on Nov 19, 2021

    @pcpatfire
    Author

    Thanks for your answer.
    I would like to use the resulting CIF to calculate the diffraction pattern (using for instance pymatgen).

  3. pcpatfire commented on Nov 26, 2021

    @pcpatfire
    Author

    Another simple question. Is the information stored in the spacegroup variable while reading the CIF file saved anywhere after creating the structure? Is it accessible after loadind a CIF'

  4. dragonyanglong commented on Nov 27, 2021

    @dragonyanglong
    Contributor

    Hi @pcpatfire , you can use the cif parser to access the spacegroup info, For example:

    from diffpy.structure.parsers import p_cif
    a =  p_cif.P_cif()
    a.parseFile('Ni.cif')
    a.spacegroup.crystal_system
    
  5. added this to the 3.4.0-rc.0 release milestone on Jun 27, 2025
  6. sbillinge commented on Mar 23, 2026

    @sbillinge
    Contributor

    This would be a useful feature, but will take some work, so moving it forward for now. There is software that will find symmetries in files within certain resolutions and we can look into doing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions