From electric circuits to chemical networks