-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Make constrainAsSpaceGroup
take effect immediately. As it is the constraints are applied after iterating the resultant object.
from __future__ import print_function
from diffpy.Structure import Structure, Atom
from diffpy.srfit.structure import struToParameterSet, constrainAsSpaceGroup
stru = Structure([Atom('X')])
stru.lattice.setLatPar(3.52, 3.52, 3.52)
phase = struToParameterSet("nickel", stru)
sgpars = constrainAsSpaceGroup(phase, 'Fm-3m')
print("initial constraints:", phase._formatConstraints())
list(sgpars)
print("after sgpars iteration:", phase._formatConstraints())
outputs
initial constraints: []
after sgpars iteration: ['lattice.b <-- a', 'lattice.c <-- a']
Metadata
Metadata
Assignees
Labels
No labels