simbad.util.mtz_util module

Module for MTZ file I/O and manipulation

class ExperimentalData(input_reflection_file)[source]

Bases: object

Class to create a temporary mtz containing all the columns needed for SIMBAD from input reflection file

Attributes

input_reflection_file (str) Path to the input reflection file in ccp4 mtz format
output_mtz_file (str) Path to the output mtz file

Methods

add_array_to_mtz_dataset(miller_array[, …]) Function to add cctbx miller array obj to cctbx mtz dataset obj
change_space_group(new_space_group) Change space group of input mtz
check_anomalous_arrays(miller_array) Function to check intensity/amplitude arrays from cctbx to ensure that they are not anomalous arrays
create_amplitude_array(intensity_array) Function to create a cctbx amplitude array from an cctbx intensity array
create_anomalous_amplitude_array(…) Function to create a cctbx anomalous amplitude array from a cctbx anomalous intensity array
create_anomalous_intensity_array(…) Function to create a cctbx anomalous intensity array from a cctbx anomalous amplitude array
create_merged_intensity_array(…) Function to create a cctbs intensity array from a cctbx anomalous intensity array
create_reconstructed_amplitude_array(…) Function to create a cctbx reconstructed amplitude array from a cctbx anomalous amplitude array
get_array_types() Function to assign array types contained within cctbx obj, in cases where there are multiple instances of a type of array, only the first will be considered.
output_mtz(output_mtz_file) Function to output an mtz file from processed miller arrays
process_miller_arrays() Function to process the miller arrays needed for SIMBAD
add_array_to_mtz_dataset(miller_array, column_root_label=None)[source]

Function to add cctbx miller array obj to cctbx mtz dataset obj

Parameters:

miller_array : cctbx :obj:

Input cctbx obj containing a miller array

column_root_label : str

The root for the label of the output column

Returns:

self.mtz_dataset : cctbx :obj:

cctbx mtz obj containing the input miller array

change_space_group(new_space_group)[source]

Change space group of input mtz

Parameters:

new_space_group : str

The new space group

static check_anomalous_arrays(miller_array)[source]

Function to check intensity/amplitude arrays from cctbx to ensure that they are not anomalous arrays

Parameters:

miller_array : cctbx :obj:

A cctbx :obj: containing a miller array of either intensities or amplitudes

Returns:

bool

True/False

create_amplitude_array(intensity_array)[source]

Function to create a cctbx amplitude array from an cctbx intensity array

Parameters:

intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of intensities

Returns:

self.amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of amplitudes

create_anomalous_amplitude_array(anomalous_intensity_array)[source]

Function to create a cctbx anomalous amplitude array from a cctbx anomalous intensity array

Parameters:

anomalous_intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous intensities

Returns:

self.anomalous_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous amplitudes

create_anomalous_intensity_array(anomalous_amplitude_array)[source]

Function to create a cctbx anomalous intensity array from a cctbx anomalous amplitude array

Parameters:

anomalous_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous amplitudes

Returns:

self.anomalous_intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous intensities

create_merged_intensity_array(anomalous_intensity_array)[source]

Function to create a cctbs intensity array from a cctbx anomalous intensity array

Parameters:

anomalous_intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous intensities

Returns:

self.intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of intensities

create_reconstructed_amplitude_array(anomalous_amplitude_array)[source]

Function to create a cctbx reconstructed amplitude array from a cctbx anomalous amplitude array

Parameters:

anomalous_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous amplitudes

Returns:

self.reconstructed_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of reconstructed amplitudes

get_array_types()[source]

Function to assign array types contained within cctbx obj, in cases where there are multiple instances of a type of array, only the first will be considered. Due to limitations in cctbx

Returns:

self.free_array : cctbx :obj:

A cctbx :obj: containing a miller array containing the Free R data

self.amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of amplitudes

self.anomalous_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous amplitudes

self.reconstructed_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of reconstructed amplitudes

self.intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of intensities

self.anomalous_intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous intensities

output_mtz(output_mtz_file)[source]

Function to output an mtz file from processed miller arrays

Parameters:

output_mtz_file : str

Path to output mtz file

Returns:

file

mtz file containing all the columns needed to run SIMBAD

process_miller_arrays()[source]

Function to process the miller arrays needed for SIMBAD

Parameters:

self.free_array : cctbx :obj:

A cctbx :obj: containing a miller array containing the Free R data

self.amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of amplitudes

self.anomalous_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous amplitudes

self.reconstructed_amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of reconstructed amplitudes

self.intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of intensities

self.anomalous_intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of anomalous intensities

Returns:

self.mtz_dataset : cctbx :obj:

cctbx mtz obj containing all the miller arrays needed to run SIMBAD

crystal_data(mtz_file)[source]

Set crystallographic parameters from mtz file

Parameters:

mtz_file : str

The path to the mtz file

Returns:

space_group : str

The space group

resolution : str

The resolution

cell_parameters : tuple

The cell parameters

get_labels(mtz_file)[source]

Function to get the column labels for input mtz file

Parameters:

mtz_file : str

The path to the mtz file

Returns:

f : str

f column label

fp : str

fp column label

i : str

i column label

sigi : str

sigi column label

dano : str

dano column label

sigdano : str

sigdano column label

free : str

free column label