Filter molecules by weight or heavy atom count

A program that filters molecules by their weight and/or heavy atom count. The program has four flags: -minhac, the minimum heavy atom count, -maxhac, the maximum heavy atom count, -minwt, the minimum molecular weight and -maxwt the maximum molecular weight. Any combination of the flags can be set. The program will output the molecules to stdout as SMILES if no output file is set.

Example

prompt> sizefilter.py -minhac 10 dbase.oeb.gz
prompt> sizefilter.py -minhac 10 -maxwt 300 -i dbase.oeb.gz -o output.oeb.gz

Code

Download code

sizefilter.py

See also