Linux command
obabel 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Example
obabel [path/to/file.mol] -O [path/to/output_file.xyz]
Example
obabel -:"[SMILES]" -O [path/to/output_file.png] -xp 500
Example
obabel [path/to/file.smi] -O [path/to/output_file.mol] --gen3D -m
Example
obabel [path/to/file1 path/to/file2 ...] -O [path/to/output_file.png]
说明
obabel is the Open Babel command-line tool for converting between molecular file formats used in chemistry and computational modeling. It supports over 100 chemical data formats including SDF, MOL, PDB, SMILES, CML, and image formats for visualization. Beyond simple conversion, obabel can filter molecules by properties, generate 3D coordinates, perform energy minimization using forcefields (MMFF94, UFF, GAFF), and manipulate molecular data. It handles batch processing with wildcard patterns and can split multi-molecule files into individual outputs.
参数
- -i _format_
- Specify input format explicitly (e.g., -imol, -ismi)
- -o _format_
- Specify output format explicitly (e.g., -osmi, -opng)
- -O _outfile_
- Specify output file path
- -:"_SMILES_"
- Use SMILES string as input instead of a file
- -m
- Produce multiple output files (one per molecule)
- -f _#_
- Start import at molecule number specified
- -l _#_
- End import at molecule number specified
- --gen3D
- Generate 3D coordinates for molecules
- -e
- Continue with next object after error
- -z
- Compress output with gzip
- -H
- Display help; use -H_format_ for format-specific help
- -V
- Display version number
- -a_option_
- Input format-specific option
- -x_option_
- Output format-specific option
FAQ
What is the obabel command used for?
obabel is the Open Babel command-line tool for converting between molecular file formats used in chemistry and computational modeling. It supports over 100 chemical data formats including SDF, MOL, PDB, SMILES, CML, and image formats for visualization. Beyond simple conversion, obabel can filter molecules by properties, generate 3D coordinates, perform energy minimization using forcefields (MMFF94, UFF, GAFF), and manipulate molecular data. It handles batch processing with wildcard patterns and can split multi-molecule files into individual outputs.
How do I run a basic obabel example?
Run `obabel [path/to/file.mol] -O [path/to/output_file.xyz]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i _format_ do in obabel?
Specify input format explicitly (e.g., -imol, -ismi)