def create_db(file_pth):
    """ Create an empty SQLite database for library spectra.

    Example:
        >>> from msp2db.db import create_db
        >>> db_pth = 'library.db'
        >>> create_db(file_pth=db_pth)

    Args:
        file_pth (str): File path for SQLite database

    """
    conn = sqlite3.connect(file_pth)
    c = conn.cursor()

    c.execute('DROP TABLE IF EXISTS library_spectra_source')
    c.execute('''CREATE TABLE library_spectra_source (
                          id integer PRIMARY KEY,
                          name text NOT NULL,
                          created_at date,
                          parsing_software text
                          )'''
              )

    c.execute('DROP TABLE IF EXISTS metab_compound')
    c.execute('''CREATE TABLE metab_compound (
                  inchikey_id text PRIMARY KEY,
                  name text,
                  pubchem_id text,
                  chemspider_id text,
                  other_names text,
                  exact_mass real,
                  molecular_formula text,
                  molecular_weight real,
                  compound_class text,
                  smiles text,
                  created_at date,
                  updated_at date

                                           )''')

    c.execute('DROP TABLE IF EXISTS library_spectra_meta')
    c.execute('''CREATE TABLE library_spectra_meta (
                                   id integer PRIMARY KEY,
                                   name text,
                                   collision_energy text,
                                   ms_level real,
                                   accession text NOT NULL,
                                   resolution text,
                                   polarity integer,
                                   fragmentation_type text,
                                   precursor_mz real,
                                   precursor_type text,
                                   instrument_type text,
                                   instrument text,
                                   copyright text,
                                   column text,
                                   mass_accuracy real,
                                   mass_error real,
                                   origin text,
                                   splash text,
                                   retention_index real, 
                                   retention_time real,
                                   library_spectra_source_id integer NOT NULL,
                                   inchikey_id text NOT NULL,
                                   FOREIGN KEY(library_spectra_source_id) REFERENCES library_spectra_source(id),
                                   FOREIGN KEY(inchikey_id) REFERENCES metab_compound(inchikey_id)
                                   )'''
              )

    c.execute('DROP TABLE IF EXISTS library_spectra')
    c.execute('''CREATE TABLE library_spectra (
                                          id integer PRIMARY KEY,
                                          mz real NOT NULL,
                                          i real NOT NULL,
                                          other text,
                                          library_spectra_meta_id integer NOT NULL,
                                          FOREIGN KEY (library_spectra_meta_id) REFERENCES library_spectra_meta(id)
                                          )'''
              )

    c.execute('DROP TABLE IF EXISTS library_spectra_annotation')
    c.execute('''CREATE TABLE library_spectra_annotation (
                                          id integer PRIMARY KEY,
                                          mz real,
                                          tentative_formula text,
                                          mass_error real,
                                          library_spectra_meta_id integer NOT NULL,
                                          FOREIGN KEY (library_spectra_meta_id) REFERENCES library_spectra_meta(id)
                                          )'''
              )
Create an empty SQLite database for library spectra.

    Example:
        >>> from msp2db.db import create_db
        >>> db_pth = 'library.db'
        >>> create_db(file_pth=db_pth)

    Args:
        file_pth (str): File path for SQLite database