Computer simulation of hydrogen embrittlement in metals