You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
把xyz格式文件转换成pdb格式文件:
obabel C.xyz -ixyz -opdb -O C.pdb
支持
118种
格式,如xyz、mol、mol2、pdb、smi,Gaussian文件gjf、log、fchk,ChemDraw文件cdx等。
可以从没有成键信息的xyz文件转换为有成键信息的mol文件。
3.转换SMILES
生成甲烷的mol文件:
obabel -:C --gen3d -omol -O C.mol
若要得到坐标,
--gen3d
不可少。
SMILES会默认补氢至饱和,将C补成甲烷,若要得到单个碳的mol文件:
obabel -:[C] --gen3d -omol -O C.mol
若要生成甲基的文件:
obabel -:[CH3] --gen3d -omol -O CH3.mol
obabel -:"[C]([H])([H])[H]" --gen3d -omol -O CH3.mol
若SMILES有括号时,务必要加上引号。
获取C.xyz、C.pdb等多个文件的SMILES:
obabel C.mol C.mol2 C.pdb C.xyz --osmi -O C.smi
4.生成结构式的图像
obabel -:"C([C@@H](C(=O)O)N)S" -opng -O cys.png
即可生成半胱氨酸的结构式:
亦可生成矢量图像:
obabel -:"C([C@@H](C(=O)O)N)S" -osvg -O cys.svg
可以将文件直接转换为图像:
obabel phosphate.log -ilog -opng -O phosphate.png
5.配合Gaussian使用
从SMILES直接生成Gaussian输入文件:
obabel -:CC --gen3d -ogjf|sed "1c %nproc=28\n#opt b3lyp/6-31g(d,p)" >CC.gjf
从已有文件或上一步的log文件中得到下一步的输入文件:
obabel CC.log -ilog -ogjf|sed "1c %nproc=28\n#freq b3lyp/6-31g(d,p)" >CC2.gjf