ample.util.mrbump_util module

class NullHandler(level=0)[source]

Bases: logging.Handler

Attributes:
name

Methods

acquire() Acquire the I/O thread lock.
addFilter(filter) Add the specified filter to this handler.
close() Tidy up any resources used by the handler.
createLock() Acquire a thread lock for serializing access to the underlying I/O.
filter(record) Determine if a record is loggable by consulting all the filters.
flush() Ensure all logging output has been flushed.
format(record) Format the specified record.
handle(record) Conditionally emit the specified logging record.
handleError(record) Handle errors which occur during an emit() call.
release() Release the I/O thread lock.
removeFilter(filter) Remove the specified filter from this handler.
setFormatter(fmt) Set the formatter for this handler.
setLevel(level) Set the logging level of this handler.
emit  
get_name  
set_name  
emit(record)[source]
class ResultsSummary(results=None, results_pkl=None)[source]

Bases: object

Summarise the results for a series of MRBUMP runs

Methods

parseTableDat(tfile) Read a resultsTable file and return a list of MrBump results objects
processMrbumpPkl(resultsPkl) Process dictionary
sortResults([prioritise]) Sort the results
summariseResults(mrbump_dir) Return a string summarising the results
summaryString() Return a string suitable for printing the sorted results
topFiles([num_results]) Return a list of dictionaries listing the top num_results PDB and MTZ files
analyseResult  
createDict  
extractResults  
results_table  
analyseResult(result)[source]
createDict()[source]
extractResults(mrbump_dir, purge=False)[source]
parseTableDat(tfile)[source]

Read a resultsTable file and return a list of MrBump results objects

processMrbumpPkl(resultsPkl)[source]

Process dictionary

results_table(results)[source]
sortResults(prioritise=None)[source]

Sort the results

summariseResults(mrbump_dir)[source]

Return a string summarising the results

summaryString()[source]

Return a string suitable for printing the sorted results

topFiles(num_results=3)[source]

Return a list of dictionaries listing the top num_results PDB and MTZ files

Parameters:
num_results : int

How many of the top results to return

Returns:
topf : list

A list of dictionaries, one per result, with xyz, mtz and info keys

checkSuccess(script_path)[source]

Check if a job ran successfully.

Parameters:
script_path : str

Path to the MrBUMP script

Returns:
bool

True if success

Notes

Success is assumed as a SHELX CC score of >= SHELXSUCCESS

finalSummary(amoptd)[source]

Print a final summary of the job

jobSucceeded(job_dict)[source]
job_unfinished(job_dict)[source]
unfinished_scripts(amoptd)[source]

See if there are any unfinished mrbump jobs in a mrbump directory and return a list of the scripts

write_jobscript(name, keyword_file, amoptd, directory=None, job_time=86400, extra_options={})[source]

Create the script to run MrBump for this PDB.

write_mrbump_files(ensemble_pdbs, amoptd, job_time=172800, ensemble_options=None, directory=None)[source]

Write the MRBUMP job files for all the ensembles.

Arguments: ensemble_pdbs – list of the ensembles, each a single pdb file. amoptd – dictionary with job options. job_time – maximum permissible runtime (mainly used for batch queueing systems). ensemble_options – dictionary with ensemble-specific keywords e.g. ensemble_options[ensemble_name] = {‘ncopies’ : ncopies} directory – working directory to write files to.