cgexplore.utilities.AtomliteDatabase¶
- class cgexplore.utilities.AtomliteDatabase(db_file)[source]¶
Bases:
objectHolds an atomlite database with some useful methods.
Methods
Add molecules to database as entry.
Add molecule to database as entry.
Add properties to an entry by key.
Access the atomlite Database object.
Get all entries.
Get specific entry.
Get all entries.
Get a molecule.
Get the number of molecular entries in the database.
Get the number of property entries in the database.
Get the properties of an entry.
Get a DataFrame of the properties in the database.
Get all property entries.
Get specific entry.
Check if database has a molecule by key.
Filter database entries by properties.
Remove an entry by key.
Add properties to an entry by key.
Add properties to an entry by key.
- Parameters:
db_file (Path)
- add_entries(entries)[source]¶
Add molecules to database as entry.
- Parameters:
entries (Sequence[Entry])
- Return type:
None
- add_molecule(molecule, key)[source]¶
Add molecule to database as entry.
- Parameters:
molecule (Molecule)
key (str)
- Return type:
None
- get_num_property_entries()[source]¶
Get the number of property entries in the database.
- Return type:
- get_property_df(properties, allow_missing=False)[source]¶
Get a DataFrame of the properties in the database.
- Parameters:
- Returns:
A DataFrame of the property entries in the database.
- Return type:
DataFrame
- get_property_entry(key)[source]¶
Get specific entry.
- Parameters:
key (str)
- Return type:
PropertyEntry