code: def add_distances_ca(self, periodic=True, excluded_neighbors=2):
          
  
          # Atom indices for CAs
          at_idxs_ca = self.select_Ca()
          # Residue indices for residues contatinig CAs
          res_idxs_ca = [self.topology.atom(ca).residue.index for ca in at_idxs_ca]
          # Pairs of those residues, with possibility to exclude neighbors
          res_idxs_ca_pairs = self.pairs(res_idxs_ca, excluded_neighbors=excluded_neighbors)
          # Mapping back pairs of residue indices to pairs of CA indices
          distance_indexes = []
          for ri, rj in res_idxs_ca_pairs:
              distance_indexes.append([self.topology.residue(ri).atom('CA').index,
                                       self.topology.residue(rj).atom('CA').index
                                       ])
          distance_indexes = np.array(distance_indexes)
  
          self.add_distances(distance_indexes, periodic=periodic)
docs: Adds the distances between all Ca's to the feature list.
  
          Parameters
          ----------
          periodic : boolean, default is True
              Use the minimum image convetion when computing distances
  
          excluded_neighbors : int, default is 2
              Number of exclusions when compiling the list of pairs. Two CA-atoms are considered
              neighbors if they belong to adjacent residues.