def execute(protein_id, ligand_id): assert ( os.path.isdir(home + '/MGLTools-1.5.6') ), "AutoDockTools not found! Script stopped" # check if mgltools are present protein_prep.ProteinPreparer( protein_id).prepare_protein() # prepare protein ligand_prep.LigandPreparer(ligand_id).prepare_ligand() # prepare ligand perform_docking.VinaDocker(protein_id, ligand_id).prepare_docking_grid_and_dock()
def execute(PDB_list: list, CID_list: list): assert (os.path.isdir( home + '/MGLTools-1.5.6')), "AutoDockTools not found! Script stopped" # check if mgltools are present for CID_entry in CID_list: with tempfile.TemporaryDirectory(dir=os.getcwd()) as tmpdir: ligand_prep.LigandPreparer(CID_entry, dir=tmpdir).prepare_ligand() for PDB_entry in PDB_list: protein_prep.ProteinPreparer(PDB_entry, dir=tmpdir).prepare_protein() perform_docking.VinaDocker(protentry=PDB_entry, ligentry=CID_entry, protein_pdbqt=tmpdir + '/' + PDB_entry, ligand_pdbqt=tmpdir + '/' + CID_entry, dir=tmpdir ).dock_merge_plip()
def execute(protein_id, ligand_id): utils.Utilities().clean() protein_prep.ProteinPreparer( protein_id).prepare_protein() # prepare protein if os.stat('./workdir/pdb{}.ent'.format(protein_id)).st_size > 750000: render_template("error.html"), utils.Utilities().clean() return 0 else: ligand_prep.LigandPreparer( ligand_id).prepare_ligand() # prepare ligand perform_docking.VinaDocker(protein_id, ligand_id).prepare_docking_grid_and_dock() shutil.make_archive('results', 'zip', './result/') return 1