# Changeset 1164

Ignore:
Timestamp:
Aug 17, 2011 9:13:48 AM (10 years ago)
Message:

document rigid body code

Location:
branches/sandbox/doc
Files:
2 edited

Unmodified
Removed
• ## branches/sandbox/doc/expgui6A.html

 r1151

EXPGUI, part 6A EXPGUI, part 7

A.6A Rigid Body Constraints panel

A.7 Rigid Body Introduction

GSAS Rigid bodies are another way to constrain relative atomic positions. This will be documented further in the future. positions. In a rigid body fit, a group of atoms are constrained so that they rotate and/or translate as a unit. GSAS allows quite complex rigid bodies, with up to 9 scaling parameters and when multiple rigid bodies are used with grouped parameters even more complex constraints can be developed. The EXPGUI rigid body interface allows access to most of the GSAS features and offers some setup features not in GSAS, but expert users may need to use EXPEDT for some very complex constraint models.

Use of a rigid body reduces the number of parameters refined, prevents deviations from chemical reasonableness and generally helps obtain a more stable refinement. This can be especially important in the early stages of refinement. Rigid bodies are commonly used to constrain rigid moieties such phenyl or cyclopentadienyl rings but, they can be generated for much more complicated structures. Rigid bodies in GSAS are always represented by a set of Cartesian coordinates describing the relative positions of the atoms to be constrained. More complex frameworks can be constructed using multiple sets of Cartesian coordinates with variable multipliers, for more complex constraints. Even more sophisticated refinements are possible when multiple rigid bodies are constrained to share an origin or positioning (Euler) angles.

Once created, the rigid body framework is applied as a constraint by mapping it onto atoms in a phase. The same rigid body framework can be mapped multiple times into one or more phases. Once mapped, the set of atoms will refine as a single body with 3 parameters describing the translation of the rigid body origin (generally the centroid of mass of the atomic grouping but, this is optional) and 3 parameters describing the rotation of the body about the origin (Euler Angles). TLS terms (translation, libration, screw) can be used to model cooperative thermal motion about the rigid body. The EXPGUI rigid body routines will allow the user to readily generate the rigid body framework (called matrices in EXPGUI terminology) and map the rigid body to sets of atoms already present in the GSAS EXP file. The EXPGUI Rigid Body Panel allows for the creation or viewing of rigid bodies. A rough outline of the procedure to generate and refine with a rigid body is as follows:

1. Define the framework of the rigid body with a set of Cartesian coordinates representing the relative atomic positions. This can be done by manual input, loading the coordinates from an ASCII file, converting Z-matrix coordinates to Cartesian or generating Cartesian coordinates from fractional coordinates in an existing molecular fragment in the GSAS EXP file.
2. The rigid body framework must be mapped upon the crystal structure. This requires that the atoms in the phase be sequential and must match the order of atoms in the rigid body framework. To change the sequential order in the rigid body, the Edit Matrix routine may be used to reorder the rigid body coordinates. In the mapping procedure, this number of the first atom in the phase to match the rigid body is designated (since the mapping then follows) and both the Euler angles and rigid body origin are specified; EXPGUI can help determine values for these. This can be repeated to map the rigid body framework to other parts of the structure.
3. Once the rigid body framework is mapped to the crystal structure, the refinement flags for the Euler angles and Origin can be set. This will turn on the 'X' refinement flags for the included atoms in the Phase Panel. It is important that these match the state of the rigid body refinement flags or GENLES will crash.

A.7.a Main Rigid Body Panel

The main panel for rigid bodies presents a interface where bodies can be initially defined. When bodies have been defined, a tab appears for each defined body, where these bodies can be used or edited. This main panel is shown below and subsequent sections describe how bodies are initially defined.

Rigid bodies are created from one or more sets of Cartesian coordinates multiplied by a scale factor and then summed to create Cartesian coordinates in Angstroms. This can be expressed as a linear algebra expression,

XYZ = M1*XYZ1 + M2*XYZ2 + ...

Where XYZ, XYZ1, ...are 3 by N matrices (3 columns by N atoms) and M1, M2,... are scalars. Therefore in EXPGUI terminology, each set of Cartesian coordinates is called a "Matrix." The sum of these scaled matrices describes the rigid body framework that is to be mapped upon the atoms of the crystal structure. Most commonly, however, only one matrix is used and M1=1. In this case the matrix is simply a set of Cartesian coordinates in Angstroms, which can be input by multiple methods. As a reminder, note that the rigid body framework will be mapped to consecutive atoms in the EXP file must be so the Cartesian coordinates of the rigid body MUST be listed in a corresponding order.

If the ordering of the Cartesian coordinates of the rigid body, as input, is incorrect, they may be rearranged with the Edit Matrix panel invoked from the Rigid Body Type panel.

Advanced refinements may take advantage of the GSAS feature of multiple matrices, each with its own matrix multiplier. This can result is some very advanced refinements such as independently refining the C-C and C-H bond distances in a hydrocarbon ring.

The "Create Rigid Body" tab offers several ways to create a rigid body:

• Manual rigid body definition
• Cartesian coordinates from ASCII text file
• Cartesian coordinates from a Z-matrix
• Compute Cartesian coordinates from EXP file (fractional coordinates)

A.7.a1 Manual rigid body definition

The manual definition window allows input of coordinates and multipier(s) by typing values into boxes. Number of matrices determines the number of multipliers and sets of coordinates that are added. Number of Cartesian sites is the number of atoms in the rigid body. The "Save Rigid Body" button creates a new rigid body with the specified input. The "Export Cartesian Coordinates..." writes an ASCII file with the current input.

A.7.a2 Cartesian coordinates from ASCII text file

Cartesian coordinates can be read from any ASCII file containing Cartesian coordinates in a standard tabular format. This routine allows the user to determine which columns (separated by a delimiter) represents the X, Y and Z coordinates. The user also has the option to ignore any row or column that contains irrelevant information. Once the Cartesian coordinates are isolated, and the "Continue" button is pressed, the user continues to the "Create Rigid Body" window (see above).

A.7.a3 Cartesian coordinates from a Z-matrix

Cartesian coordinates can also be calculated from a Z-matrix in an appropriate ASCII format. The conversion routine will allow dummy atoms to be identified and ignored in the conversion process. Upon pressing the "Continue" button, the Z-matrix is converted to Cartesian coordinates and the user progresses to the "Create Rigid Body" window (see above).

A.7.a4 Compute Cartesian coordinates from EXP file (fractional coordinates)

Cartesian coordinates can also be determined from atoms in the EXP file. In order to generate Cartesian coordinates, the number of sites in the rigid body framework must be specified as well as the starting atom (remember rigid bodies are mapped consecutively). Once the number of atoms in the body is set, the "Choose Start Atom" button is pressed. This creates buttons for all possible choices for the first atom to define the body. Once the starting atom is selected by pressing one of these button(s), the atoms to be used to define the rigid body framework have been determined. The user must than select which atoms will be used to define the origin (the origin will be at the centroid of the atoms chosen) and must define the axes that will be used to generate the x-axis and the xy plane. The Cartesian coordinates can then be generated. Either the defined body can be determined and mapped (with the "Save and Map Rigid Body" button), or the Cartesian coordinates can exported to an ASCII text file (with the "Export Cartesian Coordinates" button).

A.7.b Rigid Body Panel

As each rigid body is defined, a "Rigid Body Type N" panel will be created.  This panel will show how the rigid body is mapped, and will allow the user to map / unmap the rigid body on to the crystal structure, view the rigid body (this assumes the DRAWxtl program is installed on their computer), edit the rigid body, set refinement flags, or delete the rigid body.

A.7.b1 Plot Rigid Body

DRAWxtl is a very useful viewing program that EXPGUI can invoke, if installed. It allows for the viewing of the rigid body to ensure it is correct before mapping and matches the ordering of the atoms in the EXP file. The plot below was obtained from the "Plot Rigid Body" button.

A.7.b2 Map Rigid Body

The rigid body must be mapped to the crystal structure to define the constraint. This is done by pressing the "Map Rigid Body" button, which raises the window below.

In order to map the rigid body the user will need to specify the phase and the sequence number of the first atom in the .EXP file to be included. This will be the atom assigned to the first set of coordinates in the rigid body. Each succeeding atom will be assigned the consecutive set of coordinates. The origin and Euler angles for the rigid body placement must be determined; this can be done by fitting to the atoms in the .EXP file using the "Fit rigid body to phase" button. A table of RMS (~ A distances) between the mapped rigid body placement and the initial atom placements -- this describes the quality of the fit. If the fit is poor, it is likely that the ordering of Cartesian coordinates is incorrect, resulting in high RMS values. If this occurs, the ordering of the Cartesian coordinates must be modified with the Edit Matrix routine.

The fit can be visually examined with the "Plot rigid body & phase" button with results as show to the right. The rigid body is shown in red and the .EXP file coordinates are shown in green. Note that it is often easier to understand what is being plotted, when bonds are drawn. The input in the "Bonds" box specifies ranges of distances where 0.9-1.1, 1.3-1.6 draws bonds between atoms spaced 0.9 to 1.1 A (typical C-H bonds) and 1.3 to 1.6 A (typical organic molecule bonds). You may wish to specify different ranges where other types of bonding are present. One can also change the display from the DRAWxtl menus.

A.7.b3 Edit Rigid Body

Pressing the "Edit Matrix" button on the "Rigid Body Type N" panel provides an interface that will allow the Cartesian coordinates to be modified by sorting, swapping, adding or deleting matrix elements. It will also allow for setting the refinement flag for Matrix Multipliers.

Note that repeating the previous mapping, after reordering of the Cartesian coordinates, the following fit of a cyclopentadienyl ligand is accomplished and the RMS differences in the fitting procedure are small. Below shows the correct fit.

A.7.c Setting Rigid Body Refinement Flags

The "Refinement Flags" button opens a window that allows the user to set flags to refine various parameters. Parameters can be set up to refine as free variables or constrained variables. The TLS (translation, librations, screw) terms describe the rigid body thermal motions and are normally off. They should only be turned on if the user has a strong understanding of the relationships between the TLS terms. Note: if an Origin or Euler angle flag is enabled, the appropriate atom X refinement flag on the phase panel will be set. GENLES will have errors if rigid body parameters are refined, but not the positions of the corresponding atoms. Note that in EXPEDT, rigid body parameters can be grouped by assigning them the same variable number. The same feature is possible via a graphical interface by "tagging" (pressing the appropriate button for) items to vary and then using the following buttons:
• "Set Free Variables" - will assign each tagged parameter as an unconstrained variable by providing a unique variable number.
• Do Not Refine Variables - will turn off the refinement flag for all tagged parameters.
• Set Constrained variables - will constrain all tagged parameters and assign a single variable for refinement.
• Clear All Variables - will clear all refinement flags.
• Assign Variables and Save - will assign variable numbers to each unique parameter to be refined and close the Refinement Flag window.

The above Phase Panel shows the 'X' refinement flags active allowing the rigid body refinement to commence. These flags were set automatically when the rigid body position parameter were set to be refined. If these flags are turned off, it is likely that GENLES will crash.
• ## branches/sandbox/doc/expgui7.html

 r1150

EXPGUI, part 7 EXPGUI, part 8

A.7 Preferential Orientation Panel

A.8 Preferential Orientation Panel

The Preferential Orientation Panel is used to control parameters related

A.7.a March-Dollase

A.8.a March-Dollase

In this model one or more axes are designated

A.7.b Spherical harmonic

A.8.b Spherical harmonic

The spherical harmonic formulation, also referred to as an "orientation
Note: See TracChangeset for help on using the changeset viewer.