manual_part_3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
manual_part_3 [2009/08/27 08:54] – clare | manual_part_3 [2022/11/03 15:08] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 11 Charge-flipping ====== | ||
+ | |||
+ | The charge-flipping method of [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | | **Table** **11****‑1****.** Items that can be used in charge-flipping equations || | ||
+ | | Get(Aij) Get(alpha_sum) Get(density) Get(cycles_since_last_best) Get(d_squared_inverse) Get(initial_phase) Get(iters_since_last_best) Get(F000) Get(max_density) Get(max_density_at_cycle_iter_0) Get(num_reflections_above_d_min) Get(phase_difference) Get(r_factor_1), | ||
+ | | **Reserved parameter names** Cycle_Iter, Cycle, Iter, D_spacing | | | ||
+ | | **Macros** | | | ||
+ | | Ramp, Ramp_Clamp, Cycle_Ramp, | ||
+ | | Out_for_cf(file) : Outputs the A matrix from a Pawley refinement for use in charge flipping; uses // | ||
+ | |||
+ | |||
+ | |||
+ | \\ |\\ **Table 11‑2****.** Keywords that can be used in charge-flipping. || | ||
+ | | // | ||
+ | | // | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [// | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | **__Electron density perturbations__** | | | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [// | ||
+ | | [// | ||
+ | | [[# | ||
+ | | [// | ||
+ | | [// | ||
+ | | [// | ||
+ | | [// | ||
+ | | [//omit// !E] | | | ||
+ | | [// | ||
+ | | [//insert// !E] | | | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | **__Phase perturbations__** | | | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [// | ||
+ | | [[# | ||
+ | | [// | ||
+ | | [// | ||
+ | | [// | ||
+ | | [// | ||
+ | | [// | ||
+ | | **__Miscellaneous__** | | | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | **__GUI Related__** | __ __ | | ||
+ | | [[# | ||
+ | | [[# | ||
+ | | [[# | ||
+ | |||
+ | |||
+ | |||
+ | ===== 11.1 Charge-flipping usage ===== | ||
+ | |||
+ | CF works particularlly well on data at good resolution (<1Å resolution). For data at poor resolution or for difficult structures then inclusion of the tangent formula can facilitate solution and sharpen electron densities, see example CF-1A7Y.INP. Powder diffraction data usually fall under the poor resolution/ | ||
+ | |||
+ | The choice and amount of perturbation necessary for finding a solution are important considerations. Not enough perturbation leads to the system being trapped within a local parameter space; too much perturbation may lead to a solution not being found and in addition contrast in // | ||
+ | |||
+ | fraction_density_to_flip = Ramp(0.85, 0.8, 100); | ||
+ | |||
+ | fraction_reflections_weak = Ramp(0.5, 0, 100); | ||
+ | |||
+ | flip_regime_2 = Ramp(1, 0, 200); | ||
+ | |||
+ | flip_regime_3 = Ramp(0.25, 0.5, 200); | ||
+ | |||
+ | symmetry_obey_0_to_1 = Ramp(0.5, 1, 100); | ||
+ | |||
+ | tangent_scale_difference_by = Ramp(0, 1, 100); | ||
+ | |||
+ | Choosing control parameters in this manner gradually decreases perturbation allowing for solutions to be found and identified. This is similar to a simulated annealing process where temperatures start at high values and then progressively lowered. | ||
+ | |||
+ | ==== 11.1.1 Perturbations ==== | ||
+ | |||
+ | Perturbations can be categorized as being of either phase, structure factor intensity or electron density perturbations as shown in Table 11‑2. There are two built in flipping regimes, // | ||
+ | |||
+ | | < | ||
+ | |||
+ | where //d// corresponds to the electron density threshold. | ||
+ | |||
+ | Using the tangent formula on either difficult structures or on data at poor resolution often leads to uranium atom solutions. Uranium atom solutions can be avoided by modifying the electron density using a flipping regime that dampens high electron densities or by using // | ||
+ | |||
+ | Using a large number of triplets per // | ||
+ | |||
+ | Perturbations mostly increase randomness in the system with the exceptions of the tangent formula, // | ||
+ | |||
+ | ==== 11.1.2 The Ewald sphere, weak reflections and CF termination ==== | ||
+ | |||
+ | By default CF uses the minimum observed //d// spacing to define the Ewald sphere; alternatively //min_d// can be used. The Ewald sphere can be increased using // | ||
+ | |||
+ | Reflections that have zero intensities according to the space group are not included in CF; correspondingly the number of observed reflections removed are reported. Structure factor intensities within a family of reflections are determined by averaging the observed structure factors intensities. This averaging is also performed on calculated intensities each CF iteration for weak reflections. | ||
+ | |||
+ | Changing the space group is possible; changing the space group to a higher symmetry from that as implied in the input hkl file often makes sense. Changing the space group to a lower symmetry implies less symmetry and is useful for checking whether a significantly better // | ||
+ | |||
+ | Typically a fraction of observed reflections are given the status of “weak” using // | ||
+ | |||
+ | ==== 11.1.3 Powder data considerations ==== | ||
+ | |||
+ | For powder data it is usually best to maximize the number of constraints due to poor data quality; it is also best to use *.A files as generated by a Pawley refinement and to then use // | ||
+ | |||
+ | extend_calculated_sphere_to 1 | ||
+ | |||
+ | add_to_phases_of_weak_reflections = 90 Ramp(1, 0, 100); | ||
+ | |||
+ | If the Ewald sphere is extended such that the weak reflections are many then some of these weak reflections could well be of high intensity. Subsequently offsetting high intensity weak reflections by a constant could lead to too much perturbation and thus the following may be preferential: | ||
+ | |||
+ | extend_calculated_sphere_to 1 | ||
+ | |||
+ | add_to_phases_of_weak_reflections = Rand(-180, | ||
+ | |||
+ | In a Pawley refinement the calculated intensities at the low // | ||
+ | |||
+ | delete_observed_reflections = D_spacing < 1.134; | ||
+ | |||
+ | A typical first try INP file template for powders is as follows: | ||
+ | |||
+ | macro Nr { 100 } | ||
+ | |||
+ | charge_flipping | ||
+ | |||
+ | cf_in_A_matrix PAWLEY_FILE.A | ||
+ | |||
+ | space_group $ | ||
+ | |||
+ | a # b # c al # be # ga # | ||
+ | |||
+ | delete_observed_reflections = D_spacing < #; | ||
+ | |||
+ | extend_calculated_sphere_to # | ||
+ | |||
+ | add_to_phases_of_weak_reflections = 90 Ramp(1, 0, Nr); | ||
+ | |||
+ | flip_regime_2 = Ramp(1, 0, Nr); | ||
+ | |||
+ | symmetry_obey_0_to_1 = Ramp(0.5, 1, Nr); | ||
+ | |||
+ | Tangent(.3, 30) | ||
+ | |||
+ | min_grid_spacing .3 | ||
+ | |||
+ | load f_atom_type f_atom_quantity { … } | ||
+ | |||
+ | ==== 11.1.4 The algorithm of Oszlányi & Süto (2005) and F000 ==== | ||
+ | |||
+ | Normalized structure factors enhances the chances of finding a solution ([[http:// | ||
+ | |||
+ | user_threshold = 0.2 Get(max_density_at_cycle_iter_0); | ||
+ | |||
+ | Get(max_density_at_cycle_iter_0) is a different value at the start of each CF process as phases are chosen randomly. An alternative means of defining the threshold is: | ||
+ | |||
+ | fraction_density_to_flip 0.83 | ||
+ | |||
+ | The CF process is sensitive to the threshold value. A value of 0.83 for // | ||
+ | |||
+ | fraction_density_to_flip = Ramp(0.85, 0.8, 100); | ||
+ | |||
+ | Implementation of such a ramp solves 1a7y in ~2000 iterations. | ||
+ | |||
+ | F000 is allowed to float when // | ||
+ | |||
+ | When the electron density is perturbed then a floating F000 often produces unfavourable oscillations in // | ||
+ | |||
+ | Example CF-1A7Y-GABOR.INP does not seem to solve at a lower resolution, try for example: | ||
+ | |||
+ | delete_observed_reflections = D_spacing < 1.1; | ||
+ | |||
+ | On the other hand when // | ||
+ | |||
+ | ===== 11.2 Charge-flipping Investigations / Tutorials ===== | ||
+ | |||
+ | The effects of CF keywords can be investigated by inclusion/ | ||
+ | |||
+ | |||
+ | ==== 11.2.1 Preventing uranium atom solutions using pick_atoms ==== | ||
+ | |||
+ | Example CF-1A7Y-OMIT.INP uses // | ||
+ | |||
+ | |||
+ | |||
+ | pick_atoms * | ||
+ | |||
+ | choose_to 5 | ||
+ | |||
+ | omit = Rand(1, 1.1); | ||
+ | |||
+ | This example additionally uses the tangent formula and //1a7y// solves in ~100 iterations and with a large contrast in // | ||
+ | |||
+ | pick_atoms * | ||
+ | |||
+ | choose_to 5 | ||
+ | |||
+ | insert = Rand(-.1, 1); | ||
+ | |||
+ | The //insert// case is slightly slower than the //omit// case as the 5 atoms are first omitted before insertion. Each case however solves //1a7y// in a similar number of iterations. | ||
+ | |||
+ | Example CF-1A7Y-NO-TANGENT.INP is similar but without the tangent formula, //1a7y// in this case solves in ~1000 iterations. | ||
+ | |||
+ | ==== 11.2.2 The tangent formula on powder data ==== | ||
+ | |||
+ | In CF-ALVO4.INP comment out the Tangent line as follows: | ||
+ | |||
+ | ‘ Tangent(.5, 50) | ||
+ | |||
+ | Run CF-ALVO4.INP and turn on Octahedra viewing in the OpenGL window. Visual inspection of picked atoms should show electron densities that are not recognizable as correct solutions. | ||
+ | |||
+ | Include the Tangent line and rerun; after a minute or two and at the bottom of the Ramps visual inspection of picked atoms should show a well defined solution. | ||
+ | |||
+ | Thus use of the tangent formula assists in solving CF-ALVO4.INP. | ||
+ | |||
+ | ==== 11.2.3 Pseudo symmetry – 441 atom oxide ==== | ||
+ | |||
+ | CF works particularly well on pseudo symmetric structures ([[http:// | ||
+ | |||
+ | charge_flipping | ||
+ | |||
+ | cf_hkl_file 020pn.hkl | ||
+ | |||
+ | space_group Pn | ||
+ | |||
+ | a 24.1332 | ||
+ | |||
+ | b 19.5793 | ||
+ | |||
+ | c 25.1091 | ||
+ | |||
+ | be 99.962 | ||
+ | |||
+ | fraction_reflections_weak 0.4 | ||
+ | |||
+ | symmetry_obey_0_to_1 .3 | ||
+ | |||
+ | Tangent(.25, | ||
+ | |||
+ | load f_atom_type f_atom_quantity | ||
+ | |||
+ | { | ||
+ | |||
+ | MO = 42 2; | ||
+ | |||
+ | P = (126 - 42) 2; | ||
+ | |||
+ | O = (441 - 126) 2; | ||
+ | |||
+ | } | ||
+ | |||
+ | The tangent formula is used to assist // | ||
+ | |||
+ | scale_F000 1 | ||
+ | |||
+ | fraction_reflections_weak .4 | ||
+ | |||
+ | add_to_phases_of_weak_reflections 90 | ||
+ | |||
+ | user_threshold = 0.15 Get(max_density_at_cycle_iter_0); | ||
+ | |||
+ | Slow convergence is then observed and the reason is the use of F000. This is opposite to the case of //1a7y// in CF-1A7Y-GABOR.INP where F000 is necessary. Setting // | ||
+ | |||
+ | ==== 11.2.4 Origin finding and symmetry_obey_0_to_1 ==== | ||
+ | |||
+ | When // | ||
+ | |||
+ | Run CF-AE14.INP to convergence; | ||
+ | |||
+ | ==== 11.2.5 symmetry_obey_0_to_1 on poor resolution data ==== | ||
+ | |||
+ | Run CF-AE5.INP until a solution is found; terminate CF, this saves the phase information to the file AE5.FC. | ||
+ | |||
+ | Copy AE5.FC to AE5-SAVE.FC. | ||
+ | |||
+ | Place the following lines into the file CF-AE5-POOR.INP | ||
+ | |||
+ | set_initial_phases_to ae5-save.fc | ||
+ | |||
+ | randomize_initial_phases_by 0 | ||
+ | |||
+ | This simply starts CF with optimum phase values. Also include the following line: | ||
+ | |||
+ | symmetry_obey_0_to_1 .75 | ||
+ | |||
+ | Run CF-AE5-POOR.INP; | ||
+ | |||
+ | Include // | ||
+ | |||
+ | flip_regime_3 0.5 | ||
+ | |||
+ | ==== 11.2.6 Sharpening clouds - extend_calculated_sphere_to ==== | ||
+ | |||
+ | Example CF-AE9-POOR.INP demonstrates the limit to which the present CF implementation can operate. Single crystal data is purposely chosen to isolate resolution effects and not intensity errors. The tangent formula is critical where without it the CF process is extremely perturbed and unstable. “flip_regime_3 .5” is used due to occurrences of uranium atom solutions. | ||
+ | |||
+ | There are no ramps, instead the CF process is restarted when the // | ||
+ | |||
+ | break_cycle_if_true = Get(iters_since_last_best) > 100; | ||
+ | |||
+ | randomize_phases_on_new_cycle_by = Rand(-180, 180); | ||
+ | |||
+ | Half of the observed reflections are considered weak and additionally missing reflections up to 1 Angstrom are included and considered weak using: | ||
+ | |||
+ | fraction_reflections_weak 0.5 | ||
+ | |||
+ | extend_calculated_sphere_to 1 | ||
+ | |||
+ | The intensities of weak reflections are left untouched and instead a Pi/2 phase shift is randomly applied to ~30% of weak reflections as follows: | ||
+ | |||
+ | add_to_phases_of_weak_reflections = If(Rand(0, 1) < .3, 90, 0); | ||
+ | |||
+ | A // | ||
+ | |||
+ | Run CF-AE9-POOR.INP and a solution should be clearly recognizable after a few minutes. Change/ | ||
+ | |||
+ | ==== 11.2.7 A difficult powder, CF-SUCROSE.INP ==== | ||
+ | |||
+ | CF-SUCROSE.INP without // | ||
+ | |||
+ | fraction_density_to_flip 0.83 | ||
+ | |||
+ | scale_density_below_threshold 0 | ||
+ | |||
+ | When // | ||
+ | |||
+ | // | ||
+ | |||
+ | pick_atoms * | ||
+ | |||
+ | activate = Cycle_Iter == 0; | ||
+ | |||
+ | insert = If(Rand(0, 1) > 0.3, 10, 0); | ||
+ | |||
+ | Note that atoms are inserted at an intensity that is 10 times the average intensity. This increases the weight of inserted atoms relative to electron density noise. It also initially gives more weight to weak reflections. | ||
+ | |||
+ | Use of // | ||
+ | |||
+ | ==== 11.2.8 Increasing contrast in R-factors ==== | ||
+ | |||
+ | The act of flipping introduces an appreciable amount of unwanted high frequencies in the structure factors. This effect can be reduced by dampening high frequencies using // | ||
+ | |||
+ | Run CF-1A7Y.INP until convergence. The difference in // | ||
+ | |||
+ | apply_exp_scale 0 | ||
+ | |||
+ | Rerun CF-1A7Y.INP until convergence. The difference in // | ||
+ | |||
+ | ===== 11.3 Charge-flipping Examples ===== | ||
+ | |||
+ | | **Table ****11****‑3****.** Examples found in the CF directory, Number of atoms corresponds to the number of non-hydrogen atoms within the asymmetric unit. ||| | ||
+ | | **Single crystal data** | **Number of atoms in asymmetric unit** | **Space group** | | ||
+ | | cf-1a7y.inp cf-1a7y-gabor.inp cf-1a7y-omit.inp cf-1a7y-no-tangent.inp | 314 | //P1// | | ||
+ | | cf-ae14.inp | 43 | //P-1// | | ||
+ | | cf-ae5.inp cf-ae5-poor.inp | 23 | //C2/c// | | ||
+ | | cf-ae9.inp cf-ae9-poor.inp | 53 | //P-1// | | ||
+ | | cf-gebaa.inp | 17 | // | ||
+ | | cf-pn-02.inp | 441 | //Pn// | | ||
+ | | cf-ylidm.inp | 17 | // | ||
+ | | **Powder data** | | // // | | ||
+ | | cf-alvo4.inp, | ||
+ | | cf-cime-pawley.inp cf-cime.inp, | ||
+ | | cf-sucrose.inp, | ||
+ | |||
+ | |||
+ | |||
+ | ===== 11.4 Keywords in detail ===== | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The current cloud is added to the GUI cloud creating a running average cloud for display purposes. // | ||
+ | |||
+ | add_to_cloud_N 10 | ||
+ | |||
+ | add_to_cloud_when = Mod(Cycle_Iter, | ||
+ | |||
+ | Averaged clouds eliminate noise and is effective if the cloud remains stationery which is generally the case. Note that // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Allows for modification to phases of weak reflections. For example, to add p/2 to the phases of weak reflections then the following could be used: | ||
+ | |||
+ | add_to_phases_of_weak_reflections 90 | ||
+ | |||
+ | When // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Determines //a// and //b// each CF iteration such that the following is a minimum: | ||
+ | |||
+ | // | ||
+ | |||
+ | where //Fc// and //Fo// are the calculated and observed moduli respectively. Use of // | ||
+ | |||
+ | ** [// | ||
+ | |||
+ | Defines the input hkl file. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Data input is from a file created using // | ||
+ | |||
+ | // | ||
+ | |||
+ | scale_Aij = Get(Aij); | ||
+ | |||
+ | scale_Aij = Get(Aij)^2; ‘ the default | ||
+ | |||
+ | scale_Aij = 0; ‘ Equivalent to using a Pawley generated hkl file | ||
+ | |||
+ | CF on powder data can also be initiated using standard hkl files. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Interrupts charge flipping to execute // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Structure factors are normalized when non-zero and when // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Attempts to remove isotropic temperature effects from the structure factors. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Reflections are deleted before entering CF according to // | ||
+ | |||
+ | delete_observed_reflections = D_spacing < 1.1; | ||
+ | |||
+ | Once deleted, observed reflections cannot be reinstated by changing //min_d//. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used to sharpen electron density clouds by filling in missing reflections; | ||
+ | |||
+ | extend_calculated_sphere_to 1 | ||
+ | |||
+ | add_to_phases_of_weak_reflections = If(Rand(0, 1) < .3, 90, 0); | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines atom types and number of atoms within the unit cell; used by the tangent formula in determining // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | If defined and non-zero then origin finding is turned ON. // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Allwows for a user defined flip; here’s an example: | ||
+ | |||
+ | flip_equation = | ||
+ | |||
+ | If(Get(density) < Get(threshold), | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The elctron density is modified according to Eq. (11‑1) and then further modified using: | ||
+ | |||
+ | < | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The elctron density is modified according to Eq. (11‑1) and then further modified using: | ||
+ | |||
+ | < | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The amount of charge flipped is fractionally based. A value of 0.6, for example, sets the threshold //d// such that the sign of the lowest 60% of charge is changed. Get(// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the fraction of observed reflections to flag as “weak”. When // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | An implementation of Histogram Matching (Baerlocher //et al.,// 2007) where the distribution of pixels within the unit cell is restrained to one that mathes Gaussian atoms with intensities corresponding to the atoms defined by // | ||
+ | |||
+ | histogram_match_scale_fwhm = If(Mod(Cycle_Iter, | ||
+ | |||
+ | hm_size_limit_in_fwhm 1 | ||
+ | |||
+ | hm_covalent_fwhm 1 | ||
+ | |||
+ | Reported on is the fraction of pixels modified; values of 1 for both // | ||
+ | |||
+ | ** [// | ||
+ | |||
+ | Determines in Angstroms the resolution of observed reflections to work with; only observed reflections with a d-spacing above //min_d// are considered. //min_d// is evaluated each CF iteration. Get(// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | If defined then the grid spacing used is set to the smaller of //min_d///2 and // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Signals that the input data is of neutron type. Used in the picking of atoms and additionally // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[//omit// !E]** | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | pick_atoms “O C” | ||
+ | |||
+ | activate = Mod(Cycle_Iter, | ||
+ | |||
+ | The picking routine will attempts to locate the atom types found in $atom based on the intensities of picked atoms and the scattering power of the atoms defined in // | ||
+ | |||
+ | load f_atom_type f_atom_quantity { Ca 2 O 10 C 12 } | ||
+ | |||
+ | pick_atoms “O C” | ||
+ | |||
+ | Here 2 Ca atoms are first picked and then 10 O atoms and then 12 C atoms. The picked atoms operated on will be the O and C atoms with the Ca atoms ignored. | ||
+ | |||
+ | // | ||
+ | |||
+ | choose_from 4 | ||
+ | |||
+ | choose_to 20 | ||
+ | |||
+ | // | ||
+ | |||
+ | //omit// removes operated on atoms from the electron density. Atoms can be partially removed by setting //omit// to values less than 1. Values greater than 1 can also be used, the effect is to change the sign of the electron density. //omit// operating on a few of the highest intensity atoms is an extremely effective means of preventing the occurance of uranium atom solutions, see CF-1A7Y-OMIT.INP; | ||
+ | |||
+ | pick_atoms * | ||
+ | |||
+ | choose_to 5 | ||
+ | |||
+ | omit = Rand(1, 1.1); | ||
+ | |||
+ | Omitting atoms randomly is a technique referred to as “random omit maps“ in ShelXD, [[http:// | ||
+ | |||
+ | //insert// inserts operated on atoms; a value of 1 inserts the atoms with an intensity that is equal to the average of the picked atoms. Values of less than 1 descreases the intensity of the inserted atoms. When //insert// is defined then //omit// is internally defined if it does not already exist. Thus, atoms are removed before insertion by default. | ||
+ | |||
+ | // | ||
+ | |||
+ | displace = Rand(0.4, 0.6); | ||
+ | |||
+ | insert 1 | ||
+ | |||
+ | There can be more than one occurance of // | ||
+ | |||
+ | pick_atoms * | ||
+ | |||
+ | choose_to 5 | ||
+ | |||
+ | insert = Rand(-.1, 1); | ||
+ | |||
+ | To further randomly remove ~33% of atoms then the following could additionally be used: | ||
+ | |||
+ | break_cycle_if_true = Get(iters_since_last_best) > 10; | ||
+ | |||
+ | pick_atoms * | ||
+ | |||
+ | activate = Cycle_Iter == 0; | ||
+ | |||
+ | insert = If(Rand(0, 1) > 0.33, 10, 0); | ||
+ | |||
+ | Note that in this example atoms are inserted at ten times the average picked intensity; this simply gives more weight to picked atoms relative to electron density noise. Additionaly weak reflections are also given more weighting. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Atoms are picked in the OpenGL display when // | ||
+ | |||
+ | pick_atoms_when = Mod(Cycle_Iter + 1, 10) == 0; | ||
+ | |||
+ | Note that picking can be manually initiated from the Cloud dialog of the OpenGL display. A text description of picked atoms can be obtained by opening the “Temporary output” text window of the OpenGL window. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Initializes phases. To start a process with already saved phase information then the following could be used: | ||
+ | |||
+ | set_initial_phases_to aleady_saved.fc | ||
+ | |||
+ | randomize_initial_phases_by 0 ' this has a default of Rand(-180, | ||
+ | |||
+ | **[// | ||
+ | |||
+ | randomize_phases_on_new_cycle_by = Rand(-180, 180); ‘ an example | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Electron density pixels that are less than the threshold value are scaled by // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Normalized structure factors (// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | CF works with normalized structure factors by default. //scale_F// is an additional scaling of structure factors. The defualt //scale_F// broadens electron density peaks to avoid pixilation effects and is given by: | ||
+ | |||
+ | scale_F = Exp(-0.2 Get(d_squared_inverse)); | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Scale should be set to 1 for compliance with the algorithm of [[http:// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | By default weak reflection structure factors are set to zero; however when either // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Sets initial phases to those appearing in $file. Typically $file corresponds to a *.FC file saved in a previous charge-flipping process. // | ||
+ | |||
+ | modify_initial_phases = | ||
+ | |||
+ | Get(initial_phase) + Min(Abs(Get(phase_difference)), | ||
+ | |||
+ | where phase_difference corresponds to the difference between the current phase and the initial phase; it has a value between ±90º. // | ||
+ | |||
+ | |||
+ | **[// | ||
+ | |||
+ | If defined then the // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | If a space group is defined then symmetry is adhered to according to // | ||
+ | |||
+ | For a particular set of equivalent grid points as determined by the equivalent positions of the space group an average density // | ||
+ | |||
+ | // | ||
+ | |||
+ | The text output ' | ||
+ | |||
+ | ' | ||
+ | |||
+ | where the summation is over all of the electron density grid points. | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | | < | ||
+ | |||
+ | **[// | ||
+ | |||
+ | By default Get(// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Sets initial phases to those saved in a previous *.FC file. The FC file used corresponds to the same name as the data file, defined using // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | A value of 1 outputs text in a verbose manner. A value of 0 outputs text only when a // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Informs a detected GUI to display the electron density. Here are some examples: | ||
+ | |||
+ | view_cloud 1 ' Update cloud every charge-flipping iteration | ||
+ | |||
+ | view_cloud = Mod(Cycle_Iter, | ||
+ | |||
+ | |||
+ | |||
+ | ====== 12 Indexing ====== | ||
+ | |||
+ | The following algorithm is based on the iterative method of Coelho (2003). Unlike [[# | ||
+ | |||
+ | index_zero_error | ||
+ | |||
+ | try_space_groups "2 75" | ||
+ | |||
+ | load index_d { | ||
+ | |||
+ | 8.912 | ||
+ | |||
+ | 7.126 | ||
+ | |||
+ | 4.296 | ||
+ | |||
+ | … | ||
+ | |||
+ | } | ||
+ | |||
+ | Individual space groups can be tried or for simplicity all of the Bravais lattices can be tried by placing them in the INP file using the standard macros as follows: | ||
+ | |||
+ | Bravais_Cubic_sgs | ||
+ | |||
+ | Bravais_Trigonal_Hexagonal_sgs | ||
+ | |||
+ | Bravais_Tetragonal_sgs | ||
+ | |||
+ | Bravais_Orthorhombic_sgs | ||
+ | |||
+ | Bravais_Monoclinic_sgs | ||
+ | |||
+ | Bravais_Triclinic_sgs | ||
+ | |||
+ | On termination of Indexing a *.NDX file is created with a name corresponding to the name of the INP file and placed in the same directory as the INP file. The *.NDX file contains solutions found as well as a detailed summary of the best 20 solutions. Here’s an example of an NDX file: | ||
+ | |||
+ | ' Indexing method - Alan Coelho (2003), J. Appl. Cryst. 36, 86-95 | ||
+ | |||
+ | ' Time: 2.015 seconds | ||
+ | |||
+ | |||
+ | |||
+ | ' | ||
+ | |||
+ | |||
+ | |||
+ | Indexing_Solutions_With_Zero_Error_2 { | ||
+ | |||
+ | |||
+ | |||
+ | 0) P42/ | ||
+ | |||
+ | 1) P42/ | ||
+ | |||
+ | 2) P42/ | ||
+ | |||
+ | ... | ||
+ | |||
+ | } | ||
+ | |||
+ | %%/*%% | ||
+ | |||
+ | %%======================================================================%% | ||
+ | |||
+ | 0) P-1 0 985.652 30.80 0.0111 7.0877 ... | ||
+ | |||
+ | |||
+ | |||
+ | h k l dc do do-dc 2Thc 2Tho 2Tho-2Thc | ||
+ | |||
+ | 0 0 1 15.857 15.830 -0.027 5.569 5.578 0.009 | ||
+ | |||
+ | 0 1 0 8.765 8.750 -0.015 10.084 10.101 0.017 | ||
+ | |||
+ | 0 0 2 7.928 7.910 -0.018 11.151 11.177 0.026 | ||
+ | |||
+ | 0 1 1 7.788 7.780 -0.008 11.352 11.364 0.012 | ||
+ | |||
+ | 0 -1 1 7.559 7.560 0.001 11.698 11.696 -0.002 | ||
+ | |||
+ | ... | ||
+ | |||
+ | %%*/%% | ||
+ | |||
+ | ===== 12.1 Reprocessing solutions - DET files ===== | ||
+ | |||
+ | Details of solutions can be obtained at a later stage by including solution lines found in the NDX file into the INP file. For example, supposing details of solutions 50 and 51 were sought then the following (see example INDEXING\EX10.INP) could be used: | ||
+ | |||
+ | index_lam 1.540596 | ||
+ | |||
+ | index_zero_error | ||
+ | |||
+ | try_space_groups 2 | ||
+ | |||
+ | |||
+ | |||
+ | Indexing_Solutions_With_Zero_Error_2 { | ||
+ | |||
+ | 50) P-1 1 0 2064.788 9.74 0.0000 ... | ||
+ | |||
+ | 51) P-1 3 0 3128.349 9.61 0.0115 ... | ||
+ | |||
+ | } | ||
+ | |||
+ | load index_d { | ||
+ | |||
+ | 15.83 good | ||
+ | |||
+ | 8.75 | ||
+ | |||
+ | 7.91 | ||
+ | |||
+ | ... | ||
+ | |||
+ | } | ||
+ | |||
+ | After running this INP file a *.DET file is created containing details of the supplied solutions. | ||
+ | |||
+ | ===== 12.2 Keywords and data structures ===== | ||
+ | |||
+ | The data structures for indexing are as follows: | ||
+ | |||
+ | Tindexing | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [[# | ||
+ | |||
+ | [// | ||
+ | |||
+ | [// | ||
+ | |||
+ | Values for most keywords are automatically determined or have default values (appearing as numbers above) adequate for difficult indexing problems. In the following example from UPPW (service provided by Armel Le Bail to the SDPD mailing list at [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | seed | ||
+ | |||
+ | index_lam 0.79776 | ||
+ | |||
+ | index_zero_error | ||
+ | |||
+ | index_max_Nc_on_No 6 | ||
+ | |||
+ | try_space_groups 3 | ||
+ | |||
+ | load index_th2 dummy dummy index_I dummy { | ||
+ | |||
+ | ' d (A) 2Theta Height Area FWHM | ||
+ | |||
+ | 1.724 26.50645 2758.3 23303.7 0.0450 | ||
+ | |||
+ | 2.646 17.27733 150393.8 747063.6 0.0250 | ||
+ | |||
+ | 3.235 14.13204 98668.8 493153.7 0.0250 | ||
+ | |||
+ | 3.417 13.37776 11102.6 53185.0 0.0250 | ||
+ | |||
+ | 5.190 8.80955 782.7 3910.9 0.0250 | ||
+ | |||
+ | ... | ||
+ | |||
+ | } | ||
+ | |||
+ | ===== 12.3 Keywords in detail ===== | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the wavelength in Å. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the minimum and maximum allowed lattice parameters. Typically the maximum is determined automatically. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Determines the maximum ratio of the number of calculated to observed lines. The value of 6 allows for up to 83% of missing lines. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | The number of best solutions to keep. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Used for determining impurity lines (un-indexed lines UNI in *.NDX). Large values, 1 for example, forces the consideration of more observed input lines. For example if it is know that there are none or maybe just one impurity line then a large value for // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Excludes solutions with zero errors greater than // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | // | ||
+ | |||
+ | //index_I// is typically set to the area under the peak; it is used to weight the reflection. | ||
+ | |||
+ | // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines // | ||
+ | |||
+ | < | ||
+ | |||
+ | index_x0 = 1%%/ | ||
+ | |||
+ | speeds up the indexing process (if, in this case, the first line can be indexed as 100) and additionally the chances of finding the correct solution is enhanced. Example EX13.INP demonstrates this. Note that if the data is in 2Th degrees then the following can be used: | ||
+ | |||
+ | index_x0 = (2 Sin(2Th< | ||
+ | |||
+ | The two macros Index_x0_from_d and Index_x0_from_th2 simplify the use of // | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Includes a zero error. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Seeds the random number generator. | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | **[// | ||
+ | |||
+ | Defines the space groups to be searched. The macros Bravais_Cubic_sgs etc... (see TOPAS.INC) defines lowest symmetry Bravais space groups. It is almost always sufficient to use only these. Higher symmetry space groups for the Bravais lattices corresponding to the 10 best solutions is subsequently searched. Here are some examples of using // | ||
+ | |||
+ | | **Search** | **Use** | | ||
+ | | Primitive monoclinic | try_space_groups 3 | | ||
+ | | The two monoclinic Bravais lattices of lowest symmetry. | Bravais_Monoclinic_sgs | | ||
+ | | C-centered monoclinic of lowest symmetry. | try_space_groups 5 | | ||
+ | | All orthorhombic space groups individually. | Unique_Orthorhombic_sgs | | ||
+ | |||
+ | Below is a list showing which space groups have identical hkls in regards to powder data. | ||
+ | |||
+ | //x_scaler is a// scaling factor used for determining the number of steps to search in parameter space. // | ||
+ | |||
+ | Cubic 0.99 | ||
+ | |||
+ | Hexagonal/ | ||
+ | |||
+ | Tetragonal 0.95 | ||
+ | |||
+ | Orthorhombic 0.89 | ||
+ | |||
+ | Monoclinic 0.85 | ||
+ | |||
+ | Triclinic 0.72 | ||
+ | |||
+ | // | ||
+ | |||
+ | ===== 12.4 Identifying dominant zones ===== | ||
+ | |||
+ | Here are two example output lines from an NDX file. | ||
+ | |||
+ | 0) P42/nmc 3 0 1187.124 38.82 0.0000 11.1904 11.1904 9.4799 90.000 90.000 90.000 ' === 24 19 | ||
+ | |||
+ | 6) P-421c 3 0 1187.124 35.67 0.0000 11.1904 11.1904 9.4799 90.000 90.000 90.000 ' === 24 19 | ||
+ | |||
+ | Ø The 1< | ||
+ | |||
+ | Ø The 2< | ||
+ | |||
+ | Ø The 3< | ||
+ | |||
+ | | | Status 1: | Weighting applied as defined in Coelho (2003) | | ||
+ | | | Status 2: | Zero error attempt applied | | ||
+ | | | Status 3: | Zero error attempt successful and impurity lines removal attempt successful | | ||
+ | | | Status 4: | Impurity line(s) removed | | ||
+ | |||
+ | Ø The 4< | ||
+ | |||
+ | Ø The 5< | ||
+ | |||
+ | Ø The 6< | ||
+ | |||
+ | Ø The 7< | ||
+ | |||
+ | Ø Columns 8 to 13 contains the lattice parameters. | ||
+ | |||
+ | The last 2 columns contain the number of non-zero h< | ||
+ | |||
+ | The following table gives the hkl coefficients corresponding to the X< | ||
+ | |||
+ | | ** ** | X0 | X1 | X2 | X3 | X4 | X5 | | ||
+ | | Cubic | h< | ||
+ | | Hexagonal Trigonal | h< | ||
+ | | Tetragonal | h< | ||
+ | | Orhtorhombic | h< | ||
+ | | Monoclinic | h< | ||
+ | | Triclinic | h< | ||
+ | |||
+ | ===== 12.5 %%***%% Probable causes of Failure %%***%% ===== | ||
+ | |||
+ | The most probable cause of failure is the inclusion of too many d-spacings. If it is assumed that the smallest lattice parameter is greater than 3Å then it is problematic to include d-spacings with values less than about 2.5Å when there are already 30 to 40 reflections with d values greater than 2.5Å. Some of the problems caused by very low d-spacings are: | ||
+ | |||
+ | Ø The number of calculated lines increases dramatically and thus // | ||
+ | |||
+ | Ø The low d-spacings are probably inaccurate due to peak overlap at the high angles they are observed at. | ||
+ | |||
+ | A situation where it is necessary to include low d-spacings is when there are only a few d-spacings available as in higher symmetry lattices. | ||
+ | |||
+ | ===== 12.6 Unique space group hkls in Powder diffraction ===== | ||
+ | |||
+ | | **Space group numbers with** **identical hkls** | **Space group symbols with** **identical hkls** | | ||
+ | | **Triclinic** || | ||
+ | | 1 2 | P1 P-1 | | ||
+ | | **Monoclinic** || | ||
+ | | 9 15 | Cc C2/c | | ||
+ | | 5 8 12 | C2 Cm C2/m | | ||
+ | | 14 | P21/c | | ||
+ | | 7 13 | Pc P2/c | | ||
+ | | 4 11 | P21 P21/m | | ||
+ | | 3 6 10 | P2 Pm P2/m | | ||
+ | | **Orthorhombic** || | ||
+ | | 70 | Fddd | | ||
+ | | 43 | Fdd2 | | ||
+ | | 22 42 69 | F222 Fmm2 Fmmm | | ||
+ | | 68 | Ccca | | ||
+ | | 73 | Ibca | | ||
+ | | 37 66 | Ccc2 Cccm | | ||
+ | | 45 72 | Iba2 Ibam | | ||
+ | | 41 64 | Aba2 Cmca | | ||
+ | | 46 74 | Ima2 Imma | | ||
+ | | 36 40 63 | Cmc21 Ama2 Cmcm | | ||
+ | | 39 67 | Abm2 Cmma | | ||
+ | | 20 | C2221 | | ||
+ | | 23 24 44 71 | I222 I212121 Imm2 Immm | | ||
+ | | 21 35 38 65 | C222 Cmm2 Amm2 Cmmm | | ||
+ | | 52 | Pnna | | ||
+ | | 56 | Pccn | | ||
+ | | 60 | Pbcn | | ||
+ | | 61 | Pbca | | ||
+ | | 48 | Pnnn | | ||
+ | | 54 | Pcca | | ||
+ | | 50 | Pban | | ||
+ | | 33 62 | Pna21 Pnma | | ||
+ | | 34 58 | Pnn2 Pnnm | | ||
+ | | 32 55 | Pba2 Pbam | | ||
+ | | 30 53 | Pnc2 Pmna | | ||
+ | | 29 57 | Pca21 Pbcm | | ||
+ | | 27 49 | Pcc2 Pccm | | ||
+ | | 31 59 | Pmn21 Pmmn | | ||
+ | | 26 28 51 | Pmc21 Pma2 Pmma | | ||
+ | | 19 | P212121 | | ||
+ | | 18 | P21212 | | ||
+ | | 17 | P2221 | | ||
+ | | 16 25 47 | P222 Pmm2 Pmmm | | ||
+ | | **Tetragonal** || | ||
+ | | 142 | I41/acd | | ||
+ | | 110 | I41cd | | ||
+ | | 141 | I41/amd | | ||
+ | | 109 122 | I41md I-42d | | ||
+ | | 108 120 140 | I4cm I-4c2 I4/mcm | | ||
+ | | 88 | I41/a | | ||
+ | | 80 98 | I41 I4122 | | ||
+ | | 79 82 87 97 107 119 121 139 | I4 I-4 I4/m I422 I4mm I-4m2 I-42m I4/mmm | | ||
+ | | 130 | P4/ncc | | ||
+ | | 126 | P4/nnc | | ||
+ | | 133 | P42/nbc | | ||
+ | | 103 124 | P4cc P 4/mcc | | ||
+ | | 104 128 | P4nc P 4/mnc | | ||
+ | | 106 135 | P42bc P 42/mbc | | ||
+ | | 137 | P42/nmc | | ||
+ | | 138 | P42/ncm | | ||
+ | | 134 | P42/nnm | | ||
+ | | 125 | P4/nbm | | ||
+ | | 114 | P-421c | | ||
+ | | 105 112 131 | P42mc P-42c P42/mmc | | ||
+ | | 102 118 136 | P42nm P-4n2 P42/mnm | | ||
+ | | 101 116 132 | P42cm P-4c2 P42/mcm | | ||
+ | | 100 117 127 | P4bm P-4b2 P4/mbm | | ||
+ | | 86 | P42/n | | ||
+ | | 85 129 | P4/n P4/nmm | | ||
+ | | 92 96 | P41212 P43212 | | ||
+ | | 94 | P42212 | | ||
+ | | 76 78 91 95 | P41 P43 P4122 P4322 | | ||
+ | | 77 84 93 | P42 P 42/m P4222 | | ||
+ | | 90 113 | P4212 P-421m | | ||
+ | | 75 81 83 89 99 111 115 123 | P4 P-4 P4/m P422 P4mm P-42m P-4m2 P4/mmm | | ||
+ | | **Trigonal & Hexagonal** || | ||
+ | | 161 167 | R3c R-3c | | ||
+ | | 146 148 155 160 166 | R3 R-3 R32 R3m R-3m | | ||
+ | | 184 192 | P6cc P6/mcc | | ||
+ | | 159 163 186 190 194 | P31c P-31c P63mc P-62c P63/mmc | | ||
+ | | 158 165 185 188 193 | P3c1 P-3c1 P63cm P-6c2 P63/mcm | | ||
+ | | 169 170 178 179 | P61 P65 P6122 P6522 | | ||
+ | | 144 145 151 152 153 154 171 172 180 181 | P31 P32 P3112 P3121 P3212 P3221 P62 P64 P6222 P6422 | | ||
+ | | 173 176 182 | P63 P63/m P6322 | | ||
+ | | 143 147 149 150 156 157 162 164 168 174 175 177 183 187 189 191 | P3 P-3 P312 P321 P3m1 P31m P-31m P-3m1 P6 P-6 P6/m P622 P6mm P-6m2 P-62m P6/mmm | | ||
+ | | **Cubic** || | ||
+ | | 228 | Fd-3c | | ||
+ | | 219 226 | F-43c Fm-3c | | ||
+ | | 203 227 | Fd-3 Fd-3m | | ||
+ | | 210 | F4132 | | ||
+ | | 196 202 209 216 225 | F23 Fm-3 F432 F-43m Fm-3m | | ||
+ | | 230 | Ia-3d | | ||
+ | | 220 | I-43d | | ||
+ | | 206 | Ia-3 | | ||
+ | | 214 | I4132 | | ||
+ | | 197 199 204 211 217 229 | I23 I213 Im-3 I432 I-43m Im-3m | | ||
+ | | 222 | Pn-3n | | ||
+ | | 218 223 | P-43n Pm-3n | | ||
+ | | 201 224 | Pn-3 Pn-3m | | ||
+ | | 205 | Pa-3 | | ||
+ | | 212 213 | P4332 P4132 | | ||
+ | | 198 208 | P213 P4232 | | ||
+ | | 195 200 207 215 221 | P23 Pm-3 P432 P-43m Pm-3m | | ||
+ | |||
+ | ===== 12.7 Equations in Indexing - Background ===== | ||
+ | |||
+ | **//a//**, **//b//** and **//c//** lattice vectors can be converted to Cartesian coordinates with **//a//** collinear with the Cartesian //x// axis and **//b//** coplanar with the Cartesian //x//-//y// plane as follows: | ||
+ | |||
+ | | **//a//** = // | ||
+ | |||
+ | where | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | |||
+ | //a//, //b//, //c// are the lattice parameters and //a, b,// g the lattice angles. The reciprocal lattice vectors **//A//**, **//B//**, and **//C//** calculated from the lattice vectors of Eq. (12‑1) become: | ||
+ | |||
+ | **//A//**= // | ||
+ | |||
+ | **//B//** = // | ||
+ | |||
+ | **//C//** = // | ||
+ | |||
+ | The equation relating a particular d-spacing // | ||
+ | |||
+ | |||
+ | |||
+ | | < | ||
+ | |||
+ | where | ||
+ | |||
+ | < | ||
+ | |||
+ | The command line program tc.exe provides for batch mode operation. Running tc.exe without arguments displays help information. Running an INP file is as follows: | ||
+ | |||
+ | tc pbso4 | ||
+ | |||
+ | Macros can be passed to the command line. One use for this is to pass a file name to an INP file as follows: | ||
+ | |||
+ | 1) Create a TEMPLATE.INP file with the required refinement details, this should look something like the following: | ||
+ | |||
+ | xdd FILE | ||
+ | |||
+ | etc... | ||
+ | |||
+ | 2) TEMPLATE.INP is fed to tc.exe by command line and the word FILE (within TEMPLATE.INP) is expanded to whatever the macro on the command line is. For example, | ||
+ | |||
+ | tc ...\file_directory\TEMPLATE.INP "macro FILE { file.xy }" | ||
+ | |||
+ | The macro called FILE is described on the command line within quotation marks. On running tc.exe the word ' | ||
+ | |||
+ | To process a whole directory of data files, say *.XY file for example, then: | ||
+ | |||
+ | 1) From the file directory execute the DOS command: | ||
+ | |||
+ | dir *.xy > ...\main_ta_directory\XY.BAT | ||
+ | |||
+ | The XY.BAT file will then reside in the main TA directory. | ||
+ | |||
+ | 2) Edit ...\main_ta_directory\XY.BAT to look like the following: | ||
+ | |||
+ | tc ...\file_directory\template "macro FILE { file1.xy }" | ||
+ | |||
+ | copy ...\file_directory\template.out ...\file_directory\file1.out | ||
+ | |||
+ | tc ...\file_directory\template.inp "macro FILE { file2.xy }" | ||
+ | |||
+ | copy ...\file_directory\template.out ...\file_directory\file2.out | ||
+ | |||
+ | etc.... | ||
+ | |||
+ | After each run of tc.exe a TEMPLATE.OUT file is created containing refined results. This file is copied to another file " | ||
+ | |||
+ | After running XY.BAT a number of *.OUT files is created one for each *.XY file. | ||
+ | |||
+ | In summary TC.EXE receives TEMPLATE.INP to process. Words occurring in TEMPLATE.INP are expanded depending on the macros described on the command line. | ||
+ | |||
+ | |||
+ | |||
+ | ====== 14 References ====== | ||
+ | |||
+ | **Baerlocher, | ||
+ | |||
+ | **Baerlocher, | ||
+ | |||
+ | **Balzar, D. (1999).** Microstructure Analysis from Diffraction, | ||
+ | |||
+ | **Bergmann, J., Kleeberg, R., Haase, A. & Breidenstein, | ||
+ | |||
+ | **Brindley, G.W. (1945)**// | ||
+ | |||
+ | **Broyden, C.G**., J. Inst. Maths. Applics., Vol. 6, pp 76-90, 1970. "The Convergence of a Class of Double-rank Minimization Algorithms," | ||
+ | |||
+ | **Cagliotti, | ||
+ | |||
+ | **Coelho, A. A. (2005)**. //J. Appl. Cryst.// 38, 455-461. "A bound constrained conjugate gradient solution method as applied to crystallographic refinement problems" | ||
+ | |||
+ | **Coelho, A. A,. (2003)**. //J. Appl. Cryst.//, **36**, 86--95. “Indexing of powder diffraction patterns by iterative use of singular value decomposition”. | ||
+ | |||
+ | **Coelho, A. A. & Cheary, R. W. (1997).** Computer Physics Communications, | ||
+ | |||
+ | **Cheary, R.W. & Coelho, A.A. (1998a).** J. Appl. Cryst., **31**, 851-861. //“Axial divergence in a conventional X‑ray powder diffractometer I. Theoretical foundations”// | ||
+ | |||
+ | **Cheary, R.W. & Coelho, A.A. (1998b).** J. Appl. Cryst., **31**, 862-868. “//Axial divergence in a conventional X‑ray powder diffractometer II. Implementation and comparison with experiment// | ||
+ | |||
+ | **Baerlocher, | ||
+ | |||
+ | **Chernick, M.R. (1999)**. //Bootstrap Methods, A Practitioner’s Guide//, Wiley, New York. | ||
+ | |||
+ | **DiCiccio, T.J. & Efron, B. (1996)**. Bootstrap confidence intervals (with discussion), | ||
+ | |||
+ | **Durbin, J. & Watson, G.S. (1971).** Biometrika, **58**, 1-19. “// | ||
+ | |||
+ | **Efron, B. & Tibshirani, R. (1986)**. Bootstrap methods for standard errors, confidence intervals and other measures of statistical accuracy, // | ||
+ | |||
+ | **Fletcher, R**. (1970). Computer Journal, Vol. 13, pp 317-322. "A New Approach to Variable Metric Algorithms," | ||
+ | |||
+ | **Finger, L.W., Cox, D.E & Jephcoat, A.P. (1994).** J. Appl. Cryst., **27**, 892-900. “//A correction for powder diffraction peak asymmetry due to axial divergence// | ||
+ | |||
+ | **Flack****, | ||
+ | |||
+ | **Goldfarb, D**. (1970). Mathematics of Computing, Vol. 24, pp 23-26. “A Family of Variable Metric Updates Derived by Variational Means” | ||
+ | |||
+ | **Hauptman, H. & Karle, J. (1956).** //Acta Cryst.// **9**, 635 | ||
+ | |||
+ | **Hill, R.J. & Flack, H.D. (1987)**. J. Appl. Cryst., **20**, 356-361. “The Use of the Durbin-Watson d Statistic in Rietveld Analysis” | ||
+ | |||
+ | **Hölzer, G., Fritsch, M., Deutsch, M., Härtwig, J. & Förster, E. (1997).**Physical Review A, **56**, 4554-4568. “// | ||
+ | |||
+ | **Järvinen, | ||
+ | |||
+ | **Johnson, C.K. & Levy, H.A. (1974)**// | ||
+ | |||
+ | **Le Bail, A. & Jouanneaux, A. (1997)**// | ||
+ | |||
+ | **Lister, S. E.; Radosavljevic Evans, I.; Howard, J. A. K.; Coelho A. and Evans, J. S. O. (2004)**. Chemical Communications, | ||
+ | |||
+ | **March, A. (1932).** Z. Krist., **81**, 285-297. “// | ||
+ | |||
+ | **Marquardt, | ||
+ | |||
+ | **[[http:// | ||
+ | |||
+ | **[[http:// | ||
+ | |||
+ | **[[http:// | ||
+ | |||
+ | **[[http:// | ||
+ | |||
+ | **Shanno, D.F**. (1970). Mathematics of Computing, Vol. 24, pp 647-656. " | ||
+ | |||
+ | **Favre-Nicolin, | ||
+ | |||
+ | **Sabine, T. M., Hunter, B. A., Sabine, W. R., Ball, C. J**. **(1998)**: J. Appl. Cryst. 31, 47-51 | ||
+ | |||
+ | **[[http:// | ||
+ | |||
+ | **Shiono****, | ||
+ | |||
+ | **Young, R.A. (1993).** The Rietveld Method, edited by R.A. Young, IUCr Book Series, Oxford University Press 1993, 1-39. “// |
manual_part_3.txt · Last modified: 2022/11/03 15:08 by 127.0.0.1