"babel ... -f # -l #" - Split Large Molecule File

Q

How to split a file with a large number of molecules?

✍: FYIcenter.com

A

You can split a file with a large number of molecules into smaller files by extracting a chunk of molecules to the output using the "-f #" and "-l #" options.

The "-f #" option specifies the index of the first molecule to be extrancted.

The "-l #" option specifies the index of the last molecule to be extracted.

For example, the following "babel" command extract 100 molecules from a large file starting at molecule # 101.

fyicenter$ babel molecules.sdf molecules-chunk.sdf -f 101 -l 200
100 molecules converted
1972 audit log messages 

For example, the following "babel" command extract the first molecule from a large file:

fyicenter$ babel molecules.sdf molecule-first.sdf -f 1 -l 1
1 molecule converted
20 audit log messages 

 

"babel -h" Command - Add Hydrogens to Molecule Data

"babel" Command Option Argument Syntax

Understanding "babel" Command Line Syntax

⇑⇑ Open Babel Tutorials

2020-09-30, 177👍, 0💬