Properties

PropertyManager

The PropertyManager Class in an object to manage the calculation on the fly of particular properties. The training of the MLIP stops when all properties are converged according to user defined criterions. The Property manager takes as input a list of CalcProperty. During a MLACS step, the Property manager start to initalize the CalcProperty objects, then it runs the different objects and finaly it checks if all the objects achieve their convergence criterion. In this case, the MLACS simulation can be stopped.

class mlacs.properties.PropertyManager(prop, folder='Properties', **kwargs)

Parent Class managing the calculation of differents properties

calc_initialize(**kwargs)

Add on the fly arguments for calculation of properties.

property check_criterion

Check all criterions. They have to be all converged at the same time. Return True if all elements in list are True, else return False.

class mlacs.properties.RoutinePropertyManager(ncfile, launched)

Class to handle the list of CalcRoutineFunction.

Parameters:

ncfile (OtfMlacsHist) – The netcdf *HIST.nc file.

calc_initialize(**kwargs)

Add on the fly arguments for calculation of properties.

property check_criterion

Check all criterions. They have to be all converged at the same time. Return True if all elements in list are True, else return False.

CalcProperty

The CalcProperty Classes are properties you want to compute at some point durinf the MLACS simulation. The CalcProperty objects can different object as input (states, atoms, functions, …).

class mlacs.properties.CalcProperty(args={}, state=None, method='max', criterion=0.001, frequence=1, **kwargs)

Parent Class for on the fly property calculations.

Parameters:
  • method (str) –

  • criterion. (Type of) –

    • max, maximum difference between to consecutive step < criterion

    • ave, average difference between to consecutive step < criterion

  • max (Default) –

  • criterion (float) – Stopping criterion value (eV). Default 0.001 Can be None, in this case there is no criterion.

  • frequence (int) – Interval of Mlacs step to compute the property. Default 1

property isconverged

Check if the property is converged.

CalcPafi

class mlacs.properties.CalcPafi(args, state=None, method='max', criterion=0.001, frequence=1, **kwargs)

Class to set a minimum free energy calculation. See PafiLammpsState.run_dynamics() parameters.

CalcNeb

class mlacs.properties.CalcNeb(args, state=None, method='max', criterion=0.001, frequence=1)

Class to set a NEB calculation. See NebLammpsState.run_dynamics() parameters.

CalcTi

class mlacs.properties.CalcTi(args, phase, state=None, ninstance=None, method='max', criterion=0.001, frequence=10)

Class to set a nonequilibrium thermodynamic integration calculation. See the ThermodynamicIntegration classe.

Parameters:

phase (str) – Structure of the system: solild or liquid. Set either the Einstein crystal as a reference system or the UF liquid.

CalcRdf

class mlacs.properties.CalcRdf(args, state=None, method='max', criterion=0.05, frequence=2)

Class to set a radial distribution function calculation.

CalcAdf

class mlacs.properties.CalcAdf(args, state=None, method='max', criterion=0.05, frequence=5)

Class to set the angle distribution function calculation.

CalcExecFunction

class mlacs.properties.CalcExecFunction(function, args={}, module=None, use_atoms=True, gradient=False, criterion=0.001, frequence=1, nc_unit='', ase_unit='')

Class to execute on the fly a python function and converge on the result.

Parameters:
  • function (str or function) – Function to call. If the function is a str, you to define the module to load the function.

  • args (dict) – Arguments of the function.

  • module (str) – Module to load the function.

  • useatoms (bool) – True if the function is called from an ase.Atoms object.

  • nc_unit (str (optional)) – Unit of the observable saved in *HIST.nc file. These units are derived from the atomic unit system: Bohr, Ha, etc. Cf. mlacs.utilities.io_abinit.MlacsHist._set_unit_conventions(). Default ‘’.

  • ase_unit (str (optional)) – Unit of the observable (ASE convention). Cf. mlacs.utilities.io_abinit.MlacsHist._set_unit_conventions(). These units are expected to be the metal units, cf. ase.units.py. Default ‘’.

CalcRoutineFunction

class mlacs.properties.calc_property.CalcRoutineFunction(function, label, nc_name=None, nc_dim=None, nc_unit='', ase_unit='', weight=None, gradient=False, criterion=None, frequence=1)

Class to routinely compute basic thermodynamic observables.

Parameters:
  • function (str) – Name of Lammps function, e.g. `get_kinetic_energy’.

  • label (str) – Label of the function to be executed, e.g. Kinetic_Energy. Cf. mlacs.utilities.io_abinit.MlacsHist.nc_routine_conv().

  • nc_name (str (optional)) – Name of the observable in *HIST.nc file, e.g. ekin. Cf. mlacs.utilities.io_abinit.MlacsHist.nc_routine_conv(). This name should follow Abinit conventions as much as possible. Default None.

  • nc_dim (str (optional)) – Name of the dimension of the observable in *HIST.nc file. Cf. mlacs.utilities.io_abinit.MlacsHist._set_name_conventions(). Default None.

  • nc_unit (str (optional)) – Unit of the observable saved in *HIST.nc file. These units are derived from the atomic unit system: Bohr, Ha, etc. Cf. mlacs.utilities.io_abinit.MlacsHist._set_unit_conventions(). Default ‘’.

  • ase_unit (str (optional)) – Unit of the observable (ASE convention). Cf. mlacs.utilities.io_abinit.MlacsHist._set_unit_conventions(). These units are expected to be the metal units, cf. ase.units.py. Default ‘’.

  • weight (WeightingPolicy (optional)) – WeightingPolicy class, Default: None.

property isconverged

Check if the property is converged.

CalcPressure

class mlacs.properties.calc_property.CalcPressure(weight=None, gradient=False, criterion=None, frequence=1)

Class to compute the hydrostatic pressure.

Parameters:

weight (WeightingPolicy) – WeightingPolicy class, Default: None.

CalcAcell

class mlacs.properties.calc_property.CalcAcell(weight=None, gradient=False, criterion=None, frequence=1)

Class to compute the cell lengths.

Parameters:

weight (WeightingPolicy) – WeightingPolicy class, Default: None.

CalcAngles

class mlacs.properties.calc_property.CalcAngles(weight=None, gradient=False, criterion=None, frequence=1)

Class to compute the cell angles.

Parameters:

weight (WeightingPolicy) – WeightingPolicy class, Default: None.

CalcElectronicEntropy

class mlacs.properties.calc_property.CalcElectronicEntropy(weight=None, gradient=False, criterion=None, frequence=1)

Class to obtain the electronic entropy (as computed by Abinit) from ASE’s Atoms object.