Molecular logic by optical spectroscopy with output transfer by charge migration along a peptide