Skip to content

refactor: make constraints in the __init__() of SpaceGroupParameters #211

Description

@ycexiao

Problem

In SpaceGroupParameters, self._makeConstraints() is only called in __iter__() which means the parameters will not be set up properly by:

sgpars = constrainAsSpaceGroup(phase, "Fm-3m")

The following lines are required

for par in sgpars.latpars:
pass # usually recipe.addVar(par)
for par in sgpars.adppars:
pass # usually recipe.addVar(par) 

Proposed solution

Move self._makeConstraints() to __init__()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions