def _choose_ligand_frame(self): choose_ligand_labelframe = LabelFrame(self.root, text="选择配体") choose_ligand_labelframe.place(x=10, y=10, width=570, height=50) choose_ligands = SButton(root=choose_ligand_labelframe, text="选择单/多个配体", x=10, y=0) create_tooltip(choose_ligands.button, "选择单/多个配体,配体格式必须是pdbqt!") choose_ligand_dir = SButton(root=choose_ligand_labelframe, text="选择文件夹", x=110, y=0) create_tooltip(choose_ligand_dir.button, "选择包含pdbqt格式配体的文件夹。") self.choose_ligand_entry = SEntry( root=choose_ligand_labelframe, textvariable=StringVar(), text=Configer.get_para("choose_docking_ligands"), x=200, y=4, width=360) create_tooltip(self.choose_ligand_entry.entry, "选择的配体或者包含配体的文件夹") choose_ligands.bind_open_files( entry_text=self.choose_ligand_entry.textvariable, title="选择单/多个配体", file_type="pdbqt") choose_ligand_dir.bind_open_dir( entry_text=self.choose_ligand_entry.textvariable, title="选择包含pdbqt配体的文件夹")
def _choose_ligand_frame(self): choose_ligand_labelframe = LabelFrame(self.root, text="选择/提取配体") choose_ligand_labelframe.place(x=10, y=10, width=570, height=120) # 选择输入配体的格式 SLabel(root=choose_ligand_labelframe, text="输入格式:", x=10, y=0) input_format_text = ("pdbqt", "sdf", "pdb") self.input_format = SCombbox(root=choose_ligand_labelframe, textvariable=StringVar(), values=input_format_text, default_value=Configer.get_para("complex_ligand_format"), x=80, y=0, width=60) create_tooltip(self.input_format.combobox, "导入配体的格式") # 选择第几个配体 SLabel(root=choose_ligand_labelframe, text="选择第", x=160, y=0) self.complex_ligand_num_entry = SEntry(choose_ligand_labelframe, textvariable=StringVar(), text=Configer.get_para("complex_ligand_num"), x=205, y=2, width=20) create_tooltip(self.complex_ligand_num_entry.entry, "只针对多构象pdbqt文件。输入" "要进行复合或者提取的构象。" "如果为0则全部提取/复合") SLabel(root=choose_ligand_labelframe, text="个构象", x=230, y=0) # 选择配体 choose_ligands_button = SButton(choose_ligand_labelframe, text="选择单/多个配体", x=10, y=30) create_tooltip(choose_ligands_button.button, "选择一个或者多个所选格式的配体") choose_ligand_dir_button = SButton(choose_ligand_labelframe, text="选择文件夹", x=110, y=30) create_tooltip(choose_ligand_dir_button.button, "选择包含配体的文件夹,匹配其中所选格式的文件") self.choose_ligands_entry = SEntry(root=choose_ligand_labelframe, textvariable=StringVar(), text=Configer.get_para("choose_complex_ligands"), x=200, y=34, width=360) create_tooltip(self.choose_ligands_entry.entry, "所选的配体或者包含配体的目录") choose_ligands_button.bind_open_files(entry_text=self.choose_ligands_entry.textvariable, title="选择单/多个配体", file_type=self.input_format.textvariable) choose_ligand_dir_button.bind_open_dir(entry_text=self.choose_ligands_entry.textvariable, title="选择包含配体文件的文件夹") # 选择单独输出配体文件夹 choose_output_button = SButton(choose_ligand_labelframe, text="提取配体输出路径", x=10, y=65) create_tooltip(choose_output_button.button, "单独提取配体,选择要输出的文件夹。") self.extract_output_entry = SEntry(choose_ligand_labelframe, textvariable=StringVar(), text=Configer.get_para("extract_pdbqt_dir"), x=120, y=65 + 3, width=340) create_tooltip(self.extract_output_entry.entry, "输出的文件夹") choose_output_button.bind_open_dir(entry_text=self.extract_output_entry.textvariable, title="选择提取配体输出的文件夹") extract_button = SButton(choose_ligand_labelframe, text="提取选定的配体", x=470, y=65) extract_button.button.bind("<Button-1>", self.extract) create_tooltip(extract_button.button, "提取配体")
def _create_choose_ligand_frame(self): choose_ligand_labelframe = LabelFrame(self.root, text="输入选项") choose_ligand_labelframe.place(x=10, y=10, width=570, height=85) # 选择输入配体的格式 SLabel(root=choose_ligand_labelframe, text="输入格式:", x=10, y=0) input_format_text = ("mol", "sdf", "mol2", "pdb", "pdbqt", "xyz") self.input_format = SCombbox( root=choose_ligand_labelframe, textvariable=StringVar(), values=input_format_text, default_value=Configer.get_para("input_format"), x=80, y=0, width=60) create_tooltip(self.input_format.combobox, "导入配体的格式") choose_ligands_button = SButton(choose_ligand_labelframe, text="选择单/多个配体", x=10, y=30) create_tooltip(choose_ligands_button.button, "选择一个或者多个所选格式的配体") choose_ligand_dir_button = SButton(choose_ligand_labelframe, text="选择文件夹", x=110, y=30) create_tooltip(choose_ligand_dir_button.button, "选择包含配体的文件夹,匹配其中所选格式的文件") self.choose_ligands_entry = SEntry( root=choose_ligand_labelframe, textvariable=StringVar(), text=Configer.get_para("choose_ligands"), x=200, y=34, width=360) create_tooltip(self.choose_ligands_entry.entry, "所选的配体或者包含配体的目录") choose_ligands_button.bind_open_files( entry_text=self.choose_ligands_entry.textvariable, title="选择单/多个配体", file_type=self.input_format.textvariable) choose_ligand_dir_button.bind_open_dir( entry_text=self.choose_ligands_entry.textvariable, title="选择包含配体文件的文件夹")