code: def view(self, viewer=None, use_curr_dir=False):
          
          if viewer is None:
              viewer = settings['defaults']['viewer']
          if use_curr_dir:
              TEMP_DIR = os.path.curdir
          else:
              TEMP_DIR = tempfile.gettempdir()
  
          def give_filename(i):
              filename = 'ChemCoord_' + str(i) + '.xyz'
              return os.path.join(TEMP_DIR, filename)
  
          i = 1
          while os.path.exists(give_filename(i)):
              i = i + 1
          self.to_xyz(give_filename(i))
  
          def open_file(i):
              """Open file and close after being finished."""
              try:
                  subprocess.check_call([viewer, give_filename(i)])
              except (subprocess.CalledProcessError, FileNotFoundError):
                  raise
              finally:
                  if use_curr_dir:
                      pass
                  else:
                      os.remove(give_filename(i))
  
          Thread(target=open_file, args=(i,)).start()
docs: View your molecule.
  
          .. note:: This function writes a temporary file and opens it with
              an external viewer.
              If you modify your molecule afterwards you have to recall view
              in order to see the changes.
  
          Args:
              viewer (str): The external viewer to use. If it is None,
                  the default as specified in cc.settings['defaults']['viewer']
                  is used.
              use_curr_dir (bool): If True, the temporary file is written to
                  the current diretory. Otherwise it gets written to the
                  OS dependendent temporary directory.
  
          Returns:
              None: