swamp.wrappers.wrapper module

class Wrapper(workdir=None, logger=None, silent_start=False)[source]

Bases: abc.ABC

Abstract class for wrappers

Implements data structures and methods commonly used in wrappers implemented in SWAMP

Parameters:
  • workdir (str, None) – working directory
  • 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:
  • error (bool) – if True an error has occurred along the process
  • logcontents (str) – stores the contents of the log file or stdout
  • logfile (str) – file name where the logcontents should be written
cmd

Abstract property to store command to run in the terminal (if any)

error
static get_cc(workdir, mtzfile, pdbfile, logger=None)[source]

Method to get correlation coefficient between mtz file with phase information and a placed search model

Parameters:
  • workdir (str) – working directory where phenux.get_cc_mtz_pdb will be executed
  • mtzfile (str) – mtz file name with the phase information
  • pdbfile (str) – pdb file name with the placed search model
  • logger (None, :object:`swamp.logger.swamplogger.SwampLogger`) – logging interface to be used on the calulation

:returns tuple containing the local CC (str) and the overall CC (str) :rtype tuple

get_scores(logfile=None)[source]

Abstract method to get the scores for the wrapper

keywords

Abstract property to store the keywords to use in the wrapper

logcontents
logfile
logger
make_logfile(fname=None)[source]

Write the logcontents into the logfile

Parameters:fname (None, str) – specify a file name to write the log (default None)

:returns nothing :rtype None

make_workdir()[source]

Create the workdir

mtzout

Output mtz filename

pdbout

Output pdb filename

run()[source]

Method to execute the cmd of this Wrapper instance

silent_start
source

Location of the executable binary file

summary_results

Abstract property to store a summary with the results

workdir
wrapper_header

Wrapper header to be displayed in the logger on start

wrapper_name

Abstract property to store the name of the wrapper