script for computing reversible similarity