Split molecule file

A program that splits molecule file into N chunks or chunks of size N. Number of chunks (-num) or the size of each chunk (-size) must be specified and are mutually exclusive. By default the program splits molecule file by number of conformers not molecules. This can be changed by setting the flag -confs to false.

Example

prompt> molchunk.py -num 3 -i drugs.sdf -o foo.sdf
prompt> molchunk.py -confs false -size 20 -i conftest.sdf -o foo.sdf

Code

Download code

molchunk.py

See also