Title
start out with
Data Module
.
Fande Data Module
Model 1
- class fande.data.FandeDataModuleASE(*args: Any, **kwargs: Any)
- calculate_invariants_librascal(soap_params=None, atomic_groups=None, centers_positions=None, derivatives_positions=None, same_centers_derivatives=False, frames_per_batch=10, calculation_context=None, trajectory=None)
Calculate SOAP invariants using librascal. If trajectory is not specified, the invariants are calculated for the training or test set of frames (self.traj_train or self.traj_test).
Parameters:
- soap_params: dict
Dictionary containing the parameters for the SOAP descriptors
- atomic_groups: list
List of atomic groups to train separate GP models for
- centers_positions: list
List of positions of the atomic centers
- derivatives_positions: list
List of indices of the atoms to calculate the derivatives with respect to. On these atoms the forces are evaluated.
- same_centers_derivatives: bool
If True, the same atomic centers are used for the derivatives as for the descriptors.
- frames_per_batch: int
Number of frames per batch when calculating invariants. Extremely useful when memory is limited.
- calculation_context: str, [‘train’, ‘test’, ‘production’]
Whether to calculate the invariants for the training/test set of frames (stored within`self.traj_train` or self.traj_test) or for on-the-fly md runs.
Returns:
- X: torch.tensor
Tensor containing the SOAP descriptors for the set of frames split by atomic groups specified in atomic_groups.
- DX: list(torch.tensor)
list of torch tensors containing the derivatives of the SOAP descriptors for each atomic group specified in atomic_groups.
only for calculation_context=’production’: F: torch.tensor
Tensor containing the forces for the set of frames split by atomic groups specified in atomic_groups.
- calculate_test_invariants_librascal(test_centers_positions=None, test_derivatives_positions=None, same_centers_derivatives=False)
Deprecated! Use calculate_invariants_librascal instead.
- prepare_train_data_loaders(total_samples_per_group, high_force_samples_per_group)
Prepare data loaders for training. Currently data loaders are created within the FandeDataModule class and then passed to the group model classes.
Parameters
- samples_per_grouplist of int
Number of training random samples to use for each group. If None, all samples are used.
- high_force_samples_per_grouplist of int
Number of high force samples to be included for each group. high_force_samples_per_group of the tighest (positive) and lowest (negative) forces are selected.
Returns
- train_data_loaderslist of torch.utils.data.DataLoader
List of data loaders for training for each atomic group model.