diffpy / cmi_exchange

Example scripts for the DiffPy-CMI complex modeling framework
9 stars 25 forks source link

Why not pull space group from file? #12

Open CJ-Wright opened 6 years ago

CJ-Wright commented 6 years ago

In this example why is the space group not pulled from the cif file?

pavoljuhas commented 6 years ago

The example mimics what happens in PDFgui. diffpy.Structure has no direct facility for space-group based crystal representation, therefore loadStructure expands the CIF to P1. The user then works with such expanded structure and can constrain it with either the CIF space group or with a lower-symmetry supergroup to allow more distortions in the model.

The second reason is that diffpy.Structure has a bit clunky API for getting the CIF space group. A better option for refining CIF structure with CIF space group is to use pyobjcryst.loadCrystal instead of loadStructure. pyobjcryst has SG-based representation so the space group would be then applied in the refinement by default.