0
分子のリスト(SMILES形式)の各要素(分子)に外部プログラム(Openbabel)を呼び出そうとしています。リストの各要素に外部プログラムを実行する
/bin/sh: 1: Syntax error: "(" unexpected (expecting ")").
私のコードの何が問題になっている。しかし、私は同じエラーを得続けますか?
from subprocess import call
with open('test_zinc.smi') as f:
smiles = [(line.split())[0] for line in f]
def call_obabel(smi):
for mol in smi:
call('(obabel %s -otxt -s %s -at %s -aa)' % ('fda_approved.fs', mol, '5'), shell=True)
call_obabel(smiles)