code: def copy(self):
          
          w = c_int(0)
          sim = Simulation()
          clibrebound._reb_copy_simulation_with_messages(byref(sim),byref(self),byref(w))
          for majorerror, value, message in BINARY_WARNINGS:
              if w.value & value:
                  if majorerror:
                      raise RuntimeError(message)
                  else:  
                      # Just a warning
                      warnings.warn(message, RuntimeWarning)
          return sim
docs: Returns a deep copy of a REBOUND simulation. You need to reset 
          any function pointers on the copy. 
          
          Returns
          ------- 
          A rebound.Simulation object.