h5_pyanitools module

Full Documentation for hippynn.databases.h5_pyanitools module. Click here for a summary page.

Read Databases in the pyanitools H5 format.

class PyAniDirectoryDB(directory, inputs, targets, *args, files=None, allow_unfound=False, species_key='species', quiet=False, driver='core', **kwargs)[source]

Bases: Database, PyAniMethods, Restartable

load_arrays(allow_unfound=False, quiet=False)[source]
class PyAniFileDB(file, inputs, targets, *args, allow_unfound=False, species_key='species', quiet=False, driver='core', **kwargs)[source]

Bases: Database, PyAniMethods, Restartable

load_arrays(allow_unfound=False, quiet=False)[source]
class PyAniMethods[source]

Bases: object

determine_key_structure(batch_list, sys_count, n_atoms_max, species_key='species')[source]

Determine what arrays to pad

extract_full_file(file, species_key='species')[source]
filter_arrays(arr_dict, allow_unfound=False, quiet=False)[source]
process_batches(batches, n_atoms_max, sys_count, species_key='species')[source]
write_h5(database: Database, split: str = None, file: Path = None, species_key: str = 'species', overwrite: bool = False) dict[source]
Parameters:
  • database – Database to use

  • split – str, None, or True; selects data split to save. If None, contents of arr_dict are used. If True, save all splits and save split masks as well.

  • file – where to save the database. if None, does not save the file.

  • species_key – the key used for system contents (padding and chemical formulas)

  • overwrite – boolean; enables over-writing of h5 file.

Returns:

dictionary of pyanitools-format systems.