code: def protein_to_graph(self, pFilePath):
      h5File = h5py.File(pFilePath, "r")
      data = Data()
  
      amino_types = h5File["amino_types"][()]  # size: (n_amino,)
      mask = amino_types == -1
      if np.sum(mask) > 0:
          amino_types[
              mask
          ] = 25  # for amino acid types, set the value of -1 to 25
      atom_amino_id = h5File["atom_amino_id"][()]  # size: (n_atom,)
      atom_names = h5File["atom_names"][()]  # size: (n_atom,)
      atom_pos = h5File["atom_pos"][()][0]  # size: (n_atom,3)
  
      # atoms to compute side chain torsion angles: N, CA, CB, _G/_G1, _D/_D1, _E/_E1, _Z, NH1
      (
          pos_n,
          pos_ca,
          pos_c,
          pos_cb,
          pos_g,
          pos_d,
          pos_e,
          pos_z,
          pos_h,
      ) = self.get_atom_pos(
          amino_types, atom_names, atom_amino_id, atom_pos
      )
  
      # five side chain torsion angles
      # We only consider the first four torsion angles in side chains since only the amino acid arginine has five side chain torsion angles, and the fifth angle is close to 0.
      side_chain_embs = self.side_chain_embs(
          pos_n,
          pos_ca,
          pos_c,
          pos_cb,
          pos_g,
          pos_d,
          pos_e,
          pos_z,
          pos_h,
      )
      side_chain_embs[torch.isnan(side_chain_embs)] = 0
      data.side_chain_embs = side_chain_embs
  
      # three backbone torsion angles
      bb_embs = self.bb_embs(
          torch.cat(
              (
                  torch.unsqueeze(pos_n, 1),
                  torch.unsqueeze(pos_ca, 1),
                  torch.unsqueeze(pos_c, 1),
              ),
              1,
          )
      )
      bb_embs[torch.isnan(bb_embs)] = 0
      data.bb_embs = bb_embs
  
      data.x = torch.unsqueeze(torch.tensor(amino_types), 1)
      data.coords_ca = pos_ca
      data.coords_n = pos_n
      data.coords_c = pos_c
  
      assert (
          len(data.x)
          == len(data.coords_ca)
          == len(data.coords_n)
          == len(data.coords_c)
          == len(data.side_chain_embs)
          == len(data.bb_embs)
      )
  
      h5File.close()
      return data
  
imports: import os.path
  import h5py
  import numpy
  import warnings
  from tqdm import tqdm
  import torch
  import torch.nn.functional
  from torch_geometric.data import Data
  from torch_geometric.data import InMemoryDataset
label_desc: Use image node_id 10 for calling the FOLDdataset obj's underlying member method code with example usage: obj.protein_to_graph(pFilePath) and returns: data