alframework.ml_interfaces.hippynn_interface module

HIPNN_ASE_calculator(HIPNN_model_directory, energy_key='energy', device='cuda:0')[source]
HIPNN_ASE_load_ensemble(HIPNN_ensemble_directory, device='cuda:0')[source]
train_HIPNN_model(model_dir, h5_train_dir, energy_key, coordinates_key, species_key, charges_key=None, dipole_key=None, quadrupole_key=None, network_params=None, aca_params=None, electrostatics_flag=False, cell_key=None, force_key=None, hipnn_order='scalar', first_is_interacting=False, energy_mae_loss_weight=100.0, energy_rmse_loss_weight=100.0, total_energy_mae_loss_weight=0, total_energy_rmse_loss_weight=0, force_mae_loss_weight=1.0, force_rmse_loss_weight=1.0, charge_mae_loss_weight=1.0, charge_rmse_loss_weight=1.0, dipole_mae_loss_weight=1.0, dipole_rmse_loss_weight=1.0, quadrupole_mae_loss_weight=1.0, quadrupole_rmse_loss_weight=1.0, electrostatics_weight=0, rbar_loss_weight=1.0, l2_reg_loss_weight=1e-06, pairwise_inference_parameters=None, valid_size=0.1, test_size=0.1, plot_every=50, h5_test_dir=None, learning_rate=0.0005, scheduler_options={'factor': 0.5, 'max_batch_size': 128, 'patience': 25}, controller_options={'batch_size': 64, 'eval_batch_size': 128, 'max_epochs': 1000, 'termination_patience': 55}, device_string='0', from_multiprocessing_nGPU=None, build_lammps_pickle=False, remove_high_energy_cut=None, remove_high_energy_std=None, remove_high_forces_cut=None, remove_high_forces_std=None)[source]

directory: directory where HIPPYNN model will reside h5_directory: directory where h5 files will reside

energy: string, energy key inside inside h5 dataset. Must match db name in ‘properties_list’. force: string, force key insdie h5 dataset. Must match db name in ‘properties_list’. Do not define to remove force training coordinates’: string, coordinates key inside h5 dataset. Must match db name in ‘properties_list’. species’: string, species key inside h5 dataset. Must match db name in ‘properties_list’. electrostatics_flag: Boolean, Flag to check if the electrostatic will be trained with the energy and forces.

If electrostatics_flag is True, at least one of charges_key, dipole_key, or quadrupole_key must be True.

charges_key’: string, per-atom charges key inside th h5 data. Must match db name in ‘properties_list’. If None, partial charges are not trained to. diople_key’: string, molecular dipole key inside th h5 data. Must match db name in ‘properties_list’. If None, quadrupoles are not trained to. quadrupole_key’: string, molecular-quadrupole key inside th h5 data. Must match db name in ‘properties_list’. If None, quadrupoles are not trained to. cell’: string, cell key inside h5 dataset. Must match db name in ‘properties_list’. Do not define if data is not periodic. hipnn_order’: string ‘scalar’,’vector’,’quadradic’ energy_mae_loss_weight’: MAE per atom energy loss weight. energy_rmse_loss_weight’: RMSE per atomenergy loss weight. total_energy_mae_loss_weight’: MAE total energy loss weight. Typicall only one of energy_mae_loss_weight and total_energy_mae_loss_eight are used (the other is set to 0). total_energy_rmse_loss_weight’: MAE total energy loss weight. Typicall only one of energy_rmse_loss_weight and total_energy_rmse_loss_eight are used (the other is set to 0). force_mae_loss_weight’: MAE force loss weight force_rmse_loss_weight’: RMSE force loss weight charge_mae_loss_weight’: MAE charge loss weight. charge_rmse_loss_weight’: RMSE charge loss weight. dipole_mae_loss_weight’: MAE dipole loss weight. dipole_rmse_loss_weight’: RMSE dipole loss weight. quadrupole_mae_loss_weight’: MAE quadrupole loss weight. quadrupole_rmse_loss_weight’: RMSE quadrupole loss weight. rbar_loss_weight’: Weight of rbar in loss l2_reg_loss_weight’: Weight of l2_reg in loss. typically 1e-6 network_params’: Dictonary that defines the model. See examples for details aca_params’: Dictionary that defines parameters for charge training. pairwise_inference_parameters’: Dictionary that defines any p h5_directory’: external_test_set’: None or directory plot_every’: integer, every plot_every epochs, generate plots. build_lammps_pickle’: boolean, whether or not to build a pickle file fo rthe network enabling loading into lammps MLIAP. Requires building of lammps python interface. remove_high_energy_cut: float, or None: If none, all data is kept. If float, data with energies per atom that many standard deviations or larger are removed. remove_high_energy_std: float, or None: If none, all data is kept. If float, data with energies per atom that many standard deviations or larger are removed. remove_high_forces_cut: float, or None: If none, all data is kept. If float, data with forces that many standard deviations or larger are removed. remove_high_forces_std: float, or None: If none, all data is kept. If float, data with forces that many standard deviations or larger are removed.

train_HIPNN_model_wrapper(arg_dict)[source]