2014-02-27 43 views
0

在外殼:IPython的:SMILES解析錯誤

balloon/balloon -f balloon/MMFF94.mff --nconfs 1 --nGenerations 300 "[H]OC(=O)C([H])([H])[[email protected]@]1([H])C2=C([H])C([H])=C(OC([H])([H])C([H])([H])C([H])([H])OC3=C(OC([H])([H])[H])C([H])=C(C([H])=C3[H])C3=NC(OC([H])([H])C([H])([H])[H])=C(S3)C([H])([H])[H])C([H])=C2C([H])([H])C1([H])[H]" AAA.pdb 

它非常好。然而,當我嘗試實施使用IPython的,有錯誤,我的代碼如下:

import os 
str3="[H]OC(=O)C([H])([H])[[email protected]@]1([H])C2=C([H])C([H])=C(OC([H])([H])C([H]([H])C([H([H])OC3=C(OC([H])([H])[H])C([H])=C(C([H])=C3[H])C3=NC(OC([H])([H])C([H])([H][H])=C(S3)C([H])([H])[H])C([H])=C2C([H])([H])C1([H])[H]" 

str4="balloon/balloon -f balloon/MMFF94.mff --nconfs 1 --nGenerations 300 str3 AAC.pdb" 

#os.system('balloon_options') 
os.system(str4) 

的錯誤是:■ 後語法錯誤:

無法解析輸入STR3 SMILES解析器說跳繩。

問題出在哪裏?

順便說,氣囊是能夠把SMILES字符串轉換成MOL2或PDB格式的軟件。(SMILES STRING就像[H] OC(= O)C([H])([H])[C @ @] 1([H])C 2 = C([H])C([H])= C(OC([H])([H])C(HC([H([H])OC3 = C (OC([H])([H])[H])C([H])= C(C([H])= C3 [H])C3 = NC(OC([H])([H ])C([H])([H] [H])= C(S3)C([H])([H])[H])C([H])= C2C([H])( [H]),C1([H])[H])

回答

2

你想給串str3的內容作爲參數傳遞給balloon/balloon,而是你給予字符串"str3"作爲參數,字符串"str3"是無效的SMILES。

嘗試使用此行:

str4="balloon/balloon -f balloon/MMFF94.mff --nconfs 1 --nGenerations 300 " + str3 + " AAC.pdb"