Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIF files #48

Open
pcpatfire opened this issue Nov 19, 2021 · 4 comments
Open

CIF files #48

pcpatfire opened this issue Nov 19, 2021 · 4 comments

Comments

@pcpatfire
Copy link

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

@sbillinge
Copy link
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?

@pcpatfire
Copy link
Author

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

@pcpatfire
Copy link
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'

@dragonyanglong
Copy link
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

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

No branches or pull requests

3 participants