24.2 GSAS-II Constraint Types

In GSAS-II constraints are created, viewed or changed from the constraints data tree entry. For the purposes of simplification, constraints are broken into five categories with matching data tabs: Phase constraints, Histogram constraints, HAP constraints (labeled Histogram/Phase), Global constraints (usually not used) and Sym-Generated constraints. The latter tab shows any constraints that are generated by symmetry on lattice or atom parameters (such as one that enforces \(a=b\) for a tetragonal cell or \(x=y=z\) for an atom at a \(x,x,x\) special position). These Sym-Generated constraints are read-only.

After selecting a tab, one will see a display of existing constraints, which can be deleted or their coefficients can be edited. If a constraint is specified for a set of parameters where none of the parameter are varied, the parameter is not used, but it is noted here that the parameter exists, but is being ignored. If some parameters, but not all are varied in constraint, that can generate an error. Likewise, a message is generated if constraints are in conflict. Constraints are created using the commands in the “Edit Constr.” menu, but one must select the type of constraint to be varied.

There are four types of GSAS-II constraint entries:

24.2.1 Parameter equivalences:

Parameter equivalences can be thought of as where one or more parameters are set from a controlling parameter. This can be written in the form: \[var_C \rightarrow c_1 var _1 = c_2 * var_2 = ...\] where \(c_j\) are constants and \(var_j\) are the names of a GSAS-II parameters, named P:H:name. Of the parameters, \(var_C\) is the controlling parameter and the others are set from this.

As an example for the use of a parameter equivalence, suppose I want to constrain all four of the O atoms in my phase to be varied as a single parameter. I use the “Edit Constr.”/“Add equivalence” menu command and the first window that is displayed after the menu command, as seen in Fig. 24.1, will show all the parameters for the selected tab (Phase, Histogram, HAP). I can pick a Uiso parameter for any of the O atoms in that window. The window in Fig. 24.2 is shown next. Here, I select a “wildcard” parameter for all O atoms in this phase.

PIC

Figure 24.1: First window when creating a parameter equivalence.

PIC

Figure 24.2: Second window when creating a parameter equivalence.

When this is done, a warning window is commonly shown such as the one in Fig. 24.3. This warning is shown when a constraint involves parameters that are not varied. The constraint will be ignored. If you went to the bother of creating the constraint, you likely want to use it, so the warning is to tell you that you now need to set the refine flags for the Uiso parameters. Provided that you press “Yes” on this window, the equivalence will now appear on the constraints data window, as seen in Fig. 24.4. Should you wish to change the ratios applied in the equivalence (the \(c_j\) values), you would press the “Edit” button next to the constraint.

PIC

Figure 24.3: Warning that a constraint has been created for unvaried atoms. This is normal.

PIC

Figure 24.4: The data window showing the newly Enter Caption

24.2.2 Constraint equations:

Constraint equations are written in the form: \[c_1 var _1+ c_2 * var_2 + ... = T\] where \(c_j\) and \(T\) are constants and \(var_j\) are the names of a GSAS-II parameters, named P:H:name. There is no limit to the number of variables that can be included in a constraint equation.

Use the “Edit Constr.”/“Add constraint equation” menu command to create a new constraint equation. The first window that is displayed after the menu command, as seen in Fig. 24.5, will show all the parameters for the selected tab (Phase, Histogram, HAP) and after a parameter is selected. In the figure I have used a filter to select only fractional occupancies by requiring the string “frac” to be present. In Fig. 24.6 , the next window that is opened is shown. Note that this window only shows parameters that are related to the first parameter (here type “Afrac”) , where you can select all the parameters you wish to constrain. Note that at the end of that list, you can select “wildcard” parameters, which will select all the matching parameters with any histogram and/or phase number. After OK is selected on the second window, the constraint is created. When a constraint equation is created, the \(c_j\) and \(T\) values are initially set to 1, but using the “Edit” button next to the constraint on the data window for the Constraints data tree entry allows those values to be edited.

PIC

Figure 24.5: First window when creating a constraint equation.

PIC

Figure 24.6: Second window when creating a constraint equation.

You may notice that the parameter equivalence that was initially presented, \[var_C \rightarrow c_1 var _1 = c_2 * var_2 = ...\] is no different than a series of constraint equations: \begin{align} var_C& - c_1 var _1 &= 0\\ var_C& - c_2 var _2 &= 0\\ var_C& - ... &= 0 \end{align}

Why are both options available? It is much simpler to set up and understand parameter equivalences than a series of constraint equations. Also the implementation for equivalences is a bit simpler. So, both are offered in GSAS-II. Under special circumstances GSAS-II will convert parameter equivalences to constraint equations as described below in §24.3.

24.2.3 New Variable definitions:

New variable definitions are used to establish parameters that group parameters in alternate ways. They are not commonly created by users, but an example for how they might be used follows. Suppose we have two very closely coupled parameters, say for two atoms that are related by a pseudo-mirror plane, so that the x and y coordinates for each atom are highly correlated with each other. If the two x coordinates are p:dAx:1 and p:dAx:2 and we define two new variables:

\[ \texttt {p:dAx:1} + \texttt {p:dAx:2} = \rm Xsum12\] \[ \texttt {p:dAx:1} - \texttt {p:dAx:2} = \rm Xdif12\] Now, if we refine \(\rm Xsum12\) and do not refine \(\rm Xdif12\) then the two atoms will move together. In the final stages of the fit, we can see if the data have enough sensitivity to the differences between the impact of two atoms on the model by testing to see if fitting \(\rm Xdif12\) is possible.

The process of creating a new variable in the GSAS-II GUI is largely the same as creating a constraint equation, except that the “Edit Constr.”/“Add New Var” menu command is used. The windows that follow are almost identical to those in in Fig. 24.6 and in Fig. 24.6.

One major role for new variable constraints is to implement refinement of representational analysis distortion modes. This will be discussed in §28.2. These are typically created by reading in a CIF created on the ISODISTORT web site.

24.2.4 Parameter holds:

Parameter holds are used to prevent a parameter from being fit. These are typically used where a single refine flag will set several parameters to be refined, but one of those parameters should not be fit. These are not commonly needed.

An example where a parameter hold would be used would be with a structure in a polar space group. As was described in §3.16, one or more coordinates must be fixed. In the example used in §3.16, with space group \(P 2_1\), the origin for the \(b\) axis is undefined. One likely want to vary all the atom coordinates except one of the y values. Fixing a “dAy” parameter for one atom will prevent that one variable from being refined.

Set the parameter hold by selecting the “Edit Constr.”/“Add hold” menu command. A window will be opened where parameter(s) can be selected. In Fig. 24.7 this window is shown. Note that a parameter named “Ay” will be the variable name for an atomic y coordinate, so that string has been used to search for atom y coordinate variables. Selecting any of the listed variables will fix one atom’s y coordinate.

PIC

Figure 24.7: Selecting a parameter to hold. Note use of filter to reduce the number of displayed options.

24.2.5 Make Atoms Equivalent

The “Edit Constr.”/“Make Atoms Equivalent” menu command is a shortcut that will perform the several commands needed to treat atoms that share a site. After using this, one selects two (or more) atoms that share a site. Parameter equivalences will be created for the x, y, z, and Uiso parameters for the selected atoms, and a constraint equation will be created that forces the sum of the atom occupancies to be 1. The result is no different than if the individual parameter equivalences and constraint equation had been done in five separate steps.