Run initialize_database.sh
to:
- Setup Postgres
- Create databases
- Install dependancies
Fragment and Publication classes which contain a Python representation of datarow from table.
Latern creates the following two tables in the database:
-
fragments
table:- Columns: id (text), header (text), content (text), vector (real[])
- Used to store information about molecular fragments, including their ID(DOI), header, content, and associated vector data.
-
publications
table:- Columns: id (text, primary key), title (text), pmc (text), pubmed (text), doi (text)
- Used to store information about publications related to the fragments, including their ID(DOI), title, and links to PMC, PubMed, and DOI.
VectorDatabase file, which has class Lantern, provides the main functionality for the vector database. For example, you can insert an embedding with the insertEmbedding().