#!/usr/bin/env python # coding: utf-8 # # Ricci Tensor and Scalar Curvature calculations using Symbolic module # In[1]: import sympy from einsteinpy.symbolic import RicciTensor, RicciScalar from einsteinpy.symbolic.predefined import AntiDeSitter sympy.init_printing() # ### Defining the Anti-de Sitter spacetime Metric # In[2]: metric = AntiDeSitter() metric.tensor() # ### Calculating the Ricci Tensor(with both indices covariant) # In[3]: Ric = RicciTensor.from_metric(metric) Ric.tensor() # ### Calculating the Ricci Scalar(Scalar Curvature) from the Ricci Tensor # In[4]: R = RicciScalar.from_riccitensor(Ric) R.simplify() R.expr # The curavture is -12 which is in-line with the theoretical results