code: def _change_structure(self, new_structure):
          
          # Compare new and old structure for logging purpose.
          # TODO: Write method of structure to compare self and other and return a dictionary
          old_structure = self.input.structure
          old_lattice = old_structure.lattice
  
          abc_diff = np.array(new_structure.lattice.abc) - np.array(old_lattice.abc)
          angles_diff = np.array(new_structure.lattice.angles) - np.array(old_lattice.angles)
          cart_diff = new_structure.cart_coords - old_structure.cart_coords
          displs = np.array([np.sqrt(np.dot(v, v)) for v in cart_diff])
  
          recs, tol_angle, tol_length = [], 10**-2, 10**-5
  
          if np.any(np.abs(angles_diff) > tol_angle):
              recs.append("new_agles - old_angles = %s" % angles_diff)
  
          if np.any(np.abs(abc_diff) > tol_length):
              recs.append("new_abc - old_abc = %s" % abc_diff)
  
          if np.any(np.abs(displs) > tol_length):
              min_pos, max_pos = displs.argmin(), displs.argmax()
              recs.append("Mean displ: %.2E, Max_displ: %.2E (site %d), min_displ: %.2E (site %d)" %
                  (displs.mean(), displs[max_pos], max_pos, displs[min_pos], min_pos))
  
          self.history.info("Changing structure (only significant diffs are shown):")
          if not recs:
              self.history.info("Input and output structure seems to be equal within the given tolerances")
          else:
              for rec in recs:
                  self.history.info(rec)
  
          self.input.set_structure(new_structure)
docs: Change the input structure.