code: def pdb_to_structure(filename):
      
  
      try:
          from Bio.PDB import PDB
      except ImportError:
          print("I can't import Biopython which is needed to handle PDB files.")
          raise
      p = PDB.PDBParser()
      structure = p.get_structure('S', filename)
      for _ in structure.get_chains():
          atoms = [np.array(atom.get_coord()) for atom in structure.get_atoms()]
      return atoms
docs: Import a structure object from a PDB file.