4.38. MODHKL: Modify reflection data

Author: Syd Hall, Crystallography Centre, University of Western Australia, Nedlands 6907, Australia

MODHKL edits specific reflections in the bdf, global changes to reflection codes, global deletion of reflection items or the removal of reflection packets from the bdf.

4.38.1. Description

During the course of a structure analysis, it may be necessary to make small changes to the reflection data. This program facilitates easy modification of reflection data stored in a bdf. Complicated changes such as the inclusion of new information for every reflection, changes in cell parameters, or expansion of the number of items stored for every reflection will require the use of programs such as ADDREF.

MODHKL may be used to make four different types of changes to the reflection data. In all cases the items accessed in a bdf reflection packet are identified by their ID numbers listed in the BDF section at the back of the manual. The user may modify any existing data in lrrefl: on the bdf. It is possible to reduce the size of packets by eliminating items. However, expansion of the packets is not possible.

4.38.2. Global HKL Options

4.38.2.1. rcode

The rcode line enables the global change of reflection codes according to two entered conditions. Each condition on the rcode line is composed of four input fields in the order: factor1, item1, factor2, item2. The factors 1 and 2 are floating-point multipliers, and items 1 and 2 are the bdf directory numbers for the specified items. Values are applied for each condition using the following expression to give a TRUE or a FALSE result:

factor1*item1 > factor2*item2

If both conditions are specified, then the new rcode will replace the old rcode only if BOTH conditions are TRUE. If only condition 1 is specified, then condition 2 will be ignored and the rcode will be changed when condition 1 is TRUE. When the new rcode is already equal to the old rcode, the reflection is NOT listed as changed even if the conditions are true. The rcode line may be used only if an rcode already exists on the bdf. Only one rcode line may be entered.

4.38.2.2. remove

The remove line enables the global removal of quantities from the reflection packets of a bdf. The fields of the remove line(s) must contain valid reflection packet directory numbers for the items to be removed from all packets. These numbers must not be used again in the run. For example, if purge lines follow, the same directory numbers cannot appear in these lines.

4.38.2.3. purge

The purge line is used to remove reflection packets from the bdf according to the specified conditions 1 and 2. The general form of these conditions is identical to the rcode line. If both conditions are entered, then both must be true before a reflection is purged. If only one condition is entered, then a reflection is purged if this condition is true. The purge line acts to remove reflections while the remove line removes items for every reflection whether some purge condition is set or not. It is not possible to set a purge condition based upon an item which is specified to be removed. Only one purge line may be entered.

4.38.2.4. Specific modify and delete Options

The modify and delete lines are used to modify and to delete specific reflections. modmul and delmul are equivalent commands suitable for editing macromolecule data where there are multiple occurrences of the same reflection. These have been sorted on hkl but not averaged.

The input lines modify, modmul, delete, and delmul must be entered in the same sort order as the reflections on the input bdf. If this condition is not met an error will occur at the end of processing.

The difference between modify and modmul (and between delete and delmul) is that there exists one additional field containing the occurrence number. The occurrence number is the count of which measurement for a given hkl is to be treated; one for the first, two for the second, etc. With use of these lines it is possible to remove reflection packets from the bdf or to modify individual data stored on the bdf. If the occurrence number is omitted, all occurrence will be processed.

Note that neither the hkl nor the multiplicity-epsilon items may be changed by use of MODHKL. They are "packed" floating point words and are outside the scope of this program.

4.38.3. File Assignments

4.38.4. Examples

MODHKL
purge 1. 2 0.44                   :delete hkl if s >.44
rcode 2 3. 1305 1. 1304            :make rcode=2 if 3sigmaF > F

MODHKL
modify 0 4 5 1301 143.2 1300 95632.     :modify sI and I
modify 3 5 1 1304 12.6 1305 8.3            :modify F and sF
modify 3 5 1 1308 2                     :modify rcode of same hkl

MODHKL
remove 2314 2315 2304 2305
delmul 1 1 1 2

In this example the items for the F(rel) and F(rel) and their Friedel mates will be remove from all packets. In addition, the second occurance of the (1,1,1) reflection will be dropped from the bdf.