Machine-Learning assisted simulations
OtfMlacs
- class mlacs.OtfMlacs(atoms, state, calc, mlip=None, prop=None, neq=10, confs_init=None, std_init=0.05, keep_tmp_mlip=True, workdir='', prefix='Trajectory', ncprefix='', ncformat='NETCDF3_CLASSIC')
A Learn on-the-fly simulation constructed in order to sample approximate distribution
- Parameters:
atoms (
ase.Atomsorlistofase.Atoms) – the atom object on which the simulation is run.state (
StateManagerorlistofStateManager) – Object determining the state to be sampledcalc (
ase.calculatorsorCalcManager) – Class controlling the potential energy of the system to be approximated. If aase.calculatorsis attached, theCalcManageris automatically created.mlip (
MlipManager(optional)) – Object managing the MLIP to approximate the real distribution Default is a LammpsMlip object with a snap descriptor,5.0angstrom rcut with8twojmax.neq (
int(optional)) – The number of equilibration iteration. Default10.workdir (
str(optional)) – The directory in which to run the calculation.confs_init (
intorlistofase.Atoms(optional)) – Ifint, Number of configurations used to train a preliminary MLIP. The configurations are created by rattling the first structure. Iflistofase.Atoms, The atoms that are to be computed in order to create the initial training configurations. DefaultNone.std_init (
float(optional)) – Variance (in \(\mathring{a}^2\)) of the displacement when creating initial configurations. Default \(0.05 \mathring{a}^2\)keep_tmp_mlip (
Bool(optional)) – Keep every generated MLIP. If True and using MBAR, a restart will recalculate every previous MLIP.weight using the old coefficients. DefaultTrue.prefix (
str(optional)) – The prefix to prepend the name of the States files.ncprefix (
str(optional)) – The prefix to prepend the name of the *HIST.nc file. Script name format: ncprefix + scriptname + ‘_HIST.nc’. Default ‘’.ncformat (
str(optional)) – The format of the *HIST.nc file. One of the five flavors of netCDF files format available in netCDF4 python package: ‘NETCDF3_CLASSIC’, ‘NETCDF3_64BIT_OFFSET’, ‘NETCDF3_64BIT_DATA’,’NETCDF4_CLASSIC’, ‘NETCDF4’. DefaultNETCDF3_CLASSIC.
MlMinimizer
- class mlacs.MlMinimizer(atoms, state, calc, mlip=None, etol=0.01, ftol=0.0001, stol=0.001, neq=10, confs_init=None, std_init=0.05, keep_tmp_mlip=False, workdir='', prefix='Trajectory', ncprefix='', ncformat='NETCDF3_CLASSIC')
Class to perform structure minimization assisted with machine-learning potential
- Parameters:
atoms (
ase.Atomsorlistofase.Atoms) – the atom object on which the simulation is run.state (
StateManagerorlistofStateManager) – Object determining the state to be sampledcalc (
ase.calculatorsorCalcManager) – Class controlling the potential energy of the system to be approximated. If aase.calculatorsis attached, theCalcManageris automatically created.mlip (
MlipManager(optional)) – Object managing the MLIP to approximate the real distribution Default is a LammpsMlip object with a snap descriptor,5.0angstrom rcut with8twojmax.etol (
float(optional)) – The tolerance for the energy, in eV/at. If the difference of energy of the true potential between two consecutive steps is lower thanetol, the algorithm stops.ftol (
float(optional)) – The tolerance for the forces, in eV/angstrom. If the maximum absolute force of the true potential between two consecutive steps is lower thanetol, the algorithm stops.stol (
float(optional)) – The tolerance for the stress, in GPa. If the difference in the stress tensor of the true potential between two consecutive steps is lower thanetol, the algorithm stops.neq (
int(optional)) – The number of equilibration iteration. Default10.confs_init (
intorlistofase.Atoms(optional)) – ifint: Number of configuirations used to train a preliminary MLIP The configurations are created by rattling the first structure iflistofase.Atoms: The atoms that are to be computed in order to create the initial training configurations DefaultNone.std_init (
float(optional)) – Variance (in \(\mathring{a}^2\)) of the displacement when creating initial configurations. Default \(0.05 \mathring{a}^2\)keep_tmp_mlip (
Bool(optional)) – Keep every generated MLIP. If True and using MBAR, a restart will recalculate every previous MLIP.weight using the old coefficients. DefaultFalse.workdir (
str(optional)) – The directory in which to run the calculation.prefix (
str(optional)) – The prefix to prepend the name of the States files.ncprefix (
str(optional)) – The prefix to prepend the name of the *HIST.nc file. Script name format: ncprefix + scriptname + ‘_HIST.nc’. Default ‘’.ncformat (
str(optional)) – The format of the *HIST.nc file. One of the five flavors of netCDF files format available in netCDF4 python package: ‘NETCDF3_CLASSIC’, ‘NETCDF3_64BIT_OFFSET’, ‘NETCDF3_64BIT_DATA’,’NETCDF4_CLASSIC’, ‘NETCDF4’. DefaultNETCDF3_CLASSIC.