Extract rings

A program that removes all non-ring atoms from the input molecules. By default double bonded atoms exo to a ring are included as ring atoms. This can be changed by using the flag -exo. The program will output the molecules to stdout as SMILES if no output file is set. The molecule name will be appended with “_rings”.

Example

prompt> RingSubset dbase.oeb.gz
prompt> RingSubset -exo false -i dbase.oeb.gz -o output.oeb.gz

Code

Download code

RingSubset.java