alframework.samplers.mlmd_sampling module
- mlmd_sampling(molecule_object, ase_calculator, dt, maxt, Escut, Fscut, Ncheck, Tamp, Tper, Tsrt, Tend, Ramp, Rper, Rend, meta_dir=None, use_potential_specific_code=None, trajectory_interval=None, distcut=1.2, min_time=0)[source]
Uncertainty based MD sampling.
The idea is that if the MD fails because the NNPs didn’t agree on the energies and forces, then this function returns an ase.Atoms object containing the failed configuration in order to properly evaluate its energy and forces using the QM code. The disagreement between the NNPs are quantified by the standard deviation of the energy and forces output by all NNs in the ensemble.
- Args:
molecule_object (MoleculesObject): An object from the class MoleculesObject. ase_calculator: An ase calculator. dt (float): Time step [fs]. maxt (float): Total simulation time [ps]. Escut (float): Maximum tolerated energy standard deviation before calling QM evaluation. Fscut (float): Maximum tolareted mean standard deviation of the forces before calling QM evaluation. Ncheck (int): Uncertainty evaluation is performed at each ‘Ncheck’ MD steps. Tamp (float): Amplitude of the temperature fluctuation. Tper (float): Period of the temperature fluctuation. Tsrt (float): Initial temperature. Tend (float): Final temperature. Ramp (float): Amplitude fo the density fluctuation. Rper (float): Period of the density fluctuation. Rend (float): Final density. meta_dir (str): Path of the directory containing the metadata. use_potential_specific_code (str): Determines whether to use a specific interatomic potential code. trajectory_interval (int): Write the trajectory at every ‘trajectory_interval’ steps. distcut (float): Minimum allowed distance between two atoms in [Angstrom] min_time (float): Minimum simulation time before checking for uncertanties in [ps]
- Returns:
- (MoleculesObject): A MoleculesObject containing the results of the QM calculations. If the std deviation of
the energy or forces are above the established threshold, molecule_object.atoms will store the failed configuration, otherwise it will store None.