swamp.mr.targetdata module

class TargetData(fasta_fname, mtz_fname, phased_mtz_fname=None, logger=None)[source]

Bases: object

Class to store relevant information about the target structure to be solved through MR

Parameters:
  • fasta_fname (str) – target’s fasta filename
  • mtz_fname (str) – target’s mtz filename
  • phased_mtz_fname (str) – target’s mtz filename containing phases (default: None)
  • logger (SwampLogger) – logging interface for the MR pipeline (default None)
static estimate_contents(cell_volume, mw)[source]

Estimate the number of copies and the solvent content of the crystal

Parameters:
  • cell_volume (float) – the volume of the crystal’s cell
  • mw (float) – molecular weight of each copy of the structure
Returns:

the no. of copies in the asu and the solvent content (tuple)

get_info()[source]

Get all the information required to perform MR on the given target and store it into corresponding attributes of this TargetData instance

static read_fasta(fname)[source]

Extract information about the target’s sequence from a fasta file

Parameters:fname (str) – the file name of the fasta file of interest

:returns the combined molecular weight and length of the unique sequences in the fasta file (tuple)