schrodinger.application.matsci.qubec_utils module

Utilities for QUBEC.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.matsci.qubec_utils.qubec_error(msg)

Return an error message flagged with QUBEC.

Parameters

msg (str) – the error message

Return type

str

Returns

the error message flagged with QUBEC

exception schrodinger.application.matsci.qubec_utils.QubecException

Bases: Exception

schrodinger.application.matsci.qubec_utils.write_input_file(base_name, adict)

Write the input json file.

Parameters
  • base_name (str) – the base name of the input file to be written

  • adict (dict) – job parameters

schrodinger.application.matsci.qubec_utils.read_input_file(base_name)

Read the input json file.

Parameters

base_name (str) – the base name of the input file to be read

Raises

QubecException – if there is an issue

Return type

dict

Returns

job parameters

schrodinger.application.matsci.qubec_utils.type_input(arg)

Validate the input.

Parameters

arg (str or unicode) – the input file to validate

Raises

argparse.ArgumentTypeError – if the given input is invalid

Return type

str

Returns

the str-ed input file

class schrodinger.application.matsci.qubec_utils.Job(*args, **kwargs)

Bases: schrodinger.job.jobcontrol.Job

Job class to handle cancelling a QUBEC job.

__init__(*args, **kwargs)

See parent class for documentation.

setQubecJob(qubec_job)

Set the QUBEC job.

Parameters

qubec_job (QubecJob) – the QUBEC job

cancel()

See parent class for documentation.

class schrodinger.application.matsci.qubec_utils.Qubec(st, params, logger=None)

Bases: object

Manage a QUBEC job.

__init__(st, params, logger=None)

Create an instance.

Parameters
  • st (schrodinger.structure.Structure) – the structure

  • params (dict) – the QUBEC job parameters

  • logger (logging.Logger or None) – output logger or None if there isn’t one

login()

Log in.

Raises

QubecException – if there is an issue

getParams()

Return the job parameters.

Return type

dict

Returns

the job parameters

prepareOutput()

Prepare the output.

run()

Run the job.

Raises

QubecException – if there is an issue