text: user12036: I am using the internal_coords module from BioPython in order to compare dihedral angles of two different conformations of the same protein. The conformations are processed by me in order to make sure that their residues are aligned and they always contain exactly the same atoms, so that in the end I expect to have the same number of dihedral angles in the two structures.
  However, despite the match in the residues and atoms, I obtain a different number of dihedral angles for the two conformations.
  You can find a reproducible code sample here. These are the two PDB files protein1.pdb and protein2.pdb used.
  As you can see, the number of chains, the number of residues, the residue names and the atom names in each residue are the same, yet there are 4 extra dihedral angles in the second protein.
  My question is, am I missing something from my comparison? Is it unreasonable to expect the same dihedral angles for these two structures? (And if yes, why?). Is this the expected behaviour of the atom_to_internal_coordinates() function?
  And extra: do you have any recommendations for other tools that can easily compute all dihedral angles (including the ones in side chains) for a protein?
  
  user12036: The problem got solved after posting on the official BioPython repo.
  Because of the processing (where some residues were removed in order to align the proteins), some consecutive residues were too far away from each other and thus the bond length was too large. The solution was to increase the maximum peptide bond allowed, as follows:
  internal_coords.IC_Chain.MaxPeptideBond = 5.0
  ic_chain = internal_coords.IC_Chain(structure, verbose=True)
  
  
original_text: 12036: <p>I am using the <code>internal_coords</code> module from BioPython in order to compare dihedral angles of two different conformations of the same protein. The conformations are processed by me in order to make sure that their residues are aligned and they always contain exactly the same atoms, so that in the end I expect to have the same number of dihedral angles in the two structures.</p>
  <p>However, despite the match in the residues and atoms, I obtain a different number of dihedral angles for the two conformations.</p>
  <p>You can find a reproducible code sample <a href="https://pastebin.com/PASnUhTa" rel="noreferrer">here</a>. These are the two PDB files <a href="https://pastebin.com/FG3hLXDW" rel="noreferrer">protein1.pdb</a> and <a href="https://pastebin.com/diFjgE3d" rel="noreferrer">protein2.pdb</a> used.</p>
  <p>As you can see, the number of chains, the number of residues, the residue names and the atom names in each residue are the same, yet there are 4 extra dihedral angles in the second protein.</p>
  <p>My question is, am I missing something from my comparison? Is it unreasonable to expect the same dihedral angles for these two structures? (And if yes, why?). Is this the expected behaviour of the <code>atom_to_internal_coordinates()</code> function?</p>
  <p>And extra: do you have any recommendations for other tools that can easily compute all dihedral angles (including the ones in side chains) for a protein?</p>
   12036: <p>The problem got solved after posting on the official BioPython repo.</p>
  <p>Because of the processing (where some residues were removed in order to align the proteins), some consecutive residues were too far away from each other and thus the bond length was too large. The solution was to increase the maximum peptide bond allowed, as follows:</p>
  <pre><code>internal_coords.IC_Chain.MaxPeptideBond = 5.0
  ic_chain = internal_coords.IC_Chain(structure, verbose=True)
  </code></pre>
  