Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def shell(cmd, shell=False):
- if shell:
- p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- else:
- cmd = cmd.split()
- p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- output, err = p.communicate()
- return output
- def score(mol, orig_mol='1OYT-FSN.pdbqt', prot='1OYT-receptor.pdbqt'): #doesnt work
- proteiname=prot.split('-')[0]
- molname=mol.split('.')[0]
- output_filename=f'{proteiname}-{molname}-redock.pdbqt'
- out = shell([
- './smina.static',
- '-r', prot,
- '-l', mol,
- ' --autobox_ligand', orig_mol,
- '--autobox_add', '8',
- '--exhaustiveness', '8',
- '-o', output_filename], shell=False)
- def score(mol, orig_mol='1OYT-FSN.pdbqt', prot='1OYT-receptor.pdbqt'): #work
- proteiname=prot.split('-')[0]
- molname=mol.split('.')[0]
- output_filename=f'{proteiname}-{molname}-redock.pdbqt'
- out = shell(f'''./smina.static -r {prot} -l {mol} --autobox_ligand
- {orig_mol} --autobox_add 8 --exhaustiveness 8 -o {output_filename}''',shell=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement