text: user15525: I am trying to make a prediction application using the sequence of proteins.
  If we think about the 6COU protein, I'm running the code below
  pdb = PDBParser().get_structure("6c0u", "6c0u.pdb")
  
  for residue in pdb.get_residues():
      print(residue) 
  
  Some of the output looks like below when looking at residues. What is the function of the heteroatoms here, and follow up question;
  When reading a paper on Binding Site Detection of Proteins, there is exactly one sentence in the paper.
  "We first clean the input structure by removing all heteroatoms and solvent molecules from the protein structure using the Biopython47 library."
  What is the meaning of this sentence if you are working on protein sequences, heteroatoms are not already there, what does it mean to delete them?
  If you want to check the paper, here
  
  
  user266: The text you cited mentions "input structure", so they work with structures, not just "protein sequences".
  Heteroatoms = atoms marked as HETATM in the PDB and mmCIF formats.
  In these formats each atom is listed as either ATOM or HETATM. These are not particularly meaningful categories, but they are there, so they are easy to use. It's a common practice to remove heteroatoms with grep -v ^HETATM.
  Note that in the files from the Protein Data Bank not only solvent and ligands are marked as HETATM, but also "non-standard" amino-acids in a protein. An amino acid is considered standard if it can be genetically encoded. So in the files from the PDB selenocysteine is ATOM and selenomethionine is HETATM. Some programs don't follow these rules and output all protein residues as ATOM.
  Removing heteroatoms works well for the vast majority of structures that have no modified residues. But in some cases it will remove also some protein residues, which may not intended.
  Update: if you are wondering why there are ATOM and HETATM records, I have never came across the rationale. The PDB format
  specification has had both types of records since 1976.
  Different versions of the format spec use different wording,
  but the meaning is always similar:
  
  ATOM records give atomic coordinates for "standard" groups.
  HETATM records give atomic coordinates for "non-standard" groups.
  
  (Although standard residues that not in a polymer are also HETATM.)
  In the mmCIF format the same record is preserved in _atom_site.group_PDB with the description:
  
  This data item is provided for compatibility with the original Protein Data Bank format, and only for that purpose.
  
  Most of the structures have only standard residues in protein/DNA/RNA polymers, so removing HETATM records removes only ligands and solvent.
  
original_text: 15525: <p>I am trying to make a prediction application using the sequence of proteins.</p>
  <p>If we think about the 6COU protein, I'm running the code below</p>
  <pre><code>pdb = PDBParser().get_structure(&quot;6c0u&quot;, &quot;6c0u.pdb&quot;)
  
  for residue in pdb.get_residues():
      print(residue) 
  </code></pre>
  <p>Some of the output looks like below when looking at residues. What is the function of the heteroatoms here, and follow up question;</p>
  <p>When reading a paper on Binding Site Detection of Proteins, there is exactly one sentence in the paper.</p>
  <p><em><strong>&quot;We first clean the input structure by removing all heteroatoms and solvent molecules from the protein structure using the Biopython47 library.&quot;</strong></em></p>
  <p>What is the meaning of this sentence if you are working on protein sequences, heteroatoms are not already there, what does it mean to delete them?</p>
  <p>If you want to check the paper, <a href="https://doi.org/10.1021/acs.jcim.1c00799" rel="nofollow noreferrer">here</a></p>
  <p><a href="https://i.stack.imgur.com/0Cr40.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Cr40.png" alt="enter image description here" /></a></p>
   266: <p>The text you cited mentions &quot;input structure&quot;, so they work with structures, not just &quot;protein sequences&quot;.</p>
  <p>Heteroatoms = atoms marked as <code>HETATM</code> in the PDB and mmCIF formats.
  In these formats each atom is listed as either <code>ATOM</code> or <code>HETATM</code>. These are not particularly meaningful categories, but they are there, so they are easy to use. It's a common practice to remove heteroatoms with <code>grep -v ^HETATM</code>.</p>
  <p>Note that in the files from the Protein Data Bank not only solvent and ligands are marked as HETATM, but also &quot;non-standard&quot; amino-acids in a protein. An amino acid is <a href="https://proteopedia.org/wiki/index.php/Standard_Residues" rel="nofollow noreferrer">considered standard</a> if it can be genetically encoded. So in the files from the PDB selenocysteine is ATOM and selenomethionine is HETATM. Some programs don't follow these rules and output all protein residues as ATOM.</p>
  <p>Removing heteroatoms works well for the vast majority of structures that have no modified residues. But in some cases it will remove also some protein residues, which may not intended.</p>
  <p><strong>Update</strong>: if you are wondering <strong>why</strong> there are ATOM and HETATM records, I have never came across the rationale. The <a href="https://www.wwpdb.org/documentation/file-format" rel="nofollow noreferrer">PDB format
  specification</a> has had both types of records since 1976.
  Different versions of the format spec use different wording,
  but the meaning is always similar:</p>
  <ul>
  <li>ATOM records give atomic coordinates for &quot;standard&quot; groups.</li>
  <li>HETATM records give atomic coordinates for &quot;non-standard&quot; groups.</li>
  </ul>
  <p>(Although standard residues that not in a polymer are also HETATM.)</p>
  <p>In the mmCIF format the same record is preserved in <a href="https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Items/_atom_site.group_PDB.html" rel="nofollow noreferrer">_atom_site.group_PDB</a> with the description:</p>
  <blockquote>
  <p>This data item is provided for compatibility with the original Protein Data Bank format, and only for that purpose.</p>
  </blockquote>
  <p>Most of the structures have only standard residues in protein/DNA/RNA polymers, so removing HETATM records removes only ligands and solvent.</p>
  