Flowchart for strain energy filtering. The program first locates each torsion pattern in the molecule and calculates its dihedral angle. It then matches each torsion pattern in the molecule with the patterns in the torsion library. There will be multiple such matches since the torsion library contains a hierarchy of patterns. For each match, the program calculates the energy for the observed dihedral angle and determines any flags. For each torsion pattern in the molecule, it keeps only the information from the most specific torsion pattern rule from the library. Ultimately, the program reports the estimated energy for each torsion pattern, the sum for all of the patterns in the molecule, and any flagged patterns.