Here is a programme that can calculate the basic tensors in general relativity wirtten by Mathematica.