manual_part_2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
manual_part_2 [2009/08/26 13:57] – clare | manual_part_2 [2022/11/03 15:08] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 8 Keywords ====== | ||
+ | ===== 8.1 Data structures ===== | ||
+ | |||
+ | The following describes keyword dependencies. Trailing ‘…’ implies that more than one node of that type can be inserted under its parent. Items enclosed in square brackets are optional. Items beginning with a capital T corresponds to keyword groups analogous to complex types in XML. | ||
+ | |||
+ | Ttop | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Ttop_xdd | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tglobal | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [determine_values_from_samples] | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Txdd | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tcomm_1_2_phase_1_2 | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Txdd_scr | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tscr_1 | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Txdd_comm_1 | ||
+ | |||
+ | [[# | ||
+ | |||
+ | **Error! Hyperlink reference not valid.** | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tcomm_1 | ||
+ | |||
+ | [[# | ||
+ | |||
+ | // | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | [[# | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tcomm_2 | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tphase_1 | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tphase_2 | ||
+ | |||
+ | **Error! Hyperlink reference not valid.** | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tlebail | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tstr_details | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | // | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [//x// E] [//y// E] [//z// E] | ||
+ | |||
+ | [num_posns #] [rand_xyz !E] [inter !E] | ||
+ | |||
+ | [//occ// $atom E //beq// E]... | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Thkl_lat | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Trigid | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tout_record | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [out_eqn !E] | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | |||
+ | |||
+ | Tmin_r_max_r | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Tspace_group | ||
+ | |||
+ | [[# | ||
+ | |||
+ | |||
+ | |||
+ | Miscellanous | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | ===== 8.2 Alphabetical listing of keywords ===== | ||
+ | |||
+ | **[//a// E] [//b// E] [//c// E] [//al// E] [//be// E] [//ga// E]** | ||
+ | |||
+ | Lattice parameters in Angstroms and lattice angles in degrees. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | //adps// when used generates the //unn// atomic displacement parameters with considerations made for special positions. On termination of refinement the //adps// keyword is replaced with the //unn// parameters; see example AE1-ADPS.INP. Instead of using the //adps// keyword the //unn// parameters can be manually entered. | ||
+ | |||
+ | The //unn// matrix can be kept positive definite with the site dependent macro ADPs_Keep_PD; | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Signals that the associated phase is amorphous when calculating // | ||
+ | |||
+ | ** [// | ||
+ | |||
+ | Generates the un-normalized and normalized A and correlation matrices. If // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Appends site fractional coordinates in Cartesian or fractional coordinates respectively to the *.OUT file at the end of a refinement. For the case of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Appends bond lengths to the end of the *.OUT file at the end of refinement. A number corresponding to equivalent positions is appended to site names. | ||
+ | |||
+ | // | ||
+ | |||
+ | An example of bond lengths output is as follows: | ||
+ | |||
+ | Y1:0 O1:0 2.23143 | ||
+ | |||
+ | O2:0 2.23143 88.083 | ||
+ | |||
+ | O3:0 2.28045 109.799 99.928 | ||
+ | |||
+ | The first line gives the distance between the sites Y1 and O2. The first number in the second line gives the distance between sites Y1 and O2. The third number of 88.083 gives the angle between the vectors Y1 to O1 and Y1 to O2. The first number on the third line contains the distance between sites Y1 and O3. The second number in the third line contains the angle between the vectors Y1 to O3 and Y1 to O2. The third number in line three contains the angle between the vectors Y1 to O3 and Y1 to O1. Thus bond lengths correspond to the first number in each line and bond angles start from the second number. The numbers after the site name and after the ‘:’ character corresponds to the site equivalent position as found in the *.SG space group files found in the SG directory | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | See section 5.2 for a description of // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | ** [// | ||
+ | |||
+ | **// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines an atomic interaction with the name N between [[# | ||
+ | |||
+ | For // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | When // | ||
+ | |||
+ | // | ||
+ | |||
+ | atomic_interaction... | ||
+ | |||
+ | ai_exclude_eq_0 | ||
+ | |||
+ | ai_sites_1 Pb | ||
+ | |||
+ | ai_sites_1 “O1 O2” | ||
+ | |||
+ | the following interactions are considered: | ||
+ | |||
+ | Pb:0 and O1: | ||
+ | |||
+ | Pb:0 and O2: | ||
+ | |||
+ | where the number after the ‘:’ character corresponds to the equivalent positions of the sites. | ||
+ | |||
+ | // | ||
+ | |||
+ | **__Functions__** | ||
+ | |||
+ | The // | ||
+ | |||
+ | AI_R(#ri): Returns the distance between the current site and the atom defined with Ri = #ri. | ||
+ | |||
+ | AI_R_CM: A function of no arguments that returns the geometric center of the current atom and the atoms defined in $sites_2. | ||
+ | |||
+ | AI_Flatten(# | ||
+ | |||
+ | AI_Cos_Angle(# | ||
+ | |||
+ | AI_Angle(# | ||
+ | |||
+ | Examples BENZENE_AI1.INP, | ||
+ | |||
+ | // | ||
+ | |||
+ | atomic_interaction ai1 = | ||
+ | |||
+ | IF R < 3 THEN | ||
+ | |||
+ | (R-3)^2 | ||
+ | |||
+ | ELSE | ||
+ | |||
+ | 0 | ||
+ | |||
+ | ENDIF | ||
+ | |||
+ | ; | ||
+ | |||
+ | ai_exclude_eq_0 | ||
+ | |||
+ | ai_sites_1 C* | ||
+ | |||
+ | ai_sites_1 C* | ||
+ | |||
+ | ai_radius 3 | ||
+ | |||
+ | penalty = If(Cycle_Iter < 10, ai1, 0); | ||
+ | |||
+ | This example demonstrates anti-bumping between molecules for the first ten iterations of a [[# | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for writing //site// dependent details to file. See the keyword //out// for a description of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the full axial divergence model using the method of Cheary & Coelho (1998b). | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | The macro Full_Axial_Model simplifies the use of // | ||
+ | |||
+ | **[//bkg// [@] # # #...]** | ||
+ | |||
+ | Defines a Chebyshev polynomial where the number of coefficients are equal to the number of numeric values appearing after the //bkg// keyword. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | Parameter values used at the start of each refinement cycle are obtained from the end of the first refinement cycle. // | ||
+ | |||
+ | If // | ||
+ | |||
+ | Parameter values obtained at the end of each bootstrap refinement cycle is written to disk in binary format. These values are then read and processed at the end of the bootstrap process without actually storing all of the values in memory. Thus the bootstrap process has a small memory footprint. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines a site interaction with the name N between [[# | ||
+ | |||
+ | When either //from_N// or //to_N// are defined, the interactions between $site_1 and $site_2 are sorted by distance and only the interactions between the //from_N// and //to_N// are considered. | ||
+ | |||
+ | // | ||
+ | |||
+ | For example, the following could be used to iterate from the nearest atom to the third atom from a site called Si1: | ||
+ | |||
+ | str | ||
+ | |||
+ | site Si1... | ||
+ | |||
+ | site O1... | ||
+ | |||
+ | site O2... | ||
+ | |||
+ | site O3... | ||
+ | |||
+ | box_interaction Si1 O* to_N 2 !si1o = (R-2)^2; | ||
+ | |||
+ | penalty = !si1o; | ||
+ | |||
+ | In this example the nearest three oxygen atoms are soft constrained to a distance of 2 Angstroms by the use of the penalty function. Counting starts at zero and thus //to_N// is set to 2 to iterate up to the third nearest atom. | ||
+ | |||
+ | The wild card character ‘*’ used in “O*” means that sites with names starting with ‘O’ are considered. In addition to using the wild card character, the site names can be explicitly written within double quotation marks, for example: | ||
+ | |||
+ | box_interaction Si1 “O1 O2 O3” to_N 3 etc... | ||
+ | |||
+ | Interactions between Si1 and the three oxygen atoms O1, O2, O3 may not all be included, for example, if Si1 had as its nearest neighbours the following: | ||
+ | |||
+ | Si1 ↔ O1,1 at a distance of 1.0 Angstroms | ||
+ | |||
+ | Si1 ↔ O2,3 at a distance of 1.1 Angstroms | ||
+ | |||
+ | Si1 ↔ O2,1 at a distance of 1.2 Angstroms | ||
+ | |||
+ | Si1 ↔ O1,2 at a distance of 1.3 Angstroms | ||
+ | |||
+ | then two equivalent positions of site O1 and two equivalent positions of O2 are included in the interaction equation; thus no interaction between Si1-O3 is considered. To ensure that each of the three oxygens had Si1 included in an interaction equation then the following could be used: | ||
+ | |||
+ | box_interaction “O1 O2 O3” Si1 to_N 0 etc… | ||
+ | |||
+ | Thus the order of $site_1 and $site_2 is important when either from_N or to_N is defined. | ||
+ | |||
+ | The reserved parameters Ri and Break can also be used in interaction equations when either from_N or to_N is defined. Ri returns the index of the current interaction being operated on with the first interaction starting at Ri=0. | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Breaks the current [[# | ||
+ | |||
+ | Example ALVO4-GRS.INP demonstrates the use of // | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for applying the Brindley correction for spherical particles. The macro Apply_Brindley_Spherical_R_PD(R, | ||
+ | |||
+ | macro Apply_Brindley_Spherical_R_PD(R, | ||
+ | |||
+ | { | ||
+ | |||
+ | brindley_spherical_r_cm = (R) (PD); | ||
+ | |||
+ | } | ||
+ | |||
+ | R is the radius of the particle in cm and PD is the packing density, a number that is not updated and not refined. Here’s an example: | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | str | ||
+ | |||
+ | Apply_Brindley_Spherical_R_PD(R, | ||
+ | |||
+ | MVW(0,0,0) | ||
+ | |||
+ | str | ||
+ | |||
+ | Apply_Brindley_Spherical_R_PD(R, | ||
+ | |||
+ | MVW(0,0,0) | ||
+ | |||
+ | Note, that PD is incorporated by way of an equation definition for // | ||
+ | |||
+ | The Brindley correction can be applied to all phases including //xo_Is//. In the case of phases that do not have lattice parameters or sites then the User would need to enter values for // | ||
+ | |||
+ | xo_Is | ||
+ | |||
+ | Apply_Brindley_Spherical_R_PD(.002, | ||
+ | |||
+ | MVW(654, 230, 0) | ||
+ | |||
+ | phase_MAC 200 | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **// | ||
+ | |||
+ | **// | ||
+ | |||
+ | Calculates an aberration for capillary samples. and convolutes it into phase peaks. // | ||
+ | |||
+ | Use of // | ||
+ | |||
+ | Use of // | ||
+ | |||
+ | Both // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | The weight fraction w< | ||
+ | |||
+ | | < | ||
+ | |||
+ | The Brindley correction is a function of // | ||
+ | |||
+ | B< | ||
+ | |||
+ | where | ||
+ | |||
+ | LAC< | ||
+ | |||
+ | MAC< | ||
+ | |||
+ | This makes B< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Convergence is determined when the change in < | ||
+ | |||
+ | chi2_convergence_criteria = If(Cycle_Iter < 10, .001, .01); | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines // | ||
+ | |||
+ | (1 - ½// | ||
+ | |||
+ | that is convoluted into phase peaks. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | //cloud// allows for the tracking of atoms defined in $sites in three dimensions. It can be useful for determining the average positions of heavy atoms or rigid bodies during refinement cycles. For example, a dummy atom, “site X1” say, can be placed at the center of a benzene ring and then tracked as follows: | ||
+ | |||
+ | continue_after_convergence | ||
+ | |||
+ | … | ||
+ | |||
+ | cloud “X1” | ||
+ | |||
+ | cloud_population 100 | ||
+ | |||
+ | cloud_save SOME_FILE.CLD | ||
+ | |||
+ | On termination of refinement the CLD file is saved; it can be viewed using the rigid body editor of the GUI; see examples AE14-12.INP for a cloud example. // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | cloud_try_accept = And(Cycle, Mod(Cycle, 50); | ||
+ | |||
+ | cloud_try_accept = T == 10; | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | ** [// | ||
+ | |||
+ | Deletes temporary arrays used in intermediate calculations; | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Refinement is continued after convergence. Before continuing the following actions are performed: | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | Also, when // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | An integer defining the number of calculated data points per measured data point. It may be useful to increase this number when the measurement step is large. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Changes the attributes of the //I// parameter, for example, | ||
+ | |||
+ | xo_Is | ||
+ | |||
+ | default_I_attributes 0 min 0.001 val_on_continue 1 | ||
+ | |||
+ | Useful when randomising lattice parameters during Le Bail refinements with // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | degree_of_crystallinity = 100 | ||
+ | |||
+ | Get(crystalline_area)%%/ | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[//d// E //I// E]...** | ||
+ | |||
+ | Defines a phase type that uses d-spacing values for generating peak positions. //d// corresponds to the peak position in d-space in Å and //I// is the intensity parameter before applying any // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Errors for refined parameters (ESD' | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Can be a function of the reserved parameter D_spacing. Changes f< | ||
+ | |||
+ | ' E(eV) = 10^5 / (8.065541 Lambda(A)) | ||
+ | |||
+ | prm !detector_angle_in_radians = 7.77 Deg_on_2; | ||
+ | |||
+ | prm wavelength = 2 D_spacing Sin(detector_angle_in_radians); | ||
+ | |||
+ | prm energy_in_eV = 10^5 / (8.065541 wavelength); | ||
+ | |||
+ | pk_xo = 10^-3 energy_in_eV + zero; | ||
+ | |||
+ | d_spacing_to_energy_in_eV_for_f1_f11 = energy_in_eV; | ||
+ | |||
+ | See example ED_SI_STR.INP. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Excludes an x-axis region between #ex1 and #ex2. The macro " | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines // | ||
+ | |||
+ | Exp(Ln(0.001) //e / e//< | ||
+ | |||
+ | that is convoluted into phase peaks. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Determines the extra range to which hkls are generated. For TOF data // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Appends INP file details to $file during refinement with independent parameter values updated. The operation is performed every time a particular convergence gives the best Rwp. For example, suppose that at convergence the following was obtained: | ||
+ | |||
+ | Rwp: | ||
+ | |||
+ | 30 All prms appended to file in INP format | ||
+ | |||
+ | 20 All prms appended to file in INP format | ||
+ | |||
+ | 35 | ||
+ | |||
+ | 40 | ||
+ | |||
+ | 15 All prms appended to file in INP format | ||
+ | |||
+ | 18 | ||
+ | |||
+ | 10 All prms appended to file in INP format | ||
+ | |||
+ | 15 | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | //min_X// and //max_X// define the x-axis range of the fit_obj; if //min_X// is omitted then the fit_obj is calculated from the start of the x-axis; similarly if //max_X// is omitted then the fit_obj is calculated to the end of the x-axis. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[[# | ||
+ | |||
+ | **[[# | ||
+ | |||
+ | **[[# | ||
+ | |||
+ | If // | ||
+ | |||
+ | fourier_map_formula = Fobs; ‘ The default | ||
+ | |||
+ | fourier_map_formula = 2 Fobs - Fcalc; | ||
+ | |||
+ | Fobs corresponds to the obserbed structure moduli; in the powder data case Fobs is calculated from the Rietveld decomposition formula. Phases are determined from Fcalc. | ||
+ | |||
+ | Reflections that are missing from within the Ewald sphere are included with Fobs set to Fcalc. If // | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the FWHM of a Gaussian function to be convoluted into phase peaks. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used by the OpenGL viewer to display hkl planes, see the CeO2.STR file in the “Rigid” directory. Here are some examples: | ||
+ | |||
+ | str… | ||
+ | |||
+ | hkl_plane 1 1 1 | ||
+ | |||
+ | hkl_plane “2 -2 0” | ||
+ | |||
+ | ** [// | ||
+ | |||
+ | Defines a GRS interaction with a name of N between [[# | ||
+ | |||
+ | When either //from_N// or //to_N// are defined, the interactions between $site_1 and $site_2 are sorted by distance and only the interactions between the //from_N// and //to_N// are considered. | ||
+ | |||
+ | // | ||
+ | |||
+ | //qi// and //qj// corresponds to the valence charges used to calculate the Coulomb sum for the sites $site_1 and $site_2 respectively. | ||
+ | |||
+ | // | ||
+ | |||
+ | **[//hat// E [// | ||
+ | |||
+ | Defines the X-axis size of an impulse function that is convoluted into phase peaks. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines a phase type that uses hkls for generating peak positions. | ||
+ | |||
+ | // | ||
+ | |||
+ | < | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | h, k, l : Miller indices | ||
+ | |||
+ | m : | ||
+ | |||
+ | //d// and th2 : d and 2q values (not used by). | ||
+ | |||
+ | //I// : | ||
+ | |||
+ | If no // | ||
+ | |||
+ | For example, the following input segment: | ||
+ | |||
+ | xdd quartz.xdd | ||
+ | |||
+ | ... | ||
+ | |||
+ | hkl_Is | ||
+ | |||
+ | Hexagonal(4.91459, | ||
+ | |||
+ | space_group P_31_2_1 | ||
+ | |||
+ | will generate the following OUT file: | ||
+ | |||
+ | xdd quartz.xdd | ||
+ | |||
+ | ... | ||
+ | |||
+ | hkl_Is | ||
+ | |||
+ | Hexagonal(4.91459, | ||
+ | |||
+ | space_group P_31_2_1 | ||
+ | |||
+ | load hkl_m_d_th2 I | ||
+ | |||
+ | { | ||
+ | |||
+ | 1 0 0 6 4.25635 20.85324 @ 3147.83321 | ||
+ | |||
+ | 1 0 1 6 3.34470 26.62997 @ 8559.23955 | ||
+ | |||
+ | 1 0 -1 6 3.34470 26.62997 @ 8559.23955 | ||
+ | |||
+ | ... | ||
+ | |||
+ | } | ||
+ | |||
+ | The Create_hklm_d_Th2_Ip_file macro creates an hkl file listing from structures in the same format as the "load hkl_m_d_th2 I" as shown above. Even though the structure would have no sites, the // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The maximum number of refinement iterations, //iters// is set to 500000 by default | ||
+ | |||
+ | **[//lam// [// | ||
+ | |||
+ | **[//la// E //lo// E [//lh// E] | [//lg// E]]...** | ||
+ | |||
+ | Defines an emission profile where each " | ||
+ | |||
+ | //la//: Area under the emission profile line | ||
+ | |||
+ | //lo//: Wavelength in [Å] of the emission profile line | ||
+ | |||
+ | //lh//: HW in mÅ of a Lorentzian convoluted into the emission profile line. | ||
+ | |||
+ | //lg//: HW in mÅ of a Gaussian convoluted into the emission profile line. | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | //Lam// defines the value to be used for the reserved parameter Lam. When //Lam// is not defined then the reserved parameter Lam is defined as the wavelength of the emission profile line with the largest //la// values. Note that //Lam// is used to determine the Bragg angle. | ||
+ | |||
+ | // | ||
+ | |||
+ | See section 6 for a description of emission profiles. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | A 1 for the //lebail// keyword flags the use of the Le Bail method for peak intensity extraction. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the FWHM of a Lorentzian function that is convoluted into phase peaks. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **// | ||
+ | |||
+ | **// | ||
+ | |||
+ | Calculates an aberration for a Linear Position Sensitive Detector and convolutes it into phase peaks. // | ||
+ | |||
+ | The // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Allows for changing the Marquardt constants, the Simulated_Annealing_1 macro changes the Marquardt constants as follows: | ||
+ | |||
+ | load marquardt_constant { 0 1 } | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the minimum and maximum radii for calculating bond lengths. //min_r// and //max_r// are by default set to 0 and 3.2 Å respectively. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Calculates the density of the mixture assuming a packing density of 1, see also // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Calculates the mass absorption coefficient in cm< | ||
+ | |||
+ | < | ||
+ | |||
+ | The following example provides phase and mixture mass absorption coefficients. | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | mixture_MAC 0 | ||
+ | |||
+ | str... | ||
+ | |||
+ | phase_MAC 0 | ||
+ | |||
+ | The macros Mixture_LAC_1_on_cm, | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | Mixture_LAC_1_on_cm(0) | ||
+ | |||
+ | str... | ||
+ | |||
+ | Phase_Density_g_on_cm3(0) | ||
+ | |||
+ | Phase_LAC_1_on_cm(0) | ||
+ | |||
+ | Errors for these quantities are also calculated. Mass absorption coefficients obtained from NIST at [[http:// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Signals the use of neutron atomic scattering lengths.Scattering lengths for isotopes can be used by placing the isotope name after “// | ||
+ | |||
+ | occ 6Li 1 | ||
+ | |||
+ | occ 36Ar 1 | ||
+ | |||
+ | The scattering lengths data, contained in the file NEUTSCAT.CPP, | ||
+ | |||
+ | www.ccp14.ac.uk/ | ||
+ | |||
+ | Constant wavelength neutron diffraction requires a Lorentz correction using the Lorentz_Factor macro (defined in TOPAS.INC); it is defined as follows: | ||
+ | |||
+ | scale_pks = 1 / (Sin(Th)^2 Cos(Th)); | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Surpresses [[# | ||
+ | |||
+ | **[// | ||
+ | |||
+ | If defined then site fractional coordinates are normalized. Normalization of a particular fractional coordinate does not occur if it has // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Returns the numerically calculated area under the phase. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | In the present implementation $sites are thought of as spheres with a radius // | ||
+ | |||
+ | occ_xyz = 1 / (1 + Intersection fractional volumes) | ||
+ | |||
+ | In this way any number of sites can be merged. | ||
+ | |||
+ | Sites appearing in $sites cannot have their occupancies refined. On termination of refinement the //occ// parameter values are updated with their corresponding occ_xyz. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Allows for the filtering of hkls using the reserved parameter names of H, K, L and D_spacing. More than one omit_hkls can be defined, for example: | ||
+ | |||
+ | omit_hkls = If(And(H==0, | ||
+ | |||
+ | omit_hkls = And(H==0, K==1); | ||
+ | |||
+ | omit_hkls = D_spacing < 1; | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines // | ||
+ | |||
+ | (4 ½// | ||
+ | |||
+ | that is convoluted into phase peaks. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Instructs the minimization procedure to minimize on penalty functions only. The // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | out_A_matrix file.a | ||
+ | |||
+ | A_matrix_prm_filter q* | ||
+ | |||
+ | **[//out// $file [// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for writing parameter details to a file. The details are appended to $file when //append// is defined. //out_eqn// defines the equation or parameter to be written to $file using the // | ||
+ | |||
+ | Both //out_fmt// and // | ||
+ | |||
+ | The following example illustrates the use of //out// using the Out macros. | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | out " | ||
+ | |||
+ | str... | ||
+ | |||
+ | CS_L(cs_l, 1000) | ||
+ | |||
+ | Out_String(" | ||
+ | |||
+ | Out_String(" | ||
+ | |||
+ | Out(cs_l, " | ||
+ | |||
+ | " | ||
+ | |||
+ | //out// provides a means of defining individual refinement result files, see example OUT-1.INP. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Outputs a list of R< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Outputs refined parameter values per iteration or on convergence into the file $file. In the absence of // | ||
+ | |||
+ | out_prm_vals_per_iteration PRM_VALES.TXT | ||
+ | |||
+ | out_prm_vals_filter "* !u*" | ||
+ | |||
+ | More than one // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Sets the peak type for a phase. The following // | ||
+ | |||
+ | | **Peak type** | **$type** | **Parameters** | | ||
+ | | Fundamental Parameters | fp | | | ||
+ | | Pseudo-Voigt | pv | [//pv_lor E pv_fwhm E//] //pv_lor// is the Lorentzian fraction of the peak profile(s). //pv_fwhm// is the FWHM of the peak profile(s). | | ||
+ | | Split-PearsonVII | spvii | [//h1// E //h2// E //m1// E //m2// E] The sum of //h1// and //h2// gives the FWHM of the composite peak. //m1, m//2 are the PearsonVII exponents of the left and right composite peak, respectively. | | ||
+ | | Split-PseudoVoigt | spv | [//spv_h1// E //spv_h2// E //spv_l1// E //spv_l2// E] The sum of //spv_h1// and //spv_h2// gives the full width at half maximum of the composite peak. //spv_l1, spv_l2//: the Lorentzian fractions of the left and right composite peak, respectively. | | ||
+ | |||
+ | **[// | ||
+ | |||
+ | As the shapes of phase peaks do not change significantly over a short 2q range, a new peak shape is calculated only if the position of the last peak shape calculated is more than the distance defined by // | ||
+ | |||
+ | The reserved parameter names of H, K, L, M or parameter names associated with the keywords // | ||
+ | |||
+ | When defined // | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines a penalty function that can be a function of other parameters. Penalties are useful for stabilizing refinements as in for example their use in bond-length restraints. | ||
+ | |||
+ | Example HOCK.INP uses penalties to minimize on the Hock and Schittkowski problem number 65 function. | ||
+ | |||
+ | prm x1 1 min -4.5 max 4.5 val_on_continue = Rand(-4.5, 4.5); del .01 | ||
+ | |||
+ | prm x2 1 min -4.5 max 4.5 val_on_continue = Rand(-4.5, 4.5); del .01 | ||
+ | |||
+ | prm x3 1 min -5.0 max 5.0 val_on_continue = Rand(-5.0, 5.0); del .01 | ||
+ | |||
+ | |||
+ | |||
+ | ' Hock and Schittkowski problem number 65 function | ||
+ | |||
+ | penalty = (x1-x2)^2 + (1/9) (x1 + x2 - 10)^2 + (x3 - 5)^2; : 0 | ||
+ | |||
+ | |||
+ | |||
+ | prm contraint_1 = x1^2 + x2^2 + x3^2; | ||
+ | |||
+ | penalty = If(contraint_1 < 48, 0, (contraint_1-48)^2); | ||
+ | |||
+ | The next example applies a User defined penalty function to lattice and crystallite size parameters, which are expected to be 5.41011 Å and 200 nm respectively: | ||
+ | |||
+ | str... | ||
+ | |||
+ | Cubic(lp_ceo2 5.41011) | ||
+ | |||
+ | penalty = (lp_ceo2-5.41011)^2; | ||
+ | |||
+ | CS_L(cs_l, 200) | ||
+ | |||
+ | penalty =(cs_l-200)^2; | ||
+ | |||
+ | Minimizing on penalty functions in the presence of observed data is possible with the use of the // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the weighting K< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the percentage of the A matrix than can be zero before sparse matrix methods are invoked. The default value is 60%. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Calculates the mass absorption coefficient in cm< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for writing phase dependent details to file. See the keyword //out// for a description of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Provides a mechanism for transforming peak position to an x-axis position. For example, the peak position for neutron time-of-flight data is typically calculated in time-of-flight space, tof, or: | ||
+ | |||
+ | tof = t0 + t1 d< | ||
+ | |||
+ | where t0 and t1 and t2 are diffractometer constants. //pk_xo// can be used to refine TOF data as shown in examples TOF_Balzar_sh1.inp and TOF_Balzar_br1.inp. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The name given to a phase; used for reporting purposes. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | < | ||
+ | |||
+ | #h, #k, #l are user defined hkls; they are used for formulating the phase penalties. #Re and #Im are the real and imaginary parts of < | ||
+ | |||
+ | penalty = pp1; | ||
+ | |||
+ | phase_penalties * pp1 | ||
+ | |||
+ | load hkl_Re_Im | ||
+ | |||
+ | { | ||
+ | |||
+ | 0 1 2 1 0 | ||
+ | |||
+ | 1 0 -2 1 0 | ||
+ | |||
+ | 1 -2 -1 1 0 | ||
+ | |||
+ | } | ||
+ | |||
+ | hkls chosen for phase penalties should comprise those that are of high intensity, large d-spacing and isolated from other peaks to avoid peak overlap. Origin defining hkls are typically chosen. | ||
+ | |||
+ | // | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 10 | ||
+ | |||
+ | ...move_to_the_next_temperature_regardless_of_the_change_in_rwp | ||
+ | |||
+ | accumulate_phases_and_save_to_file SOME_FILE.TXT | ||
+ | |||
+ | accumulate_phases_when = T == 10; | ||
+ | |||
+ | Here phases with the best Rwp since the last accumulation are accumulated when the current temperature is 10. | ||
+ | |||
+ | ** [// | ||
+ | |||
+ | Displays process times on termination of refinement. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | * If parameters are not reinstated using // | ||
+ | * The degree of parameter randomization increases with increasing values of // | ||
+ | |||
+ | // | ||
+ | |||
+ | In most refinements the following will produce close to the lowest < | ||
+ | |||
+ | quick_refine .1 | ||
+ | |||
+ | quick_refine_remove = | ||
+ | |||
+ | IF QR_Removed THEN | ||
+ | |||
+ | 0 ' reinstate the parameter | ||
+ | |||
+ | ELSE | ||
+ | |||
+ | IF QR_Num_Times_Consecutively_Small > 2 THEN | ||
+ | |||
+ | 1 ' remove the parameter | ||
+ | |||
+ | ELSE | ||
+ | |||
+ | 0 ' dont remove the parameter | ||
+ | |||
+ | ENDIF | ||
+ | |||
+ | ENDIF; | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Randomizes the calculated pattern Y< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | If // | ||
+ | |||
+ | %%|%%**u**%%|%% = T // | ||
+ | |||
+ | where T is the current // | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | site . . . occ 1 C beq 1 rand_xyz = Rand(0,1); | ||
+ | |||
+ | Note that only fractional coordinates (//x//, //y//, //z//) that are independent parameters are randomized. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Reports on the R-Bragg value. R-Bragg is independent of hkl's and thus can be calculated for all phase types that contain phase peaks. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | //rigid// defines a rigid body and associated translation and rotation operations. These operations are capable of creating and manipulating rigid bodies with hinges (torsion angles). | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | * E can be an equation, constant or a parameter name with a value. | ||
+ | * $atom_1 specifies the site that the new Z-matrix point represents. | ||
+ | * The E after $atom_2 specifies the distance in Å between $atom_2 and $atom_1. $atom_2 must exist if $atom_1 is preceded by at least one point. | ||
+ | * The E $atom_3 specifies the angle in degrees between $atom_3-$atom_2- $atom_1. $atom_3 must exist if $atom_1 is preceded by at least two points. | ||
+ | * The E $atom_4 specifies the dihedral angle in degrees between the plane formed by $atom_3-$atom_2-$atom_1 and the plane formed by $atom_4-$atom_3-$atom_2. This angle is drawn using the right hand rule with the thumb pointing in the direction $atom_3 to $atom_2. $atom_4 must exist if $atom_1 is preceded by at least three sites of the rigid body. | ||
+ | * If $atom_1 is the first point of the rigid body then it is placed at Cartesian (0, 0, 0). If $atom_1 is the second point of the rigid body then it is placed on the positive z-axis at Cartesian (0, 0, E) where E corresponds to the E in [$atom_2 E]. If $atom_1 is the third point of the rigid body then it is placed in the x-y plane. | ||
+ | |||
+ | //rotate// rotates // | ||
+ | |||
+ | // | ||
+ | |||
+ | If // | ||
+ | |||
+ | //rotate// and // | ||
+ | |||
+ | When // | ||
+ | |||
+ | // | ||
+ | |||
+ | See section 7.10 for a description of rigid bodies. | ||
+ | |||
+ | **[//Rp// #] [//Rs// #]** | ||
+ | |||
+ | Defines the primary and secondary radius of the diffractometer in mm. The default is 217.5 mm. | ||
+ | |||
+ | **[//r_p// #] [// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | //xdd// dependent or global refinement indicators. Keywords ending in “_dash” correspond to background subtracted values, see section 5.6. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The Rietveld scale factor, can be applied to all phase types . | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for applying intensity corrections to phase peaks. The following example defines a Lorentz-Polarisation correction: | ||
+ | |||
+ | scale_pks = (1+Cos(c Deg)^2 Cos(2 Th)^2)%%/ | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Initialises the random number generator with a seed based on the computer clock. | ||
+ | |||
+ | **[//site// $site [//x// E] [//y// E] [//z// E] ]...** | ||
+ | |||
+ | **[//occ// $atom E [//beq// E]]...** | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines a site where $site is a User defined string used to identify the site. | ||
+ | |||
+ | //x//, //y//, and //z// defines the fractional atomic coordinates, | ||
+ | |||
+ | //occ// and //beq// defines the site occupancy factor and the equivalent isotropic temperature factor beq. $atom corresponds to a valid atom symbol or isotope the data of which is contained in the file ATMSCAT.CPP for x-ray data and NEUTSCAT.CPP for // | ||
+ | |||
+ | // | ||
+ | |||
+ | //inter// corresponds to the sum of all GRS interactions which are a function of the //site//. The value of //inter// can represent the site electrostatic potential depending on the type of GRS interactions defined. | ||
+ | |||
+ | Definition of a site fully occupied by aluminium: | ||
+ | |||
+ | site Al1 x 0 y 0 z 0.3521 occ Al+3 1 beq 0.3 | ||
+ | |||
+ | Definition of a site occupied by two cations: | ||
+ | |||
+ | site Fe2 x 0.9283 y 0.25 z 0.9533 occ Fe+3 0.5 beq 0.25 | ||
+ | |||
+ | occ Al+3 0.5 beq 0.25 | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | When used in equations the name N of // | ||
+ | |||
+ | N of // | ||
+ | |||
+ | < | ||
+ | |||
+ | where tol corresponds to // | ||
+ | |||
+ | #eq, #n1, #n2 and #n3 correspond to the site equivalent position and fractional offsets to add to the sites. This is useful if the structure is already known and constraints are required, for example, in the bond length output (see // | ||
+ | |||
+ | Zr1:0 O1:20 0 0 -1 2.08772 | ||
+ | |||
+ | O1:7 0 -1 0 2.08772 89.658 | ||
+ | |||
+ | O1:10 0 0 -1 2.08772 90.342 90.342 | ||
+ | |||
+ | O1:15 -1 0 0 2.08772 180.000 89.658 89.658 | ||
+ | |||
+ | O1:18 -1 0 0 2.08772 90.342 89.658 180.000 90.342 | ||
+ | |||
+ | |||
+ | |||
+ | P1:0 O1:4 0 0 0 1.52473 | ||
+ | |||
+ | O1:8 0 0 0 1.52473 112.923 | ||
+ | |||
+ | O1:0 0 0 0 1.52473 112.923 112.923 | ||
+ | |||
+ | O2:0 0 0 0 1.59001 105.749 105.749 105.749 | ||
+ | |||
+ | Example constraints using macros could look like the following: | ||
+ | |||
+ | Angle_Restrain(O1 P1 O1 8, 112, 112.92311, 0, 0.001) | ||
+ | |||
+ | Angle_Restrain(O1 18 -1 0 0 Zr1 O1 10 0 0 -1, 89, 89.65750, 0, 0.001) | ||
+ | |||
+ | Distance_Restrain(Zr1 O1 20 0 0 -1, 2.08, 2.08772, 0, 1) | ||
+ | |||
+ | BENZENE.INP demonstrates the use of the restraint macros Distance_Restrain, | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | sites_geometry some_name | ||
+ | |||
+ | load site_to_restrain { C1 C2 C3 C4 } | ||
+ | |||
+ | Three functions, Sites_Geometry_Distance($Name), | ||
+ | |||
+ | If $Name contains only two sites then only Sites_Geometry_Distance($Name) can be used. Three sites defined additionally allows the use of Sites_Geometry_Angle($Name) and four sites defined additionally allows the use of Sites_Geometry_Dihedral_Angle($Name). | ||
+ | |||
+ | Examples SITES_GEOMETRY_1.INP and SITES_GEOMETRY_2.INP demonstartes the use of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the S< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Performs a Savitzky-Golay smoothing on the observed data. The smoothing encompasses (2 * # | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines a hkl dependent symmetrized spherical harmonics series (see section 7.9.2). $name defines the name given to the series and when used in equations it returns the value of the spherical harmonics series. | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | The PO_Spherical_Harmonics macro simplifies the use of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines hat sizes for generating an aberration function comprising a summation of hat functions. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the start and finish X region to fit to. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines a new structure node. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines a parameter name and a vector normal to the plane defined by h, k and l. When the parameter name is used in an equation, it returns angles (in radians) between itself and the normal to the planes defined by hkls; see the Preferred_Orientation and PO_Two_Directions macros. An example in two directions is as follows: | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | // | ||
+ | |||
+ | While // | ||
+ | |||
+ | k = 0 | ||
+ | |||
+ | Do | ||
+ | |||
+ | Randomize the cation configuration according to // | ||
+ | |||
+ | Find the local minimum of < | ||
+ | |||
+ | k = k + 1 | ||
+ | |||
+ | If < | ||
+ | |||
+ | While < | ||
+ | |||
+ | } | ||
+ | |||
+ | Starting from a particular cation configuration, | ||
+ | |||
+ | Swapping the Zr sites with and Ca sites in the example above can be performed as follows: | ||
+ | |||
+ | swap_sites Ca Zr | ||
+ | |||
+ | If the sites were named Ca1, Ca2, Ca3, Zr1, Zr2, Zr3 then the following could be used: | ||
+ | |||
+ | swap_sites Ca* Zr* | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | A temperature regime has no affect unless the reserved parameter name T is used in // | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | // | ||
+ | |||
+ | The reserved parameter T returns the current temperature and it can be used in equations and in particular the // | ||
+ | |||
+ | If < | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | The temperature regime as defined in the macro Auto_T is sufficient for most problems. | ||
+ | |||
+ | A typical temperature regime starts with a high value and then a series of annealing temperatures, | ||
+ | |||
+ | temperature 2 | ||
+ | |||
+ | move_to_the_next_temperature_regardless_of_the_change_in_rwp | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | If the current temperature is the last one defined (the fourth one), and < | ||
+ | |||
+ | The current temperature can be used in all equations using the reserved parameter T, for example: | ||
+ | |||
+ | x @ 0.123 val_on_continue = Val + T Rand(-.1, .1) | ||
+ | |||
+ | The following temperature regime will allow parameters to randomly walk for the first temperature. At the second temperature the parameters are reset to those that gave the "best solution" | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 1 use_best_values | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 1 use_best_values | ||
+ | |||
+ | temperature 1 | ||
+ | |||
+ | temperature 10 | ||
+ | |||
+ | save_values_as_best_after_randomization | ||
+ | |||
+ | move_to_the_next_temperature_regardless_of_the_change_in_rwp | ||
+ | |||
+ | Note, that when a "best solution" | ||
+ | |||
+ | The following will continuously use the "best solution" | ||
+ | |||
+ | temperature 1 use_best_values | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for applying 2q corrections to phase peaks. The following example applies a sample displacement correction: | ||
+ | |||
+ | th2_offset = -2 Rad (c) Cos(Th) / Rs; | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | While // | ||
+ | |||
+ | k = 0 | ||
+ | |||
+ | Do | ||
+ | |||
+ | Change the cation configuration according to // | ||
+ | |||
+ | Find the local minimum of < | ||
+ | |||
+ | If < | ||
+ | |||
+ | k = k + 1 | ||
+ | |||
+ | While < | ||
+ | |||
+ | } | ||
+ | |||
+ | The number of possible cation configurations determines the approximate magnitude of a structure determination problem. A structure consisting of N< | ||
+ | |||
+ | N< | ||
+ | |||
+ | where the notation < | ||
+ | |||
+ | N< | ||
+ | |||
+ | An additional two D sites, or, N< | ||
+ | |||
+ | Here is an example of using // | ||
+ | |||
+ | str... | ||
+ | |||
+ | site Ca... | ||
+ | |||
+ | site Ca... | ||
+ | |||
+ | site Ca... | ||
+ | |||
+ | site Zr... | ||
+ | |||
+ | site Zr... | ||
+ | |||
+ | // | ||
+ | |||
+ | N< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | User defined convolutions are convoluted into phase peaks and can be a function of X. The // | ||
+ | |||
+ | str | ||
+ | |||
+ | prm k 10 min 0.001 max 100 | ||
+ | |||
+ | user_defined_convolution = | ||
+ | |||
+ | If(Abs(X) < 10^(-10), 1, (Sin(k X) %%/(%%k X))^2); | ||
+ | |||
+ | min -3 max 3 | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Forces the use of Laboratory tube anomalous dispersion coefficients instead of the more accurate data from http:// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | A value of 1 (the default) instructs the kernel to output in a verbose manner. | ||
+ | |||
+ | A value of 0 reduces kernel output such that text output is only initiated at the end of a [[# | ||
+ | |||
+ | A value of -1 reduces kernel output such that text output is initiated every second and only Rwp values at the end of a refinement cycle is kept. | ||
+ | |||
+ | The Simulated_Annealing_1 macro has //verbose// set to -1; this ensures that long simulated annealing runs do not exhaust memory due to saving Rwp values and text output buffers. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Informs a driver GUI to display the structure. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for calculating the //xdd// dependent weighting function in< | ||
+ | |||
+ | weighting = 1 / Max(Yobs, 1); | ||
+ | |||
+ | In cases where // | ||
+ | |||
+ | Note that some goodness of fit indicators such as //r_wp// are a function of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Determines the amorphous content in a sample. The phase dependent keyword of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Calculation step used in the generation of phase peaks and // | ||
+ | |||
+ | For and x-axis with equal steps and // | ||
+ | |||
+ | Peak_Calculation_Step = “Observed data step size” / // | ||
+ | |||
+ | otherwise | ||
+ | |||
+ | Peak_Calculation_Step = // | ||
+ | |||
+ | // | ||
+ | |||
+ | x_calculation_step .01 | ||
+ | |||
+ | x_calculation_step = .02 (1 + Tan(Th)); | ||
+ | |||
+ | x_calculation_step = Yobs_dx_at(Xo); | ||
+ | |||
+ | **[//xdd// $file %%[{%% $data }] [//range// #] [// | ||
+ | |||
+ | Defines the start of //xdd// dependent keywords and the file containing the observed data. | ||
+ | |||
+ | {$data} allow for insertion of ASCII data directly into the INP file. | ||
+ | |||
+ | //range// applies to Bruker AXS *.RAW data files; in multi-range files it defines the range to be refined with the first range starting at 1. //range// is set to 1 by default. | ||
+ | |||
+ | xye_format (see section 10 as well) signals the loading of columns of x, y and error values; additional columns are ignored. gsas_format and fullprof_format signals the loading of GSAS and FullProf file formats. | ||
+ | |||
+ | The following instruction will refine on the first range in the data file pbso4.raw: | ||
+ | |||
+ | xdd pbso4.raw | ||
+ | |||
+ | To following will refine on the third range: | ||
+ | |||
+ | xdd pbso4.raw range 3 | ||
+ | |||
+ | To read data directly from an INP file, the following can be used: | ||
+ | |||
+ | xdd { | ||
+ | |||
+ | 1 1 10 ' start, step and finish (equidistant data) | ||
+ | |||
+ | 1 2 3 4 5 6 7 8 9 10 | ||
+ | |||
+ | } | ||
+ | |||
+ | // // | ||
+ | |||
+ | xdd { | ||
+ | |||
+ | _xy ' switch indicating x-y format | ||
+ | |||
+ | 0.1 1 0.2 2 ... | ||
+ | |||
+ | } | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for writing //xdd// dependent details to file. The // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | %%|%%F< | ||
+ | |||
+ | // | ||
+ | |||
+ | An example input segment for single crystal data refinement is as follows: | ||
+ | |||
+ | xdd_scr ylidm.hkl | ||
+ | |||
+ | MoKa2(0.001) | ||
+ | |||
+ | finish_X 35 | ||
+ | |||
+ | weighting = 1 / (Sin(X Deg / 2) Max(1, Yobs)); | ||
+ | |||
+ | STR(P212121) | ||
+ | |||
+ | a 5.9636 | ||
+ | |||
+ | b 9.0390 | ||
+ | |||
+ | c 18.3955 | ||
+ | |||
+ | scale @ 1.6039731906 | ||
+ | |||
+ | i_on_error_ratio_tolerance 4 | ||
+ | |||
+ | site S1 x @ 0.8090 y @ 0.1805 z @ 0.7402 occ S 1 beq 2 | ||
+ | |||
+ | site O1 x @ 0.0901 y @ 0.8151 z @ 0.2234 occ O 1 beq 2 | ||
+ | |||
+ | ... | ||
+ | |||
+ | The SCR format is white space delimited and consists of entries of h, k, l, m, d, 2q, F< | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[//xo// E //I// E]...** | ||
+ | |||
+ | Defines a phase type that uses x-axis space for generating peak positions, see example XOIS.INP. //xo// corresponds to the peak position and //I// is the intensity parameter before applying any // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The keyword // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Outputs the observed, calculated and difference patterns respectively in a format as specified in the extension of $file. Extensions *.xy, *.scr, *.xdd are supported. Further formats are accommodated using any number of macros including Out_Yobs_Ycalc_and_Difference, | ||
+ | |||
+ | **[****// | ||
+ | |||
+ | At the start of refinement // | ||
+ | |||
+ | If the distance between two hkls is less than the value of // | ||
+ | |||
+ | yobs_to_xo_posn_yobs = Peak_Calculation_Step; | ||
+ | |||
+ | // | ||
+ | |||
+ | It is important to determine and then fix all peak shape, zero error and lattice parameters before using yobs_to_xo_posn_yobs. Also, if the original diffraction pattern is noisy then it may be best to smooth it using the //smooth// keyword or re-binned using // | ||
+ | |||
+ | Note that structure solution can be speed up by preventing graphical output or by increasing the Graphics Response Time in the GUI. | ||
+ | |||
+ | See examples CIME-DECOMPOSE.INP and PBSO4-DECOMPOSE.INP. | ||
+ | |||
+ | ===== 8.3 Keywords to simplify User input ===== | ||
+ | |||
+ | ==== 8.3.1 The "load { }" keyword and attribute equations ==== | ||
+ | |||
+ | The "// | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | exclude 20 22 | ||
+ | |||
+ | exclude 32 35 | ||
+ | |||
+ | exclude 45 47 | ||
+ | |||
+ | can be rewritten using "// | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | load exclude { 20 22 32 35 45 47 } | ||
+ | |||
+ | This input can be further simplified using the Exclude macro: | ||
+ | |||
+ | Exclude { 20 22 32 35 45 47 } | ||
+ | |||
+ | In some cases attribute equations are loaded by the parameter itself. For example, in the following: | ||
+ | |||
+ | prm t 0.01 val_on_continue = Rand(-Pi, Pi); min 0.4 max 0.5 | ||
+ | |||
+ | the //prm// will actually load the attribute. But, in the following: | ||
+ | |||
+ | load prm val_on_continue min max { t 0.01 = Rand(-Pi, Pi); 0.4 0.5 } | ||
+ | |||
+ | the //load// keyword will load the attributes. | ||
+ | |||
+ | The following is valid: | ||
+ | |||
+ | load sh_Cij_prm | ||
+ | |||
+ | { | ||
+ | |||
+ | y00 !sh_c00 1 | ||
+ | |||
+ | y20 sh_c20 0.26202642 min 0 max 1 | ||
+ | |||
+ | y40 sh_c40 0.06823548 | ||
+ | |||
+ | ... | ||
+ | |||
+ | } | ||
+ | |||
+ | In this case the //load// keyword does not contain //min/max// and the parameter will load its attributes. The //load// keyword however can contain attributes, for example: | ||
+ | |||
+ | load sh_Cij_prm min max | ||
+ | |||
+ | { | ||
+ | |||
+ | y00 !sh_c00 1 0 1 | ||
+ | |||
+ | y20 sh_c20 0.26202642 0 1 | ||
+ | |||
+ | y40 sh_c40 0.06823548 0 1 | ||
+ | |||
+ | ... | ||
+ | |||
+ | } | ||
+ | |||
+ | In this case the attributes must be entered for all //load// entries. | ||
+ | |||
+ | ==== 8.3.2 The " | ||
+ | |||
+ | The //move_to// keyword provides a means of entering parameter attributes without having to first load the parameter name and value, see for example the Keep_Atom_Within_Box macro. The site dependent ADPs_Keep_PD macro defines //min/max// limits; here's part of that macro: | ||
+ | |||
+ | move_to u12 | ||
+ | |||
+ | min = -Sqrt(Get(u11) Get(u22)); | ||
+ | |||
+ | max = Sqrt(Get(u11) Get(u22)); | ||
+ | |||
+ | The $keyword of //move_to// can be any keyword and not just a parameter keyword. | ||
+ | |||
+ | ==== 8.3.3 The "for xdds { }" and "for strs { }" constructs ==== | ||
+ | |||
+ | The “//for// //xdds// { }” and "// | ||
+ | |||
+ | |||
+ | |||
+ | | xdd ... | ‘ first //xdd// | | ||
+ | | bkg ... \\ th2_offset ... \\ ... | ‘ //xdd// dependent, __not common__ to the // | ||
+ | | str... | ‘ first //str// | | ||
+ | | scale ... \\ ... | ‘ //str// dependent, __not common__ to the // | ||
+ | | xdd ... | ‘ second //xdd// | | ||
+ | | bkg ... \\ th2_offset ...\\ ... | ‘ //xdd// dependent, __not common__ to the // | ||
+ | | str... | ‘ second //str// | | ||
+ | | scale ... \\ ... | ‘ //str// dependent, __not common__ to the // | ||
+ | | for xdds { | | | ||
+ | | Slit_Width(.2)\\ CuKa2\\ ... | ‘ //xdd// dependent, __common__ to the // | ||
+ | | for strs { | ‘ //str// dependent, __common__ to the // | ||
+ | | ... | | | ||
+ | | } | | | ||
+ | | for strs 1 to 1 { | | | ||
+ | | space_group p1\\ site ... | ‘ //str// dependent, __specific__ to the __first__ //str// | | ||
+ | | } | | | ||
+ | | } | | | ||
+ | |||
+ | For obvious reasons, parameters should not be given the @ name within //for// constructs. The effect this would have is to give unique parameter names to the parameters iterated over; the output file would contain the parameter value corresponding to the last “//for xdds//” or “//for strs//” iteration. | ||
+ | |||
+ | ====== 9 Macros and Include Files ====== | ||
+ | |||
+ | INP files are pre-processed. The pre-processor comprises directives beginning with the character # and macros. Macros are used for grouping keywords. The directives are of two types, global directives and directives that are invoked on macro expansion, they are: | ||
+ | |||
+ | Directives with global scope | ||
+ | |||
+ | macro $user_defined_macro_name { … } | ||
+ | |||
+ | #include $user_defined_macro_file_name | ||
+ | |||
+ | # | ||
+ | |||
+ | #define, #undef, #ifdef, #ifndef, #else, #endif | ||
+ | |||
+ | Directives invoked on macro expansion | ||
+ | |||
+ | #m_ifarg, #m_else, #m_endif | ||
+ | |||
+ | #m_code, #m_eqn, # | ||
+ | |||
+ | #m_argu, # | ||
+ | |||
+ | ===== 9.1 The macro directive ===== | ||
+ | |||
+ | Macros are defined using the macro directive; here's an example: | ||
+ | |||
+ | macro Cubic(cv) | ||
+ | |||
+ | { | ||
+ | |||
+ | a cv | ||
+ | |||
+ | b = Get(a); | ||
+ | |||
+ | c = Get(a); | ||
+ | |||
+ | } | ||
+ | |||
+ | Macros can have multiple arguments or none at all; the Cubic macro above has one argument; here are some examples of the use of Cubic: | ||
+ | |||
+ | Cubic(4.50671) | ||
+ | |||
+ | Cubic(a_lp 4.50671 //min// 4.49671 //max// 4.52671) | ||
+ | |||
+ | Cubic(!a_lp 4.50671) | ||
+ | |||
+ | The first instance defines the //a//, //b// and //c// lattice parameters without a parameter name. The second defines the lattice parameters with a name indicating refinement of the a_lp parameter. In the third example, the a_lp parameter is preceded by the character !. This indicates that the a_lp parameter is not to be refined; it can however be used in equations. The definition of macros need not precede its use. For example, in the segment: | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | Emission_Profile ' this is expanded | ||
+ | |||
+ | macro Emission_Profile { CuKa2(0.001) } | ||
+ | |||
+ | Emission_Profile is expanded to " | ||
+ | |||
+ | Macro names need not be unique; in cases where more than one macro have the same name then the actual macro expanded is determined by the number of arguments. For example, if the macro Slit_Width(.1) is used then the Slit_Width(v) macro is expanded. On the other hand if the macro Slit_Width(sw, | ||
+ | |||
+ | Macros can also expand to other macro names. For example, the macro Crystallite_Size expands to CS and since CS is a macro then the CS macro will be expanded. | ||
+ | |||
+ | ==== 9.1.1 Directives with global scope ==== | ||
+ | |||
+ | **#include $user_defined_macro_file_name** | ||
+ | |||
+ | Include files are used to group macros. The file TOPAS.INC contains standard macros; a good place to view examples. Text within include files are inserted at the position of the #include directive, thus the following: | ||
+ | |||
+ | #include "my include file.inc" | ||
+ | |||
+ | inserts the text within //"// | ||
+ | |||
+ | # | ||
+ | |||
+ | Macros can be deleted using the # | ||
+ | |||
+ | # | ||
+ | |||
+ | will delete all macros previously defined with the names LP_Factor, SW and ZE including macros of the same name but with different arguments. | ||
+ | |||
+ | **#define, #undef, #ifdef, #ifndef, #else, #endif** | ||
+ | |||
+ | The #define and #undef directives works similar to the c pre-processor directives of the same name. #define and #undef is typically used with #ifdef, #else, #endif directives to control macro expansion in INP files. For example, the following: | ||
+ | |||
+ | #ifdef STANDARD_MACROS | ||
+ | |||
+ | //xdd//... | ||
+ | |||
+ | #endif | ||
+ | |||
+ | will expand to contain the //xdd// keyword if STANDARD_MACROS has been previously defined using a #define directive. The following will also expand to contain the //xdd// keyword if STANDARD_MACROS has not been defined using a #define directive, | ||
+ | |||
+ | #ifdef !STANDARD_MACROS | ||
+ | |||
+ | #define STANDARD_MACROS | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | #endif | ||
+ | |||
+ | or, | ||
+ | |||
+ | #ifndef STANDARD_MACROS | ||
+ | |||
+ | #define STANDARD_MACROS | ||
+ | |||
+ | xdd... | ||
+ | |||
+ | #endif | ||
+ | |||
+ | Note the use of the ‘!’ character placed before STANDARD_MACROS which means if STANDARD_MACROS is not defined. | ||
+ | |||
+ | ==== 9.1.2 Directives invoked on macro expansion ==== | ||
+ | |||
+ | **#m_ifarg, #m_else, #m_endif** | ||
+ | |||
+ | These are conditional directives that are invoked on macro expansion. #m_ifarg operates on two statements immediately following its use; the first must refer to a macro argument and the second can be any of the following: | ||
+ | |||
+ | |||
+ | |||
+ | **Table 9‑1** #m_ifarg syntax and meaning. | ||
+ | |||
+ | | | Evaluates to true if the following is true | | ||
+ | | #m_ifarg c #m_code | If the macro argument c has a letter or the character ! as the first character and if it is not an equation. | | ||
+ | | #m_ifarg c #m_eqn | If the macro argument c is an equation. | | ||
+ | | #m_ifarg c # | ||
+ | | #m_ifarg c “some_string” | If the macro argument c == “some_string”. | | ||
+ | | #m_ifarg v # | ||
+ | |||
+ | |||
+ | |||
+ | **#m_argu, # | ||
+ | |||
+ | These operate on one macro argument with the intention of changing the value of the argument according to the rules of Table 9‑2. | ||
+ | |||
+ | |||
+ | |||
+ | **Table 9‑2** Directives that operate and maybe change the value of a macro argument. | ||
+ | |||
+ | | | Meaning | | ||
+ | | #m_argu c | Change the macro argument c to a unique parameter name if it has @ as the first character. | | ||
+ | | # | ||
+ | | # | ||
+ | |||
+ | |||
+ | |||
+ | ===== 9.2 Overview ===== | ||
+ | |||
+ | The file TOPAS.INC is included into INP files by default; it contains commonly used standard macros. The meaning of the macro arguments in TOPAS.INC can be readily determined from the following conventions: | ||
+ | |||
+ | Ø Arguments called " | ||
+ | |||
+ | Ø Arguments called " | ||
+ | |||
+ | Ø Arguments called " | ||
+ | |||
+ | For example, the macro Cubic(cv) requires a value and/or a parameter name as an argument. Some examples are: | ||
+ | |||
+ | Cubic(a_lp 10.604) | ||
+ | |||
+ | Cubic(10.604) | ||
+ | |||
+ | Cubic(@ 10.604 min 10.59 max 10.61) | ||
+ | |||
+ | Here are some more examples for the Slit_Width macro: | ||
+ | |||
+ | SW(@, .1) | ||
+ | |||
+ | SW(sw, .1 min = Val-.02; max = Val+.02;) | ||
+ | |||
+ | SW%%((%%ap+bp)/ | ||
+ | |||
+ | ==== 9.2.1 xdd macros ==== | ||
+ | |||
+ | RAW(path_no_ext) | ||
+ | |||
+ | RAW(path_no_ext, | ||
+ | |||
+ | DAT(path_no_ext) | ||
+ | |||
+ | XDD(path_no_ext) | ||
+ | |||
+ | XY(path_no_ext, | ||
+ | |||
+ | XYE(path_ext) | ||
+ | |||
+ | SCR(path_no_ext) | ||
+ | |||
+ | SHELX_HKL4(path_no_ext) | ||
+ | |||
+ | ==== 9.2.2 Lattice parameters ==== | ||
+ | |||
+ | Cubic(cv) | ||
+ | |||
+ | Tetragonal(a_cv, | ||
+ | |||
+ | Hexagonal(a_cv, | ||
+ | |||
+ | Rhombohedral(a_cv, | ||
+ | |||
+ | ==== 9.2.3 Emission profile macros ==== | ||
+ | |||
+ | | No_Th_Dependence CuKa1(yminymax) CuK1sharp(yminymax) CuKa2_analyt(yminymax) CuKa2(yminymax) CuKa4_Holzer(yminymax) CuKa5(yminymax) CuKa5_Berger(yminymax) CoKa3(yminymax) CoKa7_Holzer(yminymax) CrKa7_Holzer(yminymax) | FeKa7_Holzer(yminymax) MnKa7_Holzer(yminymax) NiKa5_Holzer(yminymax) MoKa2(yminymax) CuKb4_Holzer(yminymax) CoKb6_Holzer(yminymax) CrKb5_Holzer(yminymax) FeKb4_Holzer(yminymax) MnKb5_Holzer(yminymax) NiKb4_Holzer(yminymax) | | ||
+ | |||
+ | ==== 9.2.4 Instrument and instrument convolutions ==== | ||
+ | |||
+ | **Radius(rp, | ||
+ | |||
+ | Primary and secondary instrument radii in [mm]. For most diffractometers rp equals rs. | ||
+ | |||
+ | **Specimen_Tilt(c, | ||
+ | |||
+ | Specimen tilt in mm. | ||
+ | |||
+ | **Slit_Width(c, | ||
+ | |||
+ | Aperture of the receiving slit in the equitorial plane in mm. | ||
+ | |||
+ | **Sample_Thickness(dc, | ||
+ | |||
+ | Sample thickness in mm in the direction of the scattering vector. | ||
+ | |||
+ | **Divergence(c, | ||
+ | |||
+ | Horizontal divergence of the beam in degrees in the equitorial plane. | ||
+ | |||
+ | **Variable_Divergence(c, | ||
+ | |||
+ | **Variable_Divergence_Shape(c, | ||
+ | |||
+ | **Variable_Divergence_Intensity** | ||
+ | |||
+ | Constant illuminated sample length in mm for variable slits (i.e. variable beam divergence). This Variable_Divergence macro applies both a shape and intensity correction. | ||
+ | |||
+ | **Simple_Axial_Model(c, | ||
+ | |||
+ | Receiving slit length mm for describing peak asymmetry due to axial divergence. | ||
+ | |||
+ | **Full_Axial_Model(filament_cv, | ||
+ | |||
+ | Accurate model for describing peak asymmetry due to axial divergence of the beam. | ||
+ | |||
+ | [filament_cv]: | ||
+ | |||
+ | [sample_cv]: | ||
+ | |||
+ | [detector_cv]: | ||
+ | |||
+ | [psol_cv, ssol_cv]: Aperture of the primary and secondary Soller slit in [°]. | ||
+ | |||
+ | **Finger_et_al(s2, | ||
+ | |||
+ | Finger et al., 1994. model for describing peak asymmetry due to axial divergence. | ||
+ | |||
+ | [s2, h2]: Sample length, receiving slit length. | ||
+ | |||
+ | **Tube_Tails(source_width_c, | ||
+ | |||
+ | Model for description of tube tails (Bergmann, 2000). | ||
+ | |||
+ | [source_width_c, | ||
+ | |||
+ | [z1_c, z1_v]: Effective width of tube tails in the equatorial plane perpendicular to the X-ray beam - negative z-direction [mm]. | ||
+ | |||
+ | [z2_c, z2_v]: Effective width of tube tails in the equatorial plane perpendicular to the X-ray beam - positive z-direction [mm]. | ||
+ | |||
+ | [z1_z2_h_c, z1_z2_h_v]: Fractional height of the tube tails relative to the main beam. | ||
+ | |||
+ | **UVW(u, uv, v, vv, w, wv)** | ||
+ | |||
+ | Cagliotti relation (Cagliotti et al., 1958). | ||
+ | |||
+ | [u, v, w]: Parameter names. | ||
+ | |||
+ | [uv, vv, wv]: Halfwidth value. | ||
+ | |||
+ | ==== 9.2.5 Phase peak_type' | ||
+ | |||
+ | **PV_Peak_Type(ha, | ||
+ | |||
+ | **TCHZ_Peak_Type(u, | ||
+ | |||
+ | **PVII_Peak_Type(ha, | ||
+ | |||
+ | Pseudo-Voigt, | ||
+ | |||
+ | For the definition of the functions and function parameters refer to section 0. | ||
+ | |||
+ | ==== 9.2.6 Quantitative Analysis ==== | ||
+ | |||
+ | **Apply_Brindley_Spherical_R_PD( R, PD)** | ||
+ | |||
+ | Applies the Brindley correction for quantitative analysis (Brindley, 1945). | ||
+ | |||
+ | **MVW(m_v, v_v, w_v)** | ||
+ | |||
+ | Returns cell mass, cell volume and weight percent. | ||
+ | |||
+ | ==== 9.2.7 2q Corrections ==== | ||
+ | |||
+ | **Zero_Error or ZE(c, v)** | ||
+ | |||
+ | Zero point error. | ||
+ | |||
+ | **Specimen_Displacement(c, | ||
+ | |||
+ | Specimen displacement error. | ||
+ | |||
+ | ==== 9.2.8 Intensity Corrections ==== | ||
+ | |||
+ | **LP_Factor(c, | ||
+ | |||
+ | Lorentz and Lorentz-Polarisation factor. | ||
+ | |||
+ | [c, v]: Monochromator angle in [°2q] | ||
+ | |||
+ | For unpolarized radiation v is 90 (e.g. X-ray diffractometers without any monochromator), | ||
+ | |||
+ | Values for most common monochromators (Cu radiation) are: | ||
+ | |||
+ | Ge : 27.3 | ||
+ | |||
+ | Graphite : 26.4 | ||
+ | |||
+ | Quartz : 26.6 | ||
+ | |||
+ | **Lorentz_Factor** | ||
+ | |||
+ | Lorentz_Factor for fixed wavelength neutron data. | ||
+ | |||
+ | **Surface_Roughness_Pitschke_et_al(a1c, | ||
+ | |||
+ | **Surface_Roughness_Suortti(a1c, | ||
+ | |||
+ | Suortti and Pitschke_et_al intensity corrections each with two parameters a1 and a2. | ||
+ | |||
+ | **Preferred_Orientation(c, | ||
+ | |||
+ | Preferred orientation correction based on March (1932). | ||
+ | |||
+ | [c, v]: March parameter value. | ||
+ | |||
+ | [ang, hkl]: Lattice direction. | ||
+ | |||
+ | **PO_Two_Directions(c1, | ||
+ | |||
+ | Preferred orientation correction based on March (1932) considering two preferred orientation directions. | ||
+ | |||
+ | [c1, v1]: March parameter value for the first preferred orientation direction. | ||
+ | |||
+ | [ang1, hkl1]: Parameter name and lattice plane for the first preferred orientation direction. | ||
+ | |||
+ | [c2, v2]: March parameter value for the second preferred orientation direction. | ||
+ | |||
+ | [ang2, hkl2]: Lattice direction for the second preferred orientation direction. | ||
+ | |||
+ | [w1c, w1v]: Fraction of crystals oriented into first preferred orientation direction. | ||
+ | |||
+ | **PO_Spherical_Harmonics(sh, | ||
+ | |||
+ | Preferred orientation correction based on spherical harmonics according to Järvinen (1993). | ||
+ | |||
+ | %%[(%%sh, order)]: Parameter name, spherical harmonics order. | ||
+ | |||
+ | ==== 9.2.9 Bondlength penalty functions ==== | ||
+ | |||
+ | **Anti_Bump(ton, | ||
+ | |||
+ | **AI_Anti_Bump(s1, | ||
+ | |||
+ | Applies a penalty function as a function of the distance between atoms. The closer the atoms are the higher the penalty is. | ||
+ | |||
+ | [ton]: Sets to_N of the box_interaction keyword. | ||
+ | |||
+ | [s1, s2]: Sites. | ||
+ | |||
+ | [ro]: Distance. | ||
+ | |||
+ | [wby]: Relative weighting given to the penalty function. | ||
+ | |||
+ | For more details refer to box_interaction and ai_anti_bump.. | ||
+ | |||
+ | **Parabola_N(n1, | ||
+ | |||
+ | Applies a penalty function as a function of the distance between atoms. The closer the atoms are the higher the penalty is. | ||
+ | |||
+ | [n1]: The closest n1 number of atoms of type s2 is soft constrained to a distance ro away from s1 . | ||
+ | |||
+ | [n2]: The closest n2 number of atoms of type s2 (excluding the closest n1 number of atoms of type s2) is repelled from s1, if the distance between s1 and s2 is less than ro . | ||
+ | |||
+ | [s1, s2]: Sites. | ||
+ | |||
+ | [ro]: Distance. | ||
+ | |||
+ | [wby]: Relative weighting given to the penalty function. | ||
+ | |||
+ | **Grs_Interaction(s1, | ||
+ | |||
+ | Penalty function applying the GRS series according to Coelho & Cheary (1997). | ||
+ | |||
+ | [s1, s2]: Sites. | ||
+ | |||
+ | [wqi, wqj]: Valence charge of the atoms. | ||
+ | |||
+ | [c]: Name of the GRS. | ||
+ | |||
+ | [ro]: Distance. | ||
+ | |||
+ | [n]: The exponent of the repulsion part of the Lennard-Jones potential. | ||
+ | |||
+ | For more details refer to grs_interaction. | ||
+ | |||
+ | **Grs_No_Repulsion(s1, | ||
+ | |||
+ | Used for calculating the Madelung constants. | ||
+ | |||
+ | [s1, s2]: Sites. | ||
+ | |||
+ | [wqi, wqj]: Valence charge of the atoms. | ||
+ | |||
+ | [c]: Name of the GRS. | ||
+ | |||
+ | **Grs_BornMayer(s1, | ||
+ | |||
+ | Uses the GRS series with a Born-Mayer equation for the repulsion term. | ||
+ | |||
+ | [s1, s2]: Sites. | ||
+ | |||
+ | [wqi, wqj]: Valence charge of the atoms. | ||
+ | |||
+ | [c]: Name of the GRS. | ||
+ | |||
+ | [ro]: Mean distance. | ||
+ | |||
+ | [b]: b-constant for the repulsion part of the Born-Mayer potential. | ||
+ | |||
+ | **Distance_Restrain(sites, | ||
+ | |||
+ | **Angle_Restrain(sites, | ||
+ | |||
+ | **Flatten(sites, | ||
+ | |||
+ | **Distance_Restrain_Keep_Within(sites, | ||
+ | |||
+ | **Distance_Restrain_Keep_Out(sites, | ||
+ | |||
+ | Applies penalties restraining distances and angles between sites. . | ||
+ | |||
+ | ' | ||
+ | |||
+ | **Keep_Atom_Within_Box(size) - this is a constraint macro.** | ||
+ | |||
+ | Applies constraints such that the present site cannot more outside of a box with a length of 2*size. | ||
+ | |||
+ | ==== 9.2.10 Reporting macros ==== | ||
+ | |||
+ | **Create_2Th_Ip_file(file)** | ||
+ | |||
+ | Creates a file with positions (2) and intensities. | ||
+ | |||
+ | **Create_d_Ip_file(file)** | ||
+ | |||
+ | Creates a file with positions (d) and intensities. | ||
+ | |||
+ | **Create_hklm_d_Th2_Ip_file(file)** | ||
+ | |||
+ | Creates a file with the following information for each peak: h, k, l, multiplicity, | ||
+ | |||
+ | **Out_Yobs_Ycalc_and_Difference(file)** | ||
+ | |||
+ | Outputs the x-axis, Yobs, Ycalc and difference. | ||
+ | |||
+ | **Out_X_Yobs(file), | ||
+ | |||
+ | Outputs the x-axis, Yobs, Ycalc and Difference.to files. | ||
+ | |||
+ | **Out_F2_Details(file), | ||
+ | |||
+ | Outputs structure factor details, see section 7.3.2. | ||
+ | |||
+ | **Out_FCF(file)** | ||
+ | |||
+ | Outputs a CIF file representation of structure factor details suitable for generating Fourier maps using ShelX.. | ||
+ | |||
+ | **Out_CIF_STR(file)** | ||
+ | |||
+ | Outputs structure details in CIF format. | ||
+ | |||
+ | ==== 9.2.11 Rigid body macros ==== | ||
+ | |||
+ | **Set_Length(s0, | ||
+ | |||
+ | Fixes the distance between two sites. | ||
+ | |||
+ | [s0, s1]: Site names. | ||
+ | |||
+ | [r]: Distance in Angstroms. | ||
+ | |||
+ | [xc, yc, zc]: The parameter names for the coordinates of s0. | ||
+ | |||
+ | [cva, cvb]: Parameter names and values for rotations about the x and y axes | ||
+ | |||
+ | **Set_Lengths(s0, | ||
+ | |||
+ | **Set_Lengths(s0, | ||
+ | |||
+ | Fixes the distance between two and three sites, respectively. | ||
+ | |||
+ | Set_Lengths(s0, | ||
+ | |||
+ | macro Set_Lengths(s0, | ||
+ | |||
+ | { | ||
+ | |||
+ | Set_Length(s0, | ||
+ | |||
+ | Set_Length(s0, | ||
+ | |||
+ | } | ||
+ | |||
+ | and so on. | ||
+ | |||
+ | **Triangle(s1, | ||
+ | |||
+ | **Triangle(s0, | ||
+ | |||
+ | **Triangle(s0, | ||
+ | |||
+ | Defines a regular triangle without and with a central atom (s0). | ||
+ | |||
+ | [s0, s1, s2, s3]: Site names. s0 is the central atom of the triangle. | ||
+ | |||
+ | [r]: Distance in Angstroms. | ||
+ | |||
+ | [xc, yc, zc]: Parameter names for the fractional coordinates of the geometric center of the triangle. | ||
+ | |||
+ | [cva, cvb, cvc]: Parameter names and values for rotations about the x, y and z axes. | ||
+ | |||
+ | **Tetrahedra(s0, | ||
+ | |||
+ | Defines a tetrahedra with a central atom. | ||
+ | |||
+ | [s0, s1, s2, s3, s4]: Site names. s0 is the central atom of the tetrahedra. | ||
+ | |||
+ | [r]: Distance in Angstroms. | ||
+ | |||
+ | [xc, yc, zc]: Parameter names for the fractional coordinates of the geometric center of the tetrahedra. | ||
+ | |||
+ | [cva, cvb, cvc]: Parameter names and values for rotations about the x, y and z axes. | ||
+ | |||
+ | **Octahedra(s0, | ||
+ | |||
+ | **Octahedra(s0, | ||
+ | |||
+ | Defines an octahedra with a central atom. | ||
+ | |||
+ | [s0, s1, s2, s3, s4, s5, s6]: Site names. s0 is the central atom of the octahedra. | ||
+ | |||
+ | [r]: Distance in Angstroms. | ||
+ | |||
+ | [xc, yc, zc]: Parameter names for the fractional coordinates of the geometric center of the octahedra. | ||
+ | |||
+ | [cva, cvb, cvc]: Parameter names and values for rotations about the x, y and z axes. | ||
+ | |||
+ | **Hexagon_sitting_on_point_in_xy_plane(s1, | ||
+ | |||
+ | **Hexagon_sitting_on_side_in_xy_plane(s1, | ||
+ | |||
+ | Defines a regular hexagon, where the hexagon is sitting on a point or on a side in the x-y plane, respectively. | ||
+ | |||
+ | [s1, s2, s3, s4, s5, s6]: Site names. | ||
+ | |||
+ | [a]: Distance in Angstroms. | ||
+ | |||
+ | **Translate(acv, | ||
+ | |||
+ | **Translate(acv, | ||
+ | |||
+ | Performs a translation of the rigid body. | ||
+ | |||
+ | [acv, bcv, ccv]: Amount of the translation in fractional coordinates. | ||
+ | |||
+ | [ops]: Operates on previously defined sites in “ops”. | ||
+ | |||
+ | **Translate_with_site_start_values(s0, | ||
+ | |||
+ | Performs a translation using the coordinates of s0 as start values. | ||
+ | |||
+ | [s0]: Site name. | ||
+ | |||
+ | [xc, yc, zc]: Parameter names for the coordinates of s0. | ||
+ | |||
+ | **Rotate_about_points(cv, | ||
+ | |||
+ | **Rotate_about_points(cv, | ||
+ | |||
+ | Performs a rotation about a rotation vector specified by two sites. | ||
+ | |||
+ | [cv]: Amount the rigid body is rotated about the specified rotation vector in degrees. | ||
+ | |||
+ | [a, b]: Rotation vector defined by the sites a and b. | ||
+ | |||
+ | [pts]: Operates on previously defined point_for_site(s). | ||
+ | |||
+ | Note: Do not include points rotated about in the “operate on points” list of the | ||
+ | |||
+ | Rotate_about_points macro. For example, in | ||
+ | |||
+ | Rotate_about_points(@ 1 0, C1, C2, " C3 C4 C5 C6 ") | ||
+ | |||
+ | the points C1 and C2 are not included in the “points operated on” list. Note also that Rotate_about_points without a “points operated on” list will operate on all previously defined point_for_site(s). Therefore, when an “operate on points” list is not defined then it is necessary to place the “points rotated about” after the Rotate_about_points macro. It is best to specify an “operate on points” list when in doubt. | ||
+ | |||
+ | **Rotate_about_these_points(cv, | ||
+ | |||
+ | Performs a rotation about a rotation vector specified by two sites. | ||
+ | |||
+ | [cv]: Amount the rigid body is rotated about the specified rotation vector in degrees. | ||
+ | |||
+ | [a, b]: Rotation vector defined by the sites a and b. | ||
+ | |||
+ | [ops]: Operates on previously defined point_for_site(s). | ||
+ | |||
+ | **Rotate_about_axies(cva, | ||
+ | |||
+ | **Rotate_about_axies(cva, | ||
+ | |||
+ | Performs a rotation about the axis of the rigid body. | ||
+ | |||
+ | [cva, cvb, cvc]: Parameter names and values for rotations about the x, y and z axes. | ||
+ | |||
+ | Rotation_vector_from_points(a, | ||
+ | |||
+ | Determines a rotation vector form two points. | ||
+ | |||
+ | [a, b]: Rotation vector defined by the sites a and b. | ||
+ | |||
+ | ==== 9.2.12 Background functions using fit_objects ==== | ||
+ | |||
+ | **One_on_X(c, | ||
+ | |||
+ | 1/X background function ideal to describe background intensity at low angles due to air scattering | ||
+ | |||
+ | **Bkg_Diffuse(b, | ||
+ | |||
+ | Defines a function to describe short range order effects. | ||
+ | |||
+ | [b, bv]: Parameter name, refineable weight. | ||
+ | |||
+ | [bb, bbv]: Parameter name, correlation shell radii. | ||
+ | |||
+ | **PV(a, xo, fwhm, g)** | ||
+ | |||
+ | **PV(a, xo, fwhm, g, av, xov, fwhmv, gv)** | ||
+ | |||
+ | Defines a pseudo-Voigt function. | ||
+ | |||
+ | [a, av]: Parameter name, area. | ||
+ | |||
+ | [xo, xov]: Parameter name, Position in [° 2q]. | ||
+ | |||
+ | [fwhm, fwhmv]: Parameter name, full width at half maximum in [° 2q]. | ||
+ | |||
+ | [g, gv]: Parameter name, pseudo-Voigt mixing parameter. | ||
+ | |||
+ | **PV_Left_Right(a, | ||
+ | |||
+ | **PV_Left_Right(a, | ||
+ | |||
+ | Defines a split-pseudo-Voigt function. | ||
+ | |||
+ | [a, av]: Parameter name, area. | ||
+ | |||
+ | [xo, xov]: Parameter name, Position in [° 2q]. | ||
+ | |||
+ | [fwhm1, fwhm1v]: Full width at half maximum in [° 2q] for the left composite function. | ||
+ | |||
+ | [fwhm2, fwhm2v]: Full width at half maximum in [° 2q] for the right composite function. | ||
+ | |||
+ | [g, gv]: Pseudo-Voigt mixing parameter. | ||
+ | |||
+ | ==== 9.2.13 Sample convolutions ==== | ||
+ | |||
+ | **Absorption(c, | ||
+ | |||
+ | Linear absorption coefficient in t in cm-1 used for adjusting the peak shape due to sample transparency. | ||
+ | |||
+ | **Absorption_With_Sample_Thickness_mm_Shape(u, | ||
+ | |||
+ | Corrects the peak shape for absorption effects. | ||
+ | |||
+ | [u, uv]: Parameter name, linear absorption coefficient in cm-1. | ||
+ | |||
+ | [d, dv]: Parameter name, sample thickness in [mm]. | ||
+ | |||
+ | **Absorption_With_Sample_Thickness_mm_Shape_Intensity(u, | ||
+ | |||
+ | Corrects the peak intensity for absorption effects. | ||
+ | |||
+ | [u, uv]: Parameter name, absorption coefficient in cm-1. | ||
+ | |||
+ | [d, dv]: Parameter name, sample thickness in [mm]. | ||
+ | |||
+ | **CS_L(c,v) or Crystallite_Size(c, | ||
+ | |||
+ | Applies a Lorentzian convolution with a FWHM that varies according to the relation lor_fwhm = c / Cos(Th). | ||
+ | |||
+ | [c, v]: Parameter name, crystallite size in [nm]. | ||
+ | |||
+ | **CS_G(c, v)** | ||
+ | |||
+ | Applies a Gaussian convolution with a FWHM that varies according to the relation gauss_fwhm = c / Cos(Th). | ||
+ | |||
+ | [c, v]: Parameter name, crystallite size in [nm]. | ||
+ | |||
+ | **Strain_L(c, | ||
+ | |||
+ | Applies a Lorentzian convolution with a FWHM that varies according to the relation lor_fwhm = c Tan(Th). | ||
+ | |||
+ | **Strain_G(c, | ||
+ | |||
+ | Applies a Gaussian convolution with a FWHM that varies according to the relation gauss_fwhm = c Tan(Th). | ||
+ | |||
+ | **LVol_FWHM_CS_G_L(k, | ||
+ | |||
+ | Calculates FWHM and IB (integral breadth) based volume-weighted column heights (LVol). For details refer to section 7.2. | ||
+ | |||
+ | [k, lvol]: shape factor (fixed to 1), integral breadth based LVol. | ||
+ | |||
+ | [kf, lvolf]: shape factor (defaults to 0.89), FWHM based LVol. | ||
+ | |||
+ | [csgc, csgv]: Parameter name, Gaussian component. | ||
+ | |||
+ | [cslc, cslv]: Parameter name, Lorentzian component. | ||
+ | |||
+ | ==== 9.2.14 Neutron TOF ==== | ||
+ | |||
+ | **TOF_XYE(path, | ||
+ | |||
+ | Includes the neutron_data keyword and the calculation step size. | ||
+ | |||
+ | **TOF_LAM(w_ymin_on_ymax)** | ||
+ | |||
+ | Defines a simple emission profile suitable for TOF data | ||
+ | |||
+ | **TOF_x_axis_calibration(t0, | ||
+ | |||
+ | Writes the pk_xo equation in terms of the three calibration constants t0, t1, t2 converting d-spacing to x-axis space. | ||
+ | |||
+ | **TOF_Exponential(a0, | ||
+ | |||
+ | An exponential convolution applied to the TOF peaks - see example TOF_BANK2_1.INP. | ||
+ | |||
+ | **TOF_CS_L(c, | ||
+ | |||
+ | Lorentzian and Gaussian components for crystallite size. t1 is the calibration constant appearing in the argument of the macro TOF_x_axis_calibration. | ||
+ | |||
+ | **TOF_PV(fwhm, | ||
+ | |||
+ | A pseudo-Voigt used to describe the instrumental broadening t1 is the calibration constant appearing in the argument of the macro TOF_x_axis_calibration, | ||
+ | |||
+ | ==== 9.2.15 Miscalleneous ==== | ||
+ | |||
+ | **Temperature_Regime** | ||
+ | |||
+ | Defines a temperature regime. See the temperature keyword. | ||
+ | |||
+ | **STR(sg)** | ||
+ | |||
+ | Signals the start of structure information with a space group of sg. | ||
+ | |||
+ | **Exclude** | ||
+ | |||
+ | Defines excluded regions. See the exclude keyword. | ||
+ | |||
+ | **Decompose(diff_toll)** | ||
+ | |||
+ | Decompose a diffraction pattern into data points at peak positions only. Data points closer than diff_toll to another data point is not included. Decompose also sets x_calculation_step to the value of diff_toll. | ||
+ | |||
+ | **ADPs_Keep_PD** | ||
+ | |||
+ | **Mixture_LAC_1_on_cm(mlac)** | ||
+ | |||
+ | **Phase_Density_g_on_cm3(pd)** | ||
+ | |||
+ | **Phase_LAC_1_on_cm(u)** | ||
+ | |||
+ | **Gauss(xo, fwhm), Lorentzian(xo, | ||
+ | |||
+ | An equation defines a unit area Gaussian or Lorentzian with a position of xo and a FWHM of fwhm | ||
+ | |||
+ | ====== 10 File types and formats ====== | ||
+ | |||
+ | | **Table** **10‑1** File types. || | ||
+ | | File Type | Comments | | ||
+ | | *.PRO | Project files. | | ||
+ | | *.INP | INP format Input file. | | ||
+ | | *.OUT | Output file created on termination of refinement. Same format as *.INP. | | ||
+ | | *.STR | Structure data. Same format as *.INP. | | ||
+ | | *.LAM | Source emission profile data. Same format as *.INP. | | ||
+ | | *.DEF | Program defaults. Same format as *.INP. | | ||
+ | | *.LOG | TOPAS.log and Tc.log. Useful for tracking input errors. | | ||
+ | | **Measurement Data** || | ||
+ | | *.RAW | Bruker AXS binaries (DIFFRAC AT and DIFFRAC//< | ||
+ | | *.DAT *.XDD / *.CAL *.XY, *XYE | ASCII file formats, see Table 10‑2 | | ||
+ | | *.SCR | ASCII file format comprising lines of h, k, l, m, d, 2q, and Fo. | | ||
+ | | *.HKL | ShelX HKL4 format. | | ||
+ | | **Structure and structure factor data** || | ||
+ | | *.CIF | Crystallographic Information File; International Union for Crystallography (IUCr). | | ||
+ | | *.FCF | CIF file representation of structure factor details suitable for generating Fourier maps using ShelX. | | ||
+ | |||
+ | |||
+ | |||
+ | | **Table** **10****‑2** ASCII input data file formats. *.XY, *.XYE, *.XDD and *.CAL are delimited by white space characters and can contain line and block comments. ||| | ||
+ | | File Type | Format | Explanation | | ||
+ | | ***.DAT, LHPM/ | ||
+ | | | Line 1-4 | Comments | | ||
+ | | | Line 5 | Start angle, step width, finish angle | | ||
+ | | | Line 6 onwards | Observed XRD data points (any number of rows) | | ||
+ | | **GSAS** ("std - const", | ||
+ | | | Line 1 | Legend | | ||
+ | | | Line 2 | Item 3: Number of data points | | ||
+ | | | Line 3 onwards | Depending of item10 and item5 | | ||
+ | | | | For item10 = " | ||
+ | | **FullProf** (INSTRM = 0: free format file), use keyword fullprof// | ||
+ | | | Line 1 | Start angle, step width, finish angle, comments | | ||
+ | | | Line 2 onwards | Observed XRD data points (any number of rows) | | ||
+ | | ***.XDD / *.CAL** | Line 1 | Optional line for comments | | ||
+ | | | Number 2 | Start angle | | ||
+ | | | Number 3 | Step width | | ||
+ | | | Number 4 | Finish angle | | ||
+ | | | Number 5 | Counting time | | ||
+ | | | Number 6 | Unused | | ||
+ | | | Number 7 | Unused | | ||
+ | | | Number 8 onwards | Observed XRD data points | | ||
+ | | ***.XY** | | 2q and intensity data values | | ||
+ | | ***.XYE** | | 2q, intensity and intensity error values. | |