Skip to content

Commit 28a47c3

Browse files
committed
Allow setting coordinates resolution in CIF parser.
Add attribute P_cif.eps. When set use as a cutoff for equal positions.
1 parent c3a142a commit 28a47c3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

diffpy/Structure/Parsers/P_cif.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class P_cif(StructureParser):
4747
Data members used for input only:
4848
4949
spacegroup -- instance of SpaceGroup used for symmetry expansion
50+
eps -- resolution in fractional coordinates for non-equal
51+
positions. Use for expansion of asymmetric unit.
5052
eau -- instance of ExpandAsymmetricUnit from SymmetryUtilities
5153
asymmetric_unit -- list of atom instances for the original asymmetric
5254
unit in the CIF file
@@ -238,6 +240,7 @@ def __init__(self):
238240
self.ciffile = None
239241
self.stru = None
240242
self.spacegroup = None
243+
self.eps = None
241244
self.eau = None
242245
self.asymmetric_unit = None
243246
self.labelindex = {}
@@ -481,7 +484,8 @@ def _expandAsymmetricUnit(self):
481484
# get reverse-ordered unique indices
482485
corepos = [a.xyz for a in self.stru]
483486
coreUijs = [a.U for a in self.stru]
484-
self.eau = ExpandAsymmetricUnit(self.spacegroup, corepos, coreUijs)
487+
self.eau = ExpandAsymmetricUnit(self.spacegroup, corepos, coreUijs,
488+
eps=self.eps)
485489
# build a nested list of new atoms:
486490
newatoms = []
487491
for i, ca in enumerate(self.stru):

0 commit comments

Comments
 (0)