code: def inertia_tensor(self):
          
          result = np.zeros((3,3), float)
          for i in range(self.size):
              r = self.coordinates[i] - self.com
              # the diagonal term
              result.ravel()[::4] += self.masses[i]*(r**2).sum()
              # the outer product term
              result -= self.masses[i]*np.outer(r,r)
          return result
docs: the intertia tensor of the molecule