swamp.wrappers.wphaser module

class Phaser(workdir, mtzfile, mw, nchains_asu=1, sgalternative='NONE', logger=None, early_kill=True, timeout=360, threads=1, phased_mtz=None, silent_start=False, packcutoff=None, peaks_rotcutoff=None)[source]

Bases: swamp.wrappers.wrapper.Wrapper

Phaser wrapper

Class with methods to execute phaser and datas tructures to contain the obtained results

Parameters:
  • workdir (str) – working directory
  • mtzfile (srt) – target structure mtz file name
  • mw (int) – molecular weigth of the target structure
  • nchains_asu (int) – number of chains found in the assymetric unit (default 1)
  • sgalternative (str) – parameter to be passed to phaser as phaser.InputMR_AUTO.SGAL_SELE() (default ‘NONE’)
  • early_kill (bool) – if True will send signal to abort the run if the figures of merit are to low (default True)
  • timeout (int) – set a limit kill time for phaser execution (default 360)
  • threads (int) – number of threads to be used with phaser (default 1)
  • packcutoff (float, None) – parameter to be passed to phaser as phaser.InputMR_AUTO.setPACK_CUTO() (default None)
  • peaks_rotcutoff (float, None) – parameter to be passed to phaser as phaser.InputMR_AUTO.setPEAK_ROTA_CUTO() (default None)
  • phased_mtz (str) – target’s mtz filename containing phases (default: None)
  • silent_start (bool) – if True, the logger will not display the start banner (default False)
  • logger (SwampLogger) – logging interface for the wrapper (default None)
Variables:
  • LLG (str) – LLG of the placed search model
  • TFZ (str) – TFZ of the placed search model
  • RFZ (str) – RFZ of the placed search model
  • VRMS (str) – VRMS calculated for the placed search model
  • eLLG (str) – eLLG calculated for the search model
  • error (bool) – if True an error has occurred along the process
  • abort_suggested (bool) – if True the figures of merit are low and it is suggested to abort MrRun
  • ovarall_CC (str) – overall correlation coefficient between phases at phased_mtz and the placed search model
  • local_CC (str) – local correlation coefficient between phases at phased_mtz and the placed search model
  • solution (tuple) – a named tuple with information about an already existing solution
  • searchmodel_ids_list (list) – a list with the search model identifiers
  • searchmodel_dict (dict) – a dictionary with the search model information
Example:
>>> from swamp.wrappers import Phaser
>>> my_phaser = Phaser('<workdir>', '<mtzfile>', <mw>)
>>> my_phaser.add_searchmodel('<pdbfile>')
>>> my_phaser.run()
>>> my_phaser.make_logfile()
add_searchmodel(pdbfile, id, ermsd=0.1, nsearch=1, disable_check=True)[source]

Add a search model to the phaser run

Parameters:
  • pdbfile (str) – the pdb file name with the search model
  • id (str) – unique identifier for this search model
  • ermsd (float) – the eRMSD to be used with this search model
  • nsearch (int) – number of copies to be searched
  • disable_check (bool) – argument passed to phaser.InputMR_AUTO.setENSE_DISA_CHEC()
cmd

No command run through the shell to execute phaser

get_scores(logfile=None)[source]

Get the figures of merit obtained with phaser using a PhaserParser instance

Parameters:logfile (None, str) – log’s file name where the figures of merit can be found (default None)
keywords

No keywords passed to phaser through stdin

load_mr_dat(mute=True)[source]

Load the input data for the MR run into phaser.InputMR_DAT()

Parameters:mute (bool) – argument passed to phaser.InputMR_DAT.setMUTE()
logfile

Log file name with the logging contents of phaser

pdbout_tmp

A temporary pdb output file name template for placed search models

refine_solution(searchmodel_id)[source]

Refine the placed search model using wRefmac

Parameters:searchmodel_id (str) – key in the searchmodel_dict that corresponds with the search model to be refined
refined_solutions_dir

A directory where placed search models will be refined

refmac_logfile

A log file name template for placed search models

refmac_pdbout

A pdb output file name template for refined search models

register_solution(pdbfile, ermsd=None, ident=None, sol_fname=None)[source]

Add information for an already existing solution

Parameters:
  • pdbfile (str) – the pdb file name with the existing solution
  • ermsd (float) – the eRMSD used to obtain this particular solution
  • ident (float) – the identity used to obtain this particular solution
  • sol_fname (str) – the .sol file for this solution
root

Root file name to be used with phaser

run()[source]

Run phaser

Load the MR data and run mode MR_AUTO with each of the provided search models, intercalating refinement cycles

run_auto_mr(searchmodel_id, mute=True, xyzout=True, keywrds=True)[source]

Make a method to run phaser AutoMR mode using :object:`Phaser.runMR_AUTO()`

Parameters:
  • searchmodel_id (str) – key in the searchmodel_dict that corresponds with the search model to be placed
  • mute (bool) – argument passed to phaser.InputMR_AUTO.setMUTE()
  • xyzout (bool) – argument passed to phaser.InputMR_AUTO.setXYZO()
  • keywrds (bool) – argument passed to phaser.InputMR_AUTO.setKEYW()
searchmodel_infotemplate

Named tuple to serve as a template to contain information about the search models

solution_infotemplate

Named tuple to serve as a template to contain information about the fixed solution (if any is provided)

summary_results

A string representation of a summary of the figures of merit

top_MTZfile

MTZ file name corresponding with the top solution

top_PDBfile

PDB file name corresponding with the top solution

top_searchmodel

First search model at searchmodel_ids_list

wrapper_name

The name of this ~swamp.wrapper.wrapper.Wrapper child class (phaser)