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
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_intensity_array(amplitude_array) Function to create a cctbx intensity array from a cctbx 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(all_miller_arrays) Function to check array types contained within cctbx obj
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)[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

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_intensity_array(amplitude_array)[source]

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

Parameters:
amplitude_array : cctbx :obj:

A cctbx :obj: containing a miller array of amplitudes

Returns:
self.intensity_array : cctbx :obj:

A cctbx :obj: containing a miller array of 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(all_miller_arrays)[source]

Function to check array types contained within cctbx obj

Parameters:
all_miller_arrays : list

A list of cctbx objects containing all miller arrays in a reflection file

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

dano : str

dano column label

sigdano : str

sigdano column label

free : str

free column label