Command line subpackage

Commad line facility for SIMBAD scripts

class CCP4[source]

Bases: object

Wrapper class for CCP4 installation

class CCP4RootDirectory[source]

Bases: object

The CCP4 root directory

class CCP4Version[source]

Bases: distutils.version.StrictVersion

The CCP4 version class

Methods

parse(vstring)
class LogColorFormatter(fmt=None, datefmt=None)[source]

Bases: logging.Formatter

Formatter for log messages

Methods

converter(…) Convert seconds since the Epoch to a time tuple expressing local time.
format(record)
formatException(ei) Format and return the specified exception information as a string.
formatTime(record[, datefmt]) Return the creation time of the specified LogRecord as formatted text.
usesTime() Check if the format uses the creation time of the record.
format(record)[source]
class LogColors[source]

Bases: object

Color container for log messages

CRITICAL = 31
DEBUG = 34
DEFAULT = 0
ERROR = 31
WARNING = 33
class LogController(reset=True)[source]

Bases: object

Controller class for log messaging

Methods

add_console([level, format, stream])
add_logfile(file[, level, format])
close()
get_levelname(level)
get_logger()
level_valid(level)
reset()
add_console(level=’info’, format=’%(message)s’, stream=<open file ‘<stdout>’, mode ‘w’>)[source]
add_logfile(file, level=’info’, format=’%(message)s’)[source]
close()[source]
get_levelname(level)[source]
get_logger()[source]
static level_valid(level)[source]
reset()[source]
class LogLevels[source]

Bases: object

Log level container

CRITICAL = 50
DEBUG = 10
ERROR = 40
INFO = 20
NOTSET = 0
WARNING = 30
cleanup(directory, csv, results_to_keep)[source]

Function to clean up working directory results not reported by GUI

get_work_dir(run_dir, work_dir=None, ccp4_jobid=None, ccp4i2_xml=None)[source]

Figure out the relative working directory by provided options

is_valid_dir(parser, arg)[source]
is_valid_file(parser, arg)[source]
make_workdir(run_dir, ccp4_jobid=None, ccp4i2_xml=None, rootname=’SIMBAD_’)[source]

Make a work directory rooted at work_dir and return its path

Parameters:

run_dir : str

The path to a run directory

ccp4_jobid : int, optional

CCP4-assigned job identifier

ccp4i2_xml : str, optional

Path to CCP4 I2 XML output (just used to indicate running under CCP4 I2)

rootname : str, optional

Base name of the SIMBAD directory [default: ‘SIMBAD_’]

Returns:

work_dir : str

The path to the working directory

Raises:

ValueError

There is an existing SIMBAD CCP4 work directory

print_header()[source]

Print the header information at the top of each script

submit_mr_jobs(mtz, mr_dir, search_results, refine_type, refine_cycles, args)[source]

Function to submit molecular replacement jobs

Parameters:

mtz : str

Path to input mtz file

mr_dir : str

Path to input models directory

mr_dir : str

Path to directory where MR will be run

search_results : list

list of results from SIMBAD search

refine_type : str

The type of refinement to run

refine_cycles : int

The number of refinement cycles

Returns:

object

MrSubmit object containing results from MR