2024-08-28 01:06:31 +02:00
|
|
|
|
|
|
|
import sqlite3
|
|
|
|
|
|
|
|
from molecule import save_molecules_to_json, load_molecules_from_json
|
|
|
|
from molecule import create_database, add_molecule_to_db
|
|
|
|
|
2024-08-29 20:48:16 +02:00
|
|
|
from feather_bench import FeatherBench
|
2024-08-28 01:06:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Save molecules to JSON
|
2024-08-30 00:10:19 +02:00
|
|
|
#save_molecules_to_json(FeatherBench, 'FeatherBench.json')
|
2024-08-28 01:06:31 +02:00
|
|
|
|
|
|
|
# Load molecules from JSON
|
2024-08-30 00:10:19 +02:00
|
|
|
#loaded_molecules = load_molecules_from_json('FeatherBench.json')
|
|
|
|
#print(loaded_molecules)
|
2024-08-28 01:06:31 +02:00
|
|
|
|
|
|
|
# Create a database and add molecules
|
2024-08-29 20:48:16 +02:00
|
|
|
db_name = 'FeatherBench.db'
|
2024-08-28 01:06:31 +02:00
|
|
|
create_database(db_name)
|
2024-08-29 20:48:16 +02:00
|
|
|
for molecule in FeatherBench:
|
2024-08-28 01:06:31 +02:00
|
|
|
add_molecule_to_db(db_name, molecule)
|
|
|
|
|
2024-08-29 09:45:30 +02:00
|
|
|
|
|
|
|
|