Applicability domain calculator, originally written by Aleck Sedykh