Skip to content

Commit 0cf92ee

Browse files
committed
Prevent forced isotropy of Uij-s for new atoms.
Always assume general anisotropic displacement parameters for all atoms. This would be better to handled with an extra column for isotropy flags. Fixes inability to set anisotropic Uij-s for new atoms.
1 parent 0dddda0 commit 0cf92ee

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

diffpy/pdfgui/control/fitstructure.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ def read(self, filename, format='auto'):
114114
p = PDFStructure.read(self, filename, format)
115115
# update data only after successful reading
116116
self._update_custom_spacegroup(p)
117+
# FIXME Temporary workaround to prevent forced isotropy of the Uij
118+
# values. To be removed and handled by atom isotropy column.
119+
self.anisotropy = True
117120
return p
118121

119122

@@ -127,6 +130,9 @@ def readStr(self, s, format='auto'):
127130
p = PDFStructure.readStr(self, s, format)
128131
# update data only after successful reading
129132
self._update_custom_spacegroup(p)
133+
# FIXME Temporary workaround to prevent forced isotropy of the Uij
134+
# values. To be removed and handled by atom isotropy column.
135+
self.anisotropy = True
130136
return p
131137

132138

@@ -265,6 +271,11 @@ def insertAtoms(self, index, atomlist):
265271
atomlist -- list of atom instances.
266272
"""
267273
acd = self._popAtomConstraints()
274+
# FIXME Temporary workaround to prevent forced isotropy of the Uij
275+
# values. To be removed and handled by atom isotropy column.
276+
for a in atomlist:
277+
a.anisotropy = True
278+
# workaround ends here.
268279
self.initial[index:index] = atomlist
269280
self._restoreAtomConstraints(acd)
270281
return

0 commit comments

Comments
 (0)