diff --git a/ihm_validation/ihm_validator.py b/ihm_validation/ihm_validator.py index 00d01356..ce0e50dc 100755 --- a/ihm_validation/ihm_validator.py +++ b/ihm_validation/ihm_validator.py @@ -276,7 +276,9 @@ def write_json(mmcif_file: str, template_dict: dict, dirName: str, dirName_Outpu report = WriteReport(args.f, db=args.databases_root, cache=args.cache_root, - nocache=args.nocache) + nocache=args.nocache, + enable_sas=args.enable_sas, + enable_cx=args.enable_cx) logging.info("Entry composition") template_dict = report.run_entry_composition(Template_Dict) diff --git a/ihm_validation/report.py b/ihm_validation/report.py index 864e0957..e3486158 100644 --- a/ihm_validation/report.py +++ b/ihm_validation/report.py @@ -15,7 +15,6 @@ import excludedvolume import molprobity import get_plots, sas, sas_plots -import cx import utility import pickle import json @@ -27,7 +26,8 @@ REPORT_VERSION = '2.0-dev' class WriteReport(object): - def __init__(self, mmcif_file, db, cache, nocache=False): + def __init__(self, mmcif_file, db, cache, nocache=False, + enable_sas=True, enable_cx=False): self.mmcif_file = mmcif_file self.db = db self.input = GetInputInformation(self.mmcif_file) @@ -37,6 +37,9 @@ def __init__(self, mmcif_file, db, cache, nocache=False): self.nocache = nocache self.report_version = REPORT_VERSION + if enable_cx: + import cx + def create_webdriver(self) -> webdriver.Firefox: '''instantiate webdriver for rendering plots''' firefox_options = webdriver.FirefoxOptions()