Data Types#

The following data type is included to store potential, energy, stress data:

PES Data
class aiida_trains_pot.data.pesdata.PESData(data=None, save_labels=True, **kwargs)[source]#
get_ase_item(index)[source]#

Get a specific configuration as an ASE Atoms object.

Parameters:

index – Index of the configuration to retrieve

Returns:

ASE Atoms object

get_ase_list(max_items=None, warn_threshold=1000)[source]#

Convert dataset to a list of ASE Atoms objects.

Parameters:
  • max_items – Optional limit to the number of items to load

  • warn_threshold – Show warning if loading more than this many items

Returns:

List of ASE Atoms objects

get_atomic_numbers()[source]#

Return the list of atomic numbers in the dataset.

get_atomic_species()[source]#

Return the list of atomic species in the dataset.

get_e0s(format='atomic_numbers') dict[source]#

Get the energies of isolated atoms from the dataset. :param format: Format of the atomic species (‘atomic_numbers’ or ‘symbols’) :return: dictionary of isolated atom energies

get_item(index)[source]#

Return a specific item from the dataset by index.

get_labelled()[source]#

Return a PESData object with only labelled frames.

get_list(max_items=None, warn_threshold=1000)[source]#

Return the contents of this node as a list.

Parameters:
  • max_items – Optional limit to the number of items to load

  • warn_threshold – Show warning if loading more than this many items

get_unlabelled()[source]#

Return a PESData object with only unlabelled frames.

get_xyz(write_params=False, key_prefix='', max_items=None, warn_threshold=1000)[source]#

Convert dataset to XYZ format text.

Parameters:
  • write_params – Whether to include additional parameters in the output

  • key_prefix – Prefix to add to property keys (energy, forces, stress)

  • max_items – Optional limit to the number of items to process

  • warn_threshold – Show warning if processing more than this many items

Returns:

Text in XYZ format

iter_ase(max_items=None)[source]#

Generator function to iterate through ASE Atoms objects without loading all into memory.

Parameters:

max_items – Optional limit to the number of items to process

Yield:

ASE Atoms objects one at a time

iter_items()[source]#

Generator function to iterate through items without loading all into memory.

property len_labelled#

Return the number of labelled configurations in the dataset.

property len_unlabelled#

Return the number of unlabelled configurations in the dataset.

set_ase(data, save_labels=True)[source]#

Set the contents of this node by saving a list of ASE Atoms objects as an HDF5 file.

Parameters:

data – A list of ASE Atoms objects to save.

set_list(data)[source]#

Set the contents of this node by saving a list as an HDF5 file.