schrodinger.application.jaguar.html_report.html_report module

schrodinger.application.jaguar.html_report.html_report.render_report(context: dict, template_file: str) str | None

Create an HTML report by rendering the given data context using the specified template file.

Parameters:
  • context – The data context dictionary to populate the report with.

  • template_file – The filename of the report template. Must be located in the standard jaguar build data/html_report_templates directory or TemplateNotFound exception is raised.

Returns:

The HTML string ready to be saved to a file if the template could be found, otherwise None.

Raises:

jinja.exceptions.TemplateError – If there is a programming error in the template file.

schrodinger.application.jaguar.html_report.html_report.get_base_context(product: str = 'Jaguar', status: CalculationStatus = CalculationStatus.UNKNOWN, jobname: str = '') dict

Returns the standard metadata required by ‘base.html’.

Parameters:
  • product – The product the report is for. Sets the favicon and meta-bar entry.

  • status – The calculation status, indicating success or failure etc. Sets the meta-bar entry.

  • jobname – The jobname for the report.

Returns:

A dictionary that is the boilerplate data context for all HTML reports.

schrodinger.application.jaguar.html_report.html_report.get_template_environment() Environment

Find the Jaguar data directory and return the Jinja environment ready to load templates and render documents

Returns:

The jinja environment initialized to search the Jaguar data/html_report_templates directory for templates.