jobdir = os.path.abspath(opt.output_dir) if not os.path.exists(jobdir): os.makedirs(jobdir) # it would be created by dimple, but too late print "_JOB_DIRECTORY:", jobdir sys.stdout.flush() input_files = qtrapi.Files() input_files.extend([ qtrapi.File(key="HKLIN", title="Reflection Data", type="hkl:hkl", path=os.path.join(jobdir, opt.mtz)), qtrapi.File(key="XYZIN", title="Input Model", type="xyz", path=os.path.join(jobdir, opt.pdbs[0])) ]) qtrapi_text = qtrapi.Text("") qtrapi_text.append("") section_info = qtrapi.Section("Output") section_info.append(qtrapi_text) section_input = qtrapi.Section("Input Files") section_input.append(input_files) section_output = qtrapi.Section("Output Files") report = qtrapi.Report(title="Dimple", path=jobdir) report.extend([section_info, section_input, section_output]) report.flush() main(sys.argv[1:])
print("_JOB_DIRECTORY: %s" % jobdir) sys.stdout.flush() input_files = qtrapi.Files() input_files.extend([ qtrapi.File(key="HKLIN", title="Reflection Data", type="hkl:hkl", path=os.path.join(jobdir, opt.mtz)), qtrapi.File(key="XYZIN", title="Input Model", type="xyz", path=os.path.join(jobdir, opt.pdbs[0])) ]) qtrapi_text = qtrapi.Text("") qtrapi_text.append("") section_info = qtrapi.Section("Output") section_info.append(qtrapi_text) section_input = qtrapi.Section("Input Files") section_input.append(input_files) section_output = qtrapi.Section("Output Files") report = qtrapi.Report(title="Dimple", path=jobdir) report.extend([section_info, section_input, section_output]) report.flush() main(sys.argv[1:])
import sys from dimple.main import main sys.exit(main(sys.argv[1:]))