4.8.9 - Unique Reflections List - JdlUniqueReflectionsList

John W. Campbell

4.8.9.1 Introduction

This class stores a list of unique reflections with measurement counts. The class has methods for adding/deleting reflections and sorting the reflection list. In general, reflections are handled as JdlUniqueReflection objects.

Class, constructors and methods:

Class Details
Accessible Fields
Constructors
Manipulate Reflection List
Get Reflection Data
Counts Methods
Generate Unique Data
Update Counts
Sort Reflection List

4.8.9.2 Class Details

Package:
Jdl.JdlPX;
Class name:
JdlUniqueReflectionsList
Class definition:
public class JdlUniqueReflectionsList
Extends:
Object
Implements:
JdlUnqReflOutputHandler
Actions:
none

4.8.9.3 Accessible Fields

No fields with public, package or protected access defined.

4.8.9.4 Constructors

4.8.9.4.1 Introduction

Constructors are available to construct a JdlUniqueReflectionsList object with either a default capacity or a user specified capacity.

Constructors:

Default Constructor
Standard Constructor

4.8.9.4.2 Default Constructor

This constructs a JdlUniqueReflectionsList object with an initial capacity for 5000 reflections to be incremented in blocks of 5000 reflections as required.

Constructor Definition:
public JdlUniqueReflectionsList()
Parameters List:
none

4.8.9.4.3 Standard Constructor

This constructs a JdlUniqueReflectionsList object with a user specified initial capacity and a user specified increment if the list needs to be expanded.

Constructor Definition:
public JdlUniqueReflectionsList (int nr, int inc)
Parameters List:
nr
The initial capacity required (number of reflections).
inc
The increment in number of reflections required each time the list needs to be expanded.

4.8.9.5 Manipulate Reflection List

4.8.9.5.1 Introduction

This section has methods to clear the list and to add/delete/insert replace reflections in the list. It also includes a method to replace reflection indices when a relection is put into an asymmetric unit.

Methods:

Clear list - clearList
Add reflection - addReflection
Insert reflection - insertReflection
Replace reflection - replaceReflection
Delete reflection - deleteReflection

4.8.9.5.2 Clear list - clearList

This method clears the reflections list (i.e. removes all entries though does not decrease its capacity).

Method Definition:
public void clearList()
Parameters List:
none

4.8.9.5.3 Add reflection - addReflection

This method adds a reflection to the end of the list.

Method Definition:
public void addReflection (JdlUniqueReflection refl)
Parameters List:
refl
The reflection to be added.

4.8.9.5.4 Insert reflection - insertReflection

This method inserts a reflection at a given position within the list.

Method Definition:
public void insertReflection (JdlUniqueReflection refl, int iref)
Parameters List:
refl
The reflection to be inserted.
iref
The position within the list where the reflection is to be inserted (reflection positions numbered from 1 upwards).

4.8.9.5.5 Replace reflection - replaceReflection

This method replaces a reflection at a given position within the list.

Method Definition:
public void replaceReflection (JdlUniqueReflection refl, int iref)
Parameters List:
refl
The reflection to replace a current reflection.
iref
The position within the list where the reflection is to be replaced (reflection positions numbered from 1 upwards).

4.8.9.5.6 Delete reflection - deleteReflection

This method deletes a reflection from the list.

Method Definition:
public void deleteReflection (int iref)
Parameters List:
iref
The position within the list of the reflection to be deleted (reflection positions numbered from 1 upwards).

4.8.9.6 Get Reflection Data

4.8.9.6.1 Introduction

This section has methods to retrieve data from the reflection list.

Methods:

Get number of reflections - getNumberOfReflections
Get reflection reference - getReflection
Get sort order - getSortOrder
Get resolution - getHighAngleResolution
Get resolution - getLowAngleResolution

4.8.9.6.2 Get number of reflections - getNumberOfReflections

This method returns the number of reflections currently in the reflection list.

Method Definition:
public int getNumberOfReflections()
Parameters List:
none
Method Return:
The number of reflections in the list.

4.8.9.6.3 Get reflection reference - getReflection

This method returns a reference to the store JdlUniqueReflection object for a reflection at a selected position in the list.

Method Definition:
public JdlUniqueReflection getReflection (int iref)
Parameters List:
iref
The position in the list of the reflection to be returned (from 1 upwards).
Method Return:
The JdlUniqueReflection object for the reflection (reference to stored object - not a copy/clone).

4.8.9.6.4 Get sort order - getSortOrder

This method returns the current sort order.

Method Definition:
public int getSortOrder()
Parameters List:
none
Method Return:
The sort order:
= 1, Sorted on h, k, l
= 2, Sorted on h
= 3, Sorted on k
= 4, Sorted on l
= 0, May not be sorted.

4.8.9.6.5 Get resolution - getHighAngleResolution

This method returns the high angle relolution limit (if set).

Method Definition:
public double getHighAngleResolution()
Parameters List:
none
Method Return:
The high angle resolution limit in Angstroms (0.0 if not set).

4.8.9.6.6 Get resolution - getLowAngleResolution

This method returns the low angle relolution limit (if set).

Method Definition:
public double getLowAngleResolution()
Parameters List:
none
Method Return:
The low angle resolution limit in Angstroms (0.0 if not set - assumed to be infinity).

4.8.9.7 Counts Methods

4.8.9.7.1 Introduction

This section has methods to clear all the measurement counts and to increment relection measurement counts based on measurement flags.

Methods:

Clear counts - clearCounts
Increment counts - incrementCounts
Set symmetry - storeSymmetryReference
Get symetry - getSymmetryReference

4.8.9.7.2 Clear counts - clearCounts

This method clears all the measurement counts.

Method Definition:
public void clearCounts()
Parameters List:
none

4.8.9.7.3 Increment counts - incrementCounts

This method increments the appropriate counts based on the given reflection measurement flags.

Method Definition:
public void incrementCounts(int iref, int ipart, int isign, int ispat)
Parameters List:
iref
The reflection number (from 1 up).
ipart
Full/partial [single/multiple] flag:
= 1, full [single]
= 2, partial over 2 images [from double]
= 3, partial over 3 images [from triple]
> 3, partial over >3 images probably up to a user defined maximum [ from a multiple > 3]
= 0, unknown (e.g. from merged MTZ file)
isign
Reflection sign:
= +1, for +h+k+l class
= -1, for -h-k-l class
= 0, unknown (only allowed if ipart=0)
ispat
Spatial overlap flag:
= 0, Not spatially overlapped
= 1, Spatially overlapped spot
(ignored for 'unknown' full/partial class of reflections)

4.8.9.7.4 Set symmetry - storeSymmetryReference

This method is used to store a reference to the symmetry used to generate the unique reflections list. Note that a reference to the symmetry will be automatically stored if one of the generateUniqueReflections(..) methods is used.

Method Definition:
public void storeSymmetryReference (JdlSymmetry sym)
Parameters List:
sym
The symmetry.

4.8.9.7.5 Get symetry - getSymmetryReference

This method returns a reference to the symmetry used to generate the unique reflections list (if set). It will be set if either the storeSymmetryReference(..) method or generateUniqueReflections(..) methods were used.

Method Definition:
public JdlSymmetry getSymmetryReference()
Parameters List:
none
Method Return:
A reference to the symmetry data (null if not set).

4.8.9.8 Generate Unique Data

4.8.9.8.1 Introduction

This section has methods to generate a set of unique reflection data and to set the stored resolution limits.

Methods:

Generate unique reflections - generateUniqueReflections
Generate unique reflections - generateUniqueReflections
Set resolution limits - setResolutions

4.8.9.8.2 Generate unique reflections - generateUniqueReflections

This method generates the unique list of reflections for a given cell, space group and wavelength within given resolution limits. The resolution limits may be given in either order. The unique reflection list will replace any existing stored reflections. The unique reflection list will be sorted on h, k and l when generated. The internally stored resolution limits will automatically be udpaded based on the values or 'resmin' and 'resmax'. A reference to the symmetry data used will be stored in the object.

Method Definition:
public int generateUniqueReflections(JdlSymmetry symm, JdlCell cell, double wave, double resmin, double resmax)
Parameters List:
symm
The symmetry (full symmetry must be defined)
cell
The real cell parameters.
wave
The wavelength in Angstroms.
resmin
The minimum resolution in Angstroms.
resmax
The maximum resolution in Angstroms (or 0.0 if no limit).
Method Return:
The number of reflections generated (0 if symmetry not defined or other invalid parameters given)

4.8.9.8.3 Generate unique reflections - generateUniqueReflections

This method generates the unique list of reflections for a given cell, space group and wavelength within given resolution limits. The resolution limits may be given in either order and the other parameters are derived, in this version of the method, from a Diffraction Data module object. The unique reflection list will replace any existing stored reflections. The unique reflection list will be sorted on h, k and l when generated. The internally stored resolution limits will automatically be udpaded based on the values or 'resmin' and 'resmax'. A reference to the symmetry data used will be stored in the object.

Method Definition:
public int generateUniqueReflections(JdlDiffractionDataModule ddm, int iset, int img, double resmin, double resmax)
Parameters List:
ddm
JdlDiffractionDataModule object containing the cell, symmetry and wavelength.
iset
Set number within the JdlDiffractionDataModule object.
img
The (reference) image number - normally 1.
resmin
The minimum resolution in Angstroms.
resmax
The maximum resolution in Angstroms (or 0.0 if no limit).
Method Return:
The number of reflections generated (0 if symmetry not defined or other invalid parameters given)

4.8.9.8.4 Set resolution limits - setResolutions

This method sets the stored resolution limits. The values given for the resolution limits may be given in either order.

Method Definition:
public void setResolutions(double resmin, double resmax)
Parameters List:
resmin
The minimum resolution in Angstroms.
resmax
The maximum resolution in Angstroms (or 0.0 if no limit).

4.8.9.9 Update Counts

4.8.9.9.1 Introduction

This section has a method to update the measurement counts for a set of reflection data in a JdlPredictedReflectionsList object.

Method:

Update rotation counts - updateRotationCounts
Update Laue counts - updateLaueCounts
Get last added type - getAddedDataType

4.8.9.9.2 Update rotation counts - updateRotationCounts

This method updates the measurement counts based on data held in a predicted rotation reflections list. Before this method is used, the unique data and predicted data lists must both be sorted on h, k, l. The predicted data must have its indices converted to the unique set with the symmetry numbers set. The data in the reflection file should be for one complete rotation range and image numbers should be stored so that it can be determined if reflections will be completed by the end of the range.

Method Definition:
public boolean updateRotationCounts(JdlPredictedReflectionsList reflis, int nimgmax)
Parameters List:
reflis
The JdlPredictedReflectionsList object. The data must be sorted on h, k, l.
nimgmax
The number of images in the prediction. If 0 then partial reflections will be treated as if they will be completed within the rotation range.
Method Return:
Returns true if OK or false if lists are not both sorted on h, k, l.

4.8.9.9.3 Update Laue counts - updateLaueCounts

This method updates the measurement counts based on data held in a predicted Laue reflections list which may contain potentially deconvoluted harmonics data. Before this method is used, the unique data and predicted data lists must both be sorted on h, k, l. The predicted data must have its indices converted to the unique set with the symmetry numbers set.

Method Definition:
public boolean updateLaueCounts(JdlPredictedLaueSpotsList spotlis)
Parameters List:
spotlis
The JdlPredictedLaueSpotsList object. The data must be sorted on h, k, l.
Method Return:
Returns true if OK or false if lists are not both sorted on h, k, l.

4.8.9.9.4 Get last added type - getAddedDataType

Get the last type of data (rotation/Laue) added to accumulate counts.

Method Definition:
public int getAddedDataType()
Parameters List:
none
Method Return:
The data type:
= 0, None added
= 1, Rotation data
= 2, Laue data

4.8.9.10 Sort Reflection List

4.8.9.10.1 Introduction

This section has a single method to sort the reflection list using one of the available sort options.

Method:

Sort reflection list - sortReflectionList

4.8.9.10.2 Sort reflection list - sortReflectionList

This method sorts the reflection list based on the selected option.

Method Definition:
public void sortReflectionList (int srt_opt)
Parameters List:
sort_opt
Sort order option:
= 1, Sort on h, k and l
= 2, Sort on 'h'
= 3, Sort on 'k'
= 4, Sort on 'l'

⇑ Up 2   ⇑ Up 1   ⇑ Top of this