diff --git a/CHANGES.md b/CHANGES.md index 74cb18ca..f256926b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # Change log +## v2023.9.9 +* Added DIRECT sampling approach in `maml.sampling`. + ## v2022.9.20 * Bug fix for BOWSR failing because of indexing in some instances. diff --git a/docs/CHANGES.md b/docs/CHANGES.md index 74cb18ca..f256926b 100644 --- a/docs/CHANGES.md +++ b/docs/CHANGES.md @@ -1,5 +1,8 @@ # Change log +## v2023.9.9 +* Added DIRECT sampling approach in `maml.sampling`. + ## v2022.9.20 * Bug fix for BOWSR failing because of indexing in some instances. diff --git a/docs/maml.apps.bowsr.md b/docs/maml.apps.bowsr.md index 02dcfca7..7685c7f4 100644 --- a/docs/maml.apps.bowsr.md +++ b/docs/maml.apps.bowsr.md @@ -17,81 +17,75 @@ arXiv preprint arXiv:2104.10242 (2021). * [maml.apps.bowsr.model package](maml.apps.bowsr.model.md) - * [`EnergyModel`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.EnergyModel) + * `EnergyModel` - * [`EnergyModel.predict_energy()`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.EnergyModel.predict_energy) + * `EnergyModel.predict_energy()` + * maml.apps.bowsr.model.base module - * [maml.apps.bowsr.model.base module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.base) + * `EnergyModel` - * [`EnergyModel`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.base.EnergyModel) + * `EnergyModel.predict_energy()` - * [`EnergyModel.predict_energy()`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.base.EnergyModel.predict_energy) + * maml.apps.bowsr.model.cgcnn module - * [maml.apps.bowsr.model.cgcnn module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.cgcnn) + * maml.apps.bowsr.model.dft module - * [maml.apps.bowsr.model.dft module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.dft) + * `DFT` - * [`DFT`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.dft.DFT) - - - * [`DFT.predict_energy()`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.dft.DFT.predict_energy) - - - * [maml.apps.bowsr.model.megnet module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.megnet) + * `DFT.predict_energy()` + * maml.apps.bowsr.model.megnet module ## maml.apps.bowsr.acquisition module Module implements the new candidate proposal. +### *class* maml.apps.bowsr.acquisition.AcquisitionFunction(acq_type: str, kappa: float, xi: float) -### _class_ maml.apps.bowsr.acquisition.AcquisitionFunction(acq_type: str, kappa: float, xi: float) Bases: `object` An object to compute the acquisition functions. +#### *static* _ei(x: list | np.ndarray, gpr: GaussianProcessRegressor, y_max: float, xi: float, noise: float) -#### _static_ _ei(x: list | np.ndarray, gpr: GaussianProcessRegressor, y_max: float, xi: float, noise: float) - -#### _static_ _gpucb(x: list | np.ndarray, gpr: GaussianProcessRegressor, noise: float) +#### *static* _gpucb(x: list | np.ndarray, gpr: GaussianProcessRegressor, noise: float) -#### _static_ _poi(x: list | np.ndarray, gpr: GaussianProcessRegressor, y_max: float, xi: float, noise: float) +#### *static* _poi(x: list | np.ndarray, gpr: GaussianProcessRegressor, y_max: float, xi: float, noise: float) -#### _static_ _ucb(x: list | np.ndarray, gpr: GaussianProcessRegressor, kappa: float, noise: float) +#### *static* _ucb(x: list | np.ndarray, gpr: GaussianProcessRegressor, kappa: float, noise: float) #### calculate(x: list | np.ndarray, gpr: GaussianProcessRegressor, y_max: float, noise: float) + Calculate the value of acquisition function. * **Parameters** - * **x** (*ndarray*) – Query point need to be evaluated. * **gpr** (*GaussianProcessRegressor*) – A Gaussian process regressor fitted to - known data. +known data. * **y_max** (*float*) – The current maximum target value. * **noise** (*float*) – Noise added to acquisition function if noisy-based Bayesian - optimization is performed, 0 otherwise. - - +optimization is performed, 0 otherwise. ### maml.apps.bowsr.acquisition._trunc(values: ndarray, decimals: int = 3) + Truncate values to decimal places :param values: input array :type values: np.ndarray @@ -100,19 +94,18 @@ Truncate values to decimal places Returns: truncated array - ### maml.apps.bowsr.acquisition.ensure_rng(seed: int | None = None) + Create a random number generator based on an optional seed. This can be an integer for a seeded rng or None for an unseeded rng. - ### maml.apps.bowsr.acquisition.lhs_sample(n_intervals: int, bounds: np.ndarray, random_state: RandomState) + Latin hypercube sampling. * **Parameters** - * **n_intervals** (*int*) – Number of intervals. @@ -121,28 +114,25 @@ Latin hypercube sampling. * **random_state** (*RandomState*) – Random state. - - ### maml.apps.bowsr.acquisition.predict_mean_std(x: list | np.ndarray, gpr: GaussianProcessRegressor, noise: float) + Speed up the gpr.predict method by manually computing the kernel operations. * **Parameters** - * **x** (*list/ndarray*) – Query point need to be evaluated. * **gpr** (*GaussianProcessRegressor*) – A Gaussian process regressor fitted to - known data. +known data. * **noise** (*float*) – Noise added to standard deviation if test target - instead of GP posterior is sampled. 0 otherwise. - - +instead of GP posterior is sampled. 0 otherwise. ### maml.apps.bowsr.acquisition.propose_query_point(acquisition, scaler, gpr, y_max, noise, bounds, random_state, sampler, n_warmup=10000) + Strategy used to find the maximum of the acquisition function. It uses a combination of random sampling (cheap) and the ‘L-BFGS-B’ optimization method by first sampling n_warmup points at random @@ -151,7 +141,6 @@ and running L-BFGS-B from n_iter random starting points. * **Parameters** - * **acquisition** – The acquisition function. @@ -159,14 +148,14 @@ and running L-BFGS-B from n_iter random starting points. * **gpr** (*GaussianProcessRegressor*) – A Gaussian process regressor fitted to - known data. +known data. * **y_max** (*float*) – The current maximum target value. * **noise** (*float*) – The noise added to the acquisition function if noisy-based - Bayesian optimization was performed. +Bayesian optimization was performed. * **bounds** (*ndarray*) – The bounds of candidate points. @@ -179,81 +168,70 @@ and running L-BFGS-B from n_iter random starting points. * **n_warmup** (*int*) – Number of randomly sampled points to select the initial - point for minimization. - +point for minimization. ## maml.apps.bowsr.optimizer module Module implements the BayesianOptimizer. +### *class* maml.apps.bowsr.optimizer.BayesianOptimizer(model: EnergyModel, structure: Structure, relax_coords: bool = True, relax_lattice: bool = True, use_symmetry: bool = True, use_scaler: bool = True, noisy: bool = True, seed: int | None = None, \*\*kwargs) -### _class_ maml.apps.bowsr.optimizer.BayesianOptimizer(model: [EnergyModel](maml.apps.bowsr.model.md#maml.apps.bowsr.model.EnergyModel), structure: Structure, relax_coords: bool = True, relax_lattice: bool = True, use_symmetry: bool = True, use_scaler: bool = True, noisy: bool = True, seed: int | None = None, \*\*kwargs) Bases: `object` Bayesian optimizer used to optimize the structure. - #### add_query(x: ndarray) + Add query point into the TargetSpace. * **Parameters** - - **x** (*ndarray*) – Query point. - - +**x** (*ndarray*) – Query point. #### as_dict() + Dict representation of BayesianOptimizer. +#### *classmethod* from_dict(d) -#### _classmethod_ from_dict(d) Reconstitute a BayesianOptimizer object from a dict representation of BayesianOptimizer created using as_dict(). * **Parameters** - - **d** (*dict*) – Dict representation of BayesianOptimizer. - - +**d** (*dict*) – Dict representation of BayesianOptimizer. #### get_derived_structure(x: ndarray) + Get the derived structure. * **Parameters** - - **x** (*ndarray*) – The input of getting perturbed structure. - - +**x** (*ndarray*) – The input of getting perturbed structure. #### get_formation_energy(x: ndarray) + Calculate the formation energy of the perturbed structure. Absolute value is calculated on practical purpose of maximization of target function in Bayesian optimization. * **Parameters** - - **x** (*ndarray*) – The input of formation energy calculation. - - +**x** (*ndarray*) – The input of formation energy calculation. #### get_optimized_structure_and_energy(cutoff_distance: float = 1.1) -* **Parameters** - - **cutoff_distance** (*float*) – Cutoff distance of the allowed shortest atomic distance in reasonable structures. - When the cutoff_distance is 0, any structures will be considered reasonable. +* **Parameters** +**cutoff_distance** (*float*) – Cutoff distance of the allowed shortest atomic distance in reasonable structures. +When the cutoff_distance is 0, any structures will be considered reasonable. +#### *property* gpr() -#### _property_ gpr() Returns the Gaussian Process regressor. +#### optimize(n_init: int, n_iter: int, acq_type: str = ‘ei’, kappa: float = 2.576, xi: float = 0.0, n_warmup: int = 1000, is_continue: bool = False, sampler: str = ‘lhs’, \*\*gpr_params) -#### optimize(n_init: int, n_iter: int, acq_type: str = 'ei', kappa: float = 2.576, xi: float = 0.0, n_warmup: int = 1000, is_continue: bool = False, sampler: str = 'lhs', \*\*gpr_params) Optimize the coordinates and/or lattice of the structure by minimizing the model predicted formation energy of the structure. Model prediction error can be considered as a constant white noise. @@ -261,7 +239,6 @@ can be considered as a constant white noise. * **Parameters** - * **n_init** (*int*) – The number of initial points. @@ -269,9 +246,9 @@ can be considered as a constant white noise. * **acq_type** (*str*) – The type of acquisition function. Three choices are given, - ucb: Upper confidence bound, - ei: Expected improvement, - poi: Probability of improvement. +ucb: Upper confidence bound, +ei: Expected improvement, +poi: Probability of improvement. * **kappa** (*float*) – Tradeoff parameter used in upper confidence bound formulism. @@ -281,7 +258,7 @@ can be considered as a constant white noise. * **n_warmup** (*int*) – Number of randomly sampled points to select the initial - point for minimization. +point for minimization. * **is_continue** (*bool*) – whether to continue previous run without resetting GPR @@ -292,68 +269,62 @@ can be considered as a constant white noise. * **\*\*gpr_params** – Passthrough. - - #### propose(acquisition_function: AcquisitionFunction, n_warmup: int, sampler: str) + Suggest the next most promising point. * **Parameters** - * **acquisition_function** (*AcquisitionFunction*) – AcquisitionFunction. * **n_warmup** (*int*) – Number of randomly sampled points to select the initial - point for minimization. +point for minimization. * **sampler** (*str*) – Sampler. Options are Latin Hyperparameter Sampling and uniform sampling. - - #### set_bounds(\*\*bounds_parameter) -Set the bound value of wyckoff perturbation and lattice perturbation. +Set the bound value of wyckoff perturbation and lattice perturbation. #### set_gpr_params(\*\*gpr_params) -Set the parameters of internal GaussianProcessRegressor. +Set the parameters of internal GaussianProcessRegressor. #### set_space_empty() + Empty the target space. +#### *property* space() -#### _property_ space() Returns the target space. - ### maml.apps.bowsr.optimizer.atoms_crowded(structure: Structure, cutoff_distance: float = 1.1) + Identify whether structure is unreasonable because the atoms are “too close”. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. * **cutoff_distance** (*float*) – The minimum allowed atomic distance. - - ### maml.apps.bowsr.optimizer.struct2perturbation(structure: Structure, use_symmetry: bool = True, wyc_tol: float = 0.0003, abc_tol: float = 0.001, angle_tol: float = 0.2, symprec: float = 0.01) + Get the symmetry-driven perturbation of the structure. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. * **use_symmetry** (*bool*) – Whether to use constraint of symmetry to reduce - parameters space. +parameters space. * **wyc_tol** (*float*) – Tolerance for wyckoff symbol determined coordinates. @@ -368,60 +339,57 @@ Get the symmetry-driven perturbation of the structure. * **symprec** (*float*) – Tolerance for symmetry finding. - * **Returns** +WyckoffPerturbations for derivation of symmetrically - WyckoffPerturbations for derivation of symmetrically - - unique sites. Used to derive the coordinates of the sites. +```none + unique sites. Used to derive the coordinates of the sites. +``` - indices (list): Indices of symmetrically unique sites. - mapping (dict): A mapping dictionary that maps equivalent atoms +indices (list): Indices of symmetrically unique sites. +mapping (dict): A mapping dictionary that maps equivalent atoms - > onto each other. - - lp (LatticePerturbation): LatticePerturbation for derivation of lattice - - of the structure. +> onto each other. +lp (LatticePerturbation): LatticePerturbation for derivation of lattice +```none + of the structure. +``` * **Return type** - - wps (list) - +wps (list) ## maml.apps.bowsr.perturbation module Module implements the perturbation class for atomic and lattice relaxation. +### *class* maml.apps.bowsr.perturbation.LatticePerturbation(spg_int_symbol: int, use_symmetry: bool = True) -### _class_ maml.apps.bowsr.perturbation.LatticePerturbation(spg_int_symbol: int, use_symmetry: bool = True) Bases: `object` Perturbation class for determining the standard lattice. +#### *property* abc(*: list[float* ) -#### _property_ abc(_: list[float_ ) Returns the lattice lengths. +#### *property* fit_lattice(*: boo* ) -#### _property_ fit_lattice(_: boo_ ) Returns whether the lattice fits any crystal system. +#### *property* lattice(*: Lattic* ) -#### _property_ lattice(_: Lattic_ ) Returns the lattice. - #### sanity_check(lattice: Lattice, abc_tol: float = 0.001, angle_tol: float = 0.3) + Check whether the perturbation mode exists. * **Parameters** - * **lattice** (*Lattice*) – Lattice in Structure. @@ -430,282 +398,249 @@ Check whether the perturbation mode exists. * **angle_tol** (*float*) – Tolerance for lattice angles determined by crystal system. +### *class* maml.apps.bowsr.perturbation.WyckoffPerturbation(int_symbol: int, wyckoff_symbol: str, symmetry_ops: list[SymmOp] | None = None, use_symmetry: bool = True) - -### _class_ maml.apps.bowsr.perturbation.WyckoffPerturbation(int_symbol: int, wyckoff_symbol: str, symmetry_ops: list[SymmOp] | None = None, use_symmetry: bool = True) Bases: `object` Perturbation class for determining the standard wyckoff position and generating corresponding equivalent fractional coordinates. +#### *property* fit_site() -#### _property_ fit_site() Returns whether the site fits any standard wyckoff position. - #### get_orbit(p: list | np.ndarray, tol: float = 0.001) + Returns the orbit for a point. * **Parameters** - * **p** (*list/numpy.array*) – Fractional coordinated point. * **tol** (*float*) – Tolerance for determining if sites are the same. - - #### sanity_check(site: Site | PeriodicSite, wyc_tol: float = 0.0003) + Check whether the perturbation mode exists. * **Parameters** - * **site** (*PeriodicSite*) – PeriodicSite in Structure. * **wyc_tol** (*float*) – Tolerance for wyckoff symbol determined coordinates. +#### *property* site() - -#### _property_ site() Returns the site. - #### standardize(p: list | np.ndarray, tol: float = 0.001) + Get the standardized position of p. * **Parameters** - * **p** (*list/numpy.array*) – Fractional coordinated point. * **tol** (*float*) – Tolerance for determining if sites are the same. - - ### maml.apps.bowsr.perturbation.crystal_system(int_number: int) + Method for crystal system determination. * **Parameters** - - **int_number** (*int*) – International number of space group. - - +**int_number** (*int*) – International number of space group. ### maml.apps.bowsr.perturbation.get_standardized_structure(structure: Structure) + Get standardized structure. * **Parameters** - - **structure** (*Structure*) – Pymatgen Structure object. - - +**structure** (*Structure*) – Pymatgen Structure object. ### maml.apps.bowsr.perturbation.perturbation_mapping(x, fixed_indices) + Perturbation mapping. * **Parameters** - * **x** – * **fixed_indices** – - Returns: ## maml.apps.bowsr.preprocessing module Module implements the scaler. +### *class* maml.apps.bowsr.preprocessing.DummyScaler() -### _class_ maml.apps.bowsr.preprocessing.DummyScaler() Bases: `MSONable` Dummy scaler does nothing. - #### as_dict() + Serialize the instance into dictionary Returns: - #### fit(target: list | np.ndarray) + Fit the DummyScaler to the target. * **Parameters** +**target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, +n is the number of feature dimensions. - **target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, - n is the number of feature dimensions. - +#### *classmethod* from_dict(d) - -#### _classmethod_ from_dict(d) Deserialize from a dictionary :param d: Dict, dictionary contain class initialization parameters. Returns: - #### inverse_transform(transformed_target: list | np.ndarray) + Inversely transform the target. * **Parameters** - - **transformed_target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, - n is the number of feature dimensions. - - +**transformed_target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, +n is the number of feature dimensions. #### transform(target: list | np.ndarray) + Transform target. * **Parameters** +**target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, +n is the number of feature dimensions. - **target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, - n is the number of feature dimensions. - - +### *class* maml.apps.bowsr.preprocessing.StandardScaler(mean: list | np.ndarray | None = None, std: list | np.ndarray | None = None) -### _class_ maml.apps.bowsr.preprocessing.StandardScaler(mean: list | np.ndarray | None = None, std: list | np.ndarray | None = None) Bases: `MSONable` StandardScaler follows the sklean manner with addition of dictionary representation. - #### as_dict() -Dict representation of StandardScaler. +Dict representation of StandardScaler. #### fit(target: list | np.ndarray) + Fit the StandardScaler to the target. * **Parameters** +**target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, +n is the number of feature dimensions. - **target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, - n is the number of feature dimensions. - +#### *classmethod* from_dict(d) - -#### _classmethod_ from_dict(d) Reconstitute a StandardScaler object from a dict representation of StandardScaler created using as_dict(). * **Parameters** - - **d** (*dict*) – Dict representation of StandardScaler. - - +**d** (*dict*) – Dict representation of StandardScaler. #### inverse_transform(transformed_target: ndarray) + Inversely transform the target. * **Parameters** - - **transformed_target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, - n is the number of feature dimensions. - - +**transformed_target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, +n is the number of feature dimensions. #### transform(target: ndarray) + Transform target according to the mean and std. * **Parameters** - - **target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, - n is the number of feature dimensions. - +**target** (*ndarray*) – The (mxn) ndarray. m is the number of samples, +n is the number of feature dimensions. ## maml.apps.bowsr.target_space module Module implements the target space. +### *class* maml.apps.bowsr.target_space.TargetSpace(target_func: Callable, wps: list[WyckoffPerturbation], abc_dim: int, angles_dim: int, relax_coords: bool, relax_lattice: bool, scaler: StandardScaler | DummyScaler, random_state: RandomState) -### _class_ maml.apps.bowsr.target_space.TargetSpace(target_func: Callable, wps: list[WyckoffPerturbation], abc_dim: int, angles_dim: int, relax_coords: bool, relax_lattice: bool, scaler: StandardScaler | DummyScaler, random_state: RandomState) Bases: `object` Holds the perturbations of coordinates/lattice (x_wyckoff/x_lattice) – formation energy (Y). Allows for constant-time appends while ensuring no duplicates are added. +#### *property* bounds(*: ndarra* ) -#### _property_ bounds(_: ndarra_ ) Returns the search space of parameters. - #### lhs_sample(n_intervals: int) + Latin hypercube sampling. * **Parameters** +**n_intervals** (*int*) – Number of intervals. - **n_intervals** (*int*) – Number of intervals. +#### *property* params(*: ndarra* ) - - -#### _property_ params(_: ndarra_ ) Returns the parameters in target space. - #### probe(x) + Evaluate a single point x, to obtain the value y and then records them as observations. * **Parameters** - - **x** (*ndarray*) – A single point. - - +**x** (*ndarray*) – A single point. #### register(x, target) + Append a point and its target value to the known data. * **Parameters** - * **x** (*ndarray*) – A single query point. * **target** (*float*) – Target value. - - #### set_bounds(abc_bound: float = 1.2, angles_bound: float = 5, element_wise_wyckoff_bounds: dict | None = None) + Set the bound value of wyckoff perturbation and lattice perturbation/volume perturbation. - #### set_empty() + Empty the param, target of the space. +#### *property* target(*: ndarra* ) -#### _property_ target(_: ndarra_ ) Returns the target (i.e., formation energy) in target space. - #### uniform_sample() -Creates random points within the bounds of the space. +Creates random points within the bounds of the space. ### maml.apps.bowsr.target_space._hashable(x) + Ensure that an point is hashable by a python dict. \ No newline at end of file diff --git a/docs/maml.apps.bowsr.model.md b/docs/maml.apps.bowsr.model.md index f84e7be9..9aac2fca 100644 --- a/docs/maml.apps.bowsr.model.md +++ b/docs/maml.apps.bowsr.model.md @@ -8,34 +8,33 @@ nav_exclude: true Energy surrogate model. +## *class* maml.apps.bowsr.model.EnergyModel() -### _class_ maml.apps.bowsr.model.EnergyModel() Bases: `object` Base energy model class. For any model used in BOWSR, it has to have a predict_energy method that returns a float. +### predict_energy(structure: Structure) -#### predict_energy(structure: Structure) Predict the energy of a structure :param structure: Pymatgen Structure object. Returns: (float) energy value. - ## maml.apps.bowsr.model.base module Base class that expose a predict_energy method. +### *class* maml.apps.bowsr.model.base.EnergyModel() -### _class_ maml.apps.bowsr.model.base.EnergyModel() Bases: `object` Base energy model class. For any model used in BOWSR, it has to have a predict_energy method that returns a float. - #### predict_energy(structure: Structure) + Predict the energy of a structure :param structure: Pymatgen Structure object. @@ -49,21 +48,19 @@ CGCNN Wrapper. DFT wrapper. +### *class* maml.apps.bowsr.model.dft.DFT(exe_path: str | None = None) -### _class_ maml.apps.bowsr.model.dft.DFT(exe_path: str | None = None) Bases: `EnergyModel` DFT static calculation wrapped as energy model. - #### predict_energy(structure: Structure) + Predict energy from structure. * **Parameters** - - **structure** – (pymatgen Structure). - +**structure** – (pymatgen Structure). Returns: float diff --git a/docs/maml.apps.gbe.md b/docs/maml.apps.gbe.md index 164c0d6f..e53c869b 100644 --- a/docs/maml.apps.gbe.md +++ b/docs/maml.apps.gbe.md @@ -11,76 +11,69 @@ Weike Ye, Hui Zheng, Chi Chen, Shyue Ping Ong “A Universal Machine Learning Model for Elemental Grain Boundary Energies” arXiv preprint arXiv: 2201.11991 (2022). - ## maml.apps.gbe.describer module Module implements the describers for GB entry. +### *class* maml.apps.gbe.describer.GBBond(gb: GrainBoundary, loc_algo: str = ‘crystalnn’, bond_mat: np.ndarray | None = None, \*\*kwargs) -### _class_ maml.apps.gbe.describer.GBBond(gb: GrainBoundary, loc_algo: str = 'crystalnn', bond_mat: np.ndarray | None = None, \*\*kwargs) Bases: `MSONable` This class describes the GB Bonding environment using provided local environment algorithm. Available algorithms: GBBond.NNDict.keys(), default CrystalNN. - -#### NNDict(_ = {'brunnernn_real': , 'brunnernn_reciprocal': , 'brunnernn_relative': , 'covalentbondnn': , 'critic2nn': , 'crystalnn': , 'cutoffdictnn': , 'econnn': , 'jmolnn': , 'minimumdistancenn': , 'minimumokeeffenn': , 'minimumvirenn': , 'nearneighbors': , 'openbabelnn': , 'voronoinn': _ ) +#### NNDict(_ = {‘brunnernn_real’: , ‘brunnernn_reciprocal’: , ‘brunnernn_relative’: , ‘covalentbondnn’: , ‘critic2nn’: , ‘crystalnn’: , ‘cutoffdictnn’: , ‘econnn’: , ‘jmolnn’: , ‘minimumdistancenn’: , ‘minimumokeeffenn’: , ‘minimumvirenn’: , ‘nearneighbors’: , ‘openbabelnn’: , ‘voronoinn’: _ ) #### _get_bond_mat(gb: GrainBoundary) -* **Parameters** - - **gb** (*GrainBoundary*) – the grain boundary structure object. +* **Parameters** +**gb** (*GrainBoundary*) – the grain boundary structure object. * **Returns** +bond matrix +matrix of bond lengths + - bond matrix - matrix of bond lengths 1. bm[i][j] = bond length between atom i&j - if i & j is bonded (determined by the loc_algo) +if i & j is bonded (determined by the loc_algo) + + 2. bm[i][j] = bm[j][i] - 3. If not bonded, the bm[i][j] = np.nan + 3. If not bonded, the bm[i][j] = np.nan #### as_dict() + Dict representation of the GBond class. * **Returns** - - str, “bond_mat”: bond matrix} - +str, “bond_mat”: bond matrix} * **Return type** +dict of {“loc_algo” - dict of {“loc_algo” - - +#### *property* bond_matrix(*: ndarra* ) -#### _property_ bond_matrix(_: ndarra_ ) The (padded) bond matrix. +#### *classmethod* from_dict(d) -#### _classmethod_ from_dict(d) * **Parameters** - - **d** (*dict*) – Dict representation. - +**d** (*dict*) – Dict representation. * **Returns** - - GBBond - - +GBBond #### get_breakbond_ratio(gb: GrainBoundary, b0: float, return_count: bool = False) + Get the breakbond ratio, i.e the ratio of shorter bonds vs longer bonds compared to the bulk bond length (b0) The algo to find the bonds can vary @@ -91,61 +84,55 @@ Meme: if use get_neighbors, require a hard set cutoff, which adds to * **Parameters** - * **gb** (*GrainBoundary*) – a GrainBoundary object * **b0** (*float*) – cutoff to determine short vs. long bonds, - default the bulk bond length +default the bulk bond length * **return_count** (*bool*) – whether to return count of - * **Returns** - - shorter_bond / longer_bonds - if return_count: - shorter_bond: # of short bonds - longer_bond: # of long bonds - +shorter_bond / longer_bonds +if return_count: +shorter_bond: # of short bonds +longer_bond: # of long bonds * **Return type** - - ratio (float) - - +ratio (float) #### get_mean_bl_chg(b0: float) + Function to calculate the mean bond length difference between GB and the bulk :param b0: the bond length in bulk. :type b0: float Returns: the mean_bl_chg +#### *property* max_bl(*: floa* ) -#### _property_ max_bl(_: floa_ ) The maximum bond length. +#### *property* min_bl(*: floa* ) -#### _property_ min_bl(_: floa_ ) The minimum bond length. +### *class* maml.apps.gbe.describer.GBDescriber(structural_features: list | None = None, elemental_features: list | None = None, \*\*kwargs) -### _class_ maml.apps.gbe.describer.GBDescriber(structural_features: list | None = None, elemental_features: list | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` The describers that describes the grain boundary db entry with selected structural and elemental features. +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) #### generate_bulk_ref(gb_df: DataFrame, inc_target: bool = True) + Generate the bulk reference for given gb entry :param gb_df: data for gb :type gb_df: pd.DataFrame @@ -154,18 +141,14 @@ Generate the bulk reference for given gb entry * **Returns** - - data for bulk - +data for bulk * **Return type** - - bulk_df (pd.DataFrame) - - +bulk_df (pd.DataFrame) #### transform_one(db_entry: dict, inc_target: bool = True, inc_bulk_ref: bool = True, mp_api: str | None = None) + Describe gb with selected structural and elemental features :param db_entry: entry from surfacedb.All_GB_properties_parallel_copy :type db_entry: dict @@ -175,20 +158,22 @@ Describe gb with selected structural and elemental features > bulk reference: i.e. the entry of the origin bulk of the GB, -> the rotation angle (theta) = 0, gb_energy = 0 +> ```none +> the rotation angle (theta) = 0, gb_energy = 0 +> ``` * **Parameters** - - **mp_api** (*str*) – MP api key. - +**mp_api** (*str*) – MP api key. Returns: pd.DataFrame of processed data, columns are the feature labels - The task_id is included and serve as the unique id of the data - +```none +The task_id is included and serve as the unique id of the data +``` ### maml.apps.gbe.describer.convert_hcp_direction(rotation_axis: list, lat_type: str) + four index notion to three index notion for hcp and rhombohedral axis :param rotation_axis: four index notion of axis :type rotation_axis: list @@ -197,24 +182,20 @@ four index notion to three index notion for hcp and rhombohedral axis * **Returns** - - rotation axis in three index notion. - - +rotation axis in three index notion. ### maml.apps.gbe.describer.convert_hcp_plane(plane: list) + four index notion to three index notion for hcp and rhombohedral plane :param plane: four index notion. :type plane: list * **Returns** +three index notion of plane - three index notion of plane - - +### maml.apps.gbe.describer.get_elemental_feature(db_entry: dict, loc_algo: str = ‘crystalnn’, features: list | None = None, mp_api: str | None = None) -### maml.apps.gbe.describer.get_elemental_feature(db_entry: dict, loc_algo: str = 'crystalnn', features: list | None = None, mp_api: str | None = None) Function to get the elemental features :param db_entry: db entry :type db_entry: Dict @@ -225,32 +206,27 @@ Function to get the elemental features * **Parameters** - * **features** (*List*) – list of feature names - e_coh: cohesive energy - G: G_vrh shear modulus - a0: bulk lattice parameter a - ar: atomic radius - b0: the bond length of the metal bulk - mean_delta_bl: the mean bond length difference - - > between GB and the bulk +e_coh: cohesive energy +G: G_vrh shear modulus +a0: bulk lattice parameter a +ar: atomic radius +b0: the bond length of the metal bulk +mean_delta_bl: the mean bond length difference - bl: the mean bond length in GB +> between GB and the bulk +bl: the mean bond length in GB * **mp_api** (*str*) – api key to MP. - * **Returns** - - pd.DataFrame of elemental features - - +pd.DataFrame of elemental features ### maml.apps.gbe.describer.get_structural_feature(db_entry: dict, features: list | None = None) + The structural features: d_gb: interplanal distance of the gb_plane d_rot: interplanal distance of the gb_plane @@ -262,41 +238,37 @@ theta: rotation angle (sin and cos). * **Parameters** - * **db_entry** (*Dict*) – db entry * **features** (*List*) – list of features. - * **Returns** - - pd.DataFrame of structural features - +pd.DataFrame of structural features ## maml.apps.gbe.presetfeatures module Module defines feature objects for GB energy model. +### *class* maml.apps.gbe.presetfeatures.my_quant(str_name: str, latex_name: str | None = None, latex_unit: str | None = None) -### _class_ maml.apps.gbe.presetfeatures.my_quant(str_name: str, latex_name: str | None = None, latex_unit: str | None = None) Bases: `object` An object to describe GB quantities. +#### *property* latex() -#### _property_ latex() Returns: latex rep of the quant. +#### *property* name() -#### _property_ name() Returns: string rep of the quant. +#### *property* unit() -#### _property_ unit() Returns: latex rep of the quant unit. @@ -304,25 +276,21 @@ latex rep of the quant unit. Module implements helper functions to retrieve data for GB energy prediction paper. - ### maml.apps.gbe.utils.load_b0_dict() + Helper function to retrieve the b0 data. b0 is the bulk bond length. * **Returns** - - b0} - +b0} * **Return type** - - returns the dict of {element - - +returns the dict of {element ### maml.apps.gbe.utils.load_data(filename: str | None = None) + Helper function to load the data Default is to load the 361 data :param filename: the filename of the data. @@ -330,30 +298,24 @@ Default is to load the 361 data * **Returns** +data list - data list - - +### maml.apps.gbe.utils.load_mean_delta_bl_dict(loc_algo: str = ‘crystalnn’) -### maml.apps.gbe.utils.load_mean_delta_bl_dict(loc_algo: str = 'crystalnn') Helper function to load the mean_delta_bl data :param loc_algo: name of the algorithm. :type loc_algo: str * **Returns** - - mean_delta_bl(float)} - +mean_delta_bl(float)} * **Return type** - - {task_id (int) - - +{task_id (int) ### maml.apps.gbe.utils.update_b0_dict(data_source: list, mp_api: str | None) + Helper function to update the b0 dictionary Requires api key to MP :param data_source: list of GB data @@ -363,11 +325,8 @@ Requires api key to MP * **Returns** - - {el: b0}. - +{el: b0}. * **Return type** - - b0_dict (dict) \ No newline at end of file +b0_dict (dict) \ No newline at end of file diff --git a/docs/maml.apps.md b/docs/maml.apps.md index fe93d905..50e9e6b9 100644 --- a/docs/maml.apps.md +++ b/docs/maml.apps.md @@ -12,1379 +12,1369 @@ nav_exclude: true * [maml.apps.bowsr package](maml.apps.bowsr.md) - * [Subpackages](maml.apps.bowsr.md#subpackages) + * Subpackages * [maml.apps.bowsr.model package](maml.apps.bowsr.model.md) - * [`EnergyModel`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.EnergyModel) + * `EnergyModel` - * [`EnergyModel.predict_energy()`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.EnergyModel.predict_energy) + * `EnergyModel.predict_energy()` + * maml.apps.bowsr.model.base module - * [maml.apps.bowsr.model.base module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.base) + * `EnergyModel` - * [`EnergyModel`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.base.EnergyModel) + * `EnergyModel.predict_energy()` - * [`EnergyModel.predict_energy()`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.base.EnergyModel.predict_energy) + * maml.apps.bowsr.model.cgcnn module - * [maml.apps.bowsr.model.cgcnn module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.cgcnn) + * maml.apps.bowsr.model.dft module - * [maml.apps.bowsr.model.dft module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.dft) + * `DFT` - * [`DFT`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.dft.DFT) + * `DFT.predict_energy()` - * [`DFT.predict_energy()`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.dft.DFT.predict_energy) + * maml.apps.bowsr.model.megnet module - * [maml.apps.bowsr.model.megnet module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.megnet) + * maml.apps.bowsr.acquisition module + * `AcquisitionFunction` - * [maml.apps.bowsr.acquisition module](maml.apps.bowsr.md#module-maml.apps.bowsr.acquisition) + * `AcquisitionFunction._ei()` - * [`AcquisitionFunction`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction) + * `AcquisitionFunction._gpucb()` - * [`AcquisitionFunction._ei()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._ei) + * `AcquisitionFunction._poi()` - * [`AcquisitionFunction._gpucb()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._gpucb) + * `AcquisitionFunction._ucb()` - * [`AcquisitionFunction._poi()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._poi) + * `AcquisitionFunction.calculate()` - * [`AcquisitionFunction._ucb()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._ucb) + * `_trunc()` - * [`AcquisitionFunction.calculate()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction.calculate) + * `ensure_rng()` - * [`_trunc()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition._trunc) + * `lhs_sample()` - * [`ensure_rng()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.ensure_rng) + * `predict_mean_std()` - * [`lhs_sample()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.lhs_sample) + * `propose_query_point()` - * [`predict_mean_std()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.predict_mean_std) + * maml.apps.bowsr.optimizer module - * [`propose_query_point()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.propose_query_point) + * `BayesianOptimizer` - * [maml.apps.bowsr.optimizer module](maml.apps.bowsr.md#module-maml.apps.bowsr.optimizer) + * `BayesianOptimizer.add_query()` - * [`BayesianOptimizer`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer) + * `BayesianOptimizer.as_dict()` - * [`BayesianOptimizer.add_query()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.add_query) + * `BayesianOptimizer.from_dict()` - * [`BayesianOptimizer.as_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.as_dict) + * `BayesianOptimizer.get_derived_structure()` - * [`BayesianOptimizer.from_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.from_dict) + * `BayesianOptimizer.get_formation_energy()` - * [`BayesianOptimizer.get_derived_structure()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.get_derived_structure) + * `BayesianOptimizer.get_optimized_structure_and_energy()` - * [`BayesianOptimizer.get_formation_energy()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.get_formation_energy) + * `BayesianOptimizer.gpr` - * [`BayesianOptimizer.get_optimized_structure_and_energy()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.get_optimized_structure_and_energy) + * `BayesianOptimizer.optimize()` - * [`BayesianOptimizer.gpr`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.gpr) + * `BayesianOptimizer.propose()` - * [`BayesianOptimizer.optimize()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.optimize) + * `BayesianOptimizer.set_bounds()` - * [`BayesianOptimizer.propose()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.propose) + * `BayesianOptimizer.set_gpr_params()` - * [`BayesianOptimizer.set_bounds()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.set_bounds) + * `BayesianOptimizer.set_space_empty()` - * [`BayesianOptimizer.set_gpr_params()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.set_gpr_params) + * `BayesianOptimizer.space` - * [`BayesianOptimizer.set_space_empty()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.set_space_empty) + * `atoms_crowded()` - * [`BayesianOptimizer.space`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.space) + * `struct2perturbation()` - * [`atoms_crowded()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.atoms_crowded) + * maml.apps.bowsr.perturbation module - * [`struct2perturbation()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.struct2perturbation) + * `LatticePerturbation` - * [maml.apps.bowsr.perturbation module](maml.apps.bowsr.md#module-maml.apps.bowsr.perturbation) + * `LatticePerturbation.abc` - * [`LatticePerturbation`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation) + * `LatticePerturbation.fit_lattice` - * [`LatticePerturbation.abc`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.abc) + * `LatticePerturbation.lattice` - * [`LatticePerturbation.fit_lattice`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.fit_lattice) + * `LatticePerturbation.sanity_check()` - * [`LatticePerturbation.lattice`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.lattice) + * `WyckoffPerturbation` - * [`LatticePerturbation.sanity_check()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.sanity_check) + * `WyckoffPerturbation.fit_site` - * [`WyckoffPerturbation`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation) + * `WyckoffPerturbation.get_orbit()` - * [`WyckoffPerturbation.fit_site`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.fit_site) + * `WyckoffPerturbation.sanity_check()` - * [`WyckoffPerturbation.get_orbit()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.get_orbit) + * `WyckoffPerturbation.site` - * [`WyckoffPerturbation.sanity_check()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.sanity_check) + * `WyckoffPerturbation.standardize()` - * [`WyckoffPerturbation.site`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.site) + * `crystal_system()` - * [`WyckoffPerturbation.standardize()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.standardize) + * `get_standardized_structure()` - * [`crystal_system()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.crystal_system) + * `perturbation_mapping()` - * [`get_standardized_structure()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.get_standardized_structure) + * maml.apps.bowsr.preprocessing module - * [`perturbation_mapping()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.perturbation_mapping) + * `DummyScaler` - * [maml.apps.bowsr.preprocessing module](maml.apps.bowsr.md#module-maml.apps.bowsr.preprocessing) + * `DummyScaler.as_dict()` - * [`DummyScaler`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler) + * `DummyScaler.fit()` - * [`DummyScaler.as_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.as_dict) + * `DummyScaler.from_dict()` - * [`DummyScaler.fit()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.fit) + * `DummyScaler.inverse_transform()` - * [`DummyScaler.from_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.from_dict) + * `DummyScaler.transform()` - * [`DummyScaler.inverse_transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.inverse_transform) + * `StandardScaler` - * [`DummyScaler.transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.transform) + * `StandardScaler.as_dict()` - * [`StandardScaler`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler) + * `StandardScaler.fit()` - * [`StandardScaler.as_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.as_dict) + * `StandardScaler.from_dict()` - * [`StandardScaler.fit()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.fit) + * `StandardScaler.inverse_transform()` - * [`StandardScaler.from_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.from_dict) + * `StandardScaler.transform()` - * [`StandardScaler.inverse_transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.inverse_transform) + * maml.apps.bowsr.target_space module - * [`StandardScaler.transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.transform) + * `TargetSpace` - * [maml.apps.bowsr.target_space module](maml.apps.bowsr.md#module-maml.apps.bowsr.target_space) + * `TargetSpace.bounds` - * [`TargetSpace`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace) + * `TargetSpace.lhs_sample()` - * [`TargetSpace.bounds`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.bounds) + * `TargetSpace.params` - * [`TargetSpace.lhs_sample()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.lhs_sample) + * `TargetSpace.probe()` - * [`TargetSpace.params`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.params) + * `TargetSpace.register()` - * [`TargetSpace.probe()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.probe) + * `TargetSpace.set_bounds()` - * [`TargetSpace.register()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.register) + * `TargetSpace.set_empty()` - * [`TargetSpace.set_bounds()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.set_bounds) + * `TargetSpace.target` - * [`TargetSpace.set_empty()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.set_empty) + * `TargetSpace.uniform_sample()` - * [`TargetSpace.target`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.target) - - - * [`TargetSpace.uniform_sample()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.uniform_sample) - - - * [`_hashable()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space._hashable) + * `_hashable()` * [maml.apps.gbe package](maml.apps.gbe.md) + * maml.apps.gbe.describer module - * [maml.apps.gbe.describer module](maml.apps.gbe.md#module-maml.apps.gbe.describer) - + * `GBBond` - * [`GBBond`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond) + * `GBBond.NNDict` - * [`GBBond.NNDict`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.NNDict) + * `GBBond._get_bond_mat()` - * [`GBBond._get_bond_mat()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond._get_bond_mat) + * `GBBond.as_dict()` - * [`GBBond.as_dict()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.as_dict) + * `GBBond.bond_matrix` - * [`GBBond.bond_matrix`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.bond_matrix) + * `GBBond.from_dict()` - * [`GBBond.from_dict()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.from_dict) + * `GBBond.get_breakbond_ratio()` - * [`GBBond.get_breakbond_ratio()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.get_breakbond_ratio) + * `GBBond.get_mean_bl_chg()` - * [`GBBond.get_mean_bl_chg()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.get_mean_bl_chg) + * `GBBond.max_bl` - * [`GBBond.max_bl`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.max_bl) + * `GBBond.min_bl` - * [`GBBond.min_bl`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.min_bl) + * `GBDescriber` - * [`GBDescriber`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber) + * `GBDescriber._abc_impl` - * [`GBDescriber._abc_impl`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber._abc_impl) + * `GBDescriber._sklearn_auto_wrap_output_keys` - * [`GBDescriber._sklearn_auto_wrap_output_keys`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber._sklearn_auto_wrap_output_keys) + * `GBDescriber.generate_bulk_ref()` - * [`GBDescriber.generate_bulk_ref()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber.generate_bulk_ref) + * `GBDescriber.transform_one()` - * [`GBDescriber.transform_one()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber.transform_one) + * `convert_hcp_direction()` - * [`convert_hcp_direction()`](maml.apps.gbe.md#maml.apps.gbe.describer.convert_hcp_direction) + * `convert_hcp_plane()` - * [`convert_hcp_plane()`](maml.apps.gbe.md#maml.apps.gbe.describer.convert_hcp_plane) + * `get_elemental_feature()` - * [`get_elemental_feature()`](maml.apps.gbe.md#maml.apps.gbe.describer.get_elemental_feature) + * `get_structural_feature()` - * [`get_structural_feature()`](maml.apps.gbe.md#maml.apps.gbe.describer.get_structural_feature) + * maml.apps.gbe.presetfeatures module - * [maml.apps.gbe.presetfeatures module](maml.apps.gbe.md#module-maml.apps.gbe.presetfeatures) + * `my_quant` - * [`my_quant`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant) + * `my_quant.latex` - * [`my_quant.latex`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant.latex) + * `my_quant.name` - * [`my_quant.name`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant.name) + * `my_quant.unit` - * [`my_quant.unit`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant.unit) + * maml.apps.gbe.utils module - * [maml.apps.gbe.utils module](maml.apps.gbe.md#module-maml.apps.gbe.utils) + * `load_b0_dict()` - * [`load_b0_dict()`](maml.apps.gbe.md#maml.apps.gbe.utils.load_b0_dict) + * `load_data()` - * [`load_data()`](maml.apps.gbe.md#maml.apps.gbe.utils.load_data) + * `load_mean_delta_bl_dict()` - * [`load_mean_delta_bl_dict()`](maml.apps.gbe.md#maml.apps.gbe.utils.load_mean_delta_bl_dict) - - * [`update_b0_dict()`](maml.apps.gbe.md#maml.apps.gbe.utils.update_b0_dict) + * `update_b0_dict()` * [maml.apps.pes package](maml.apps.pes.md) - * [`DefectFormation`](maml.apps.pes.md#maml.apps.pes.DefectFormation) - - - * [`DefectFormation._parse()`](maml.apps.pes.md#maml.apps.pes.DefectFormation._parse) + * `DefectFormation` - * [`DefectFormation._sanity_check()`](maml.apps.pes.md#maml.apps.pes.DefectFormation._sanity_check) + * `DefectFormation._parse()` - * [`DefectFormation._setup()`](maml.apps.pes.md#maml.apps.pes.DefectFormation._setup) + * `DefectFormation._sanity_check()` - * [`DefectFormation.calculate()`](maml.apps.pes.md#maml.apps.pes.DefectFormation.calculate) + * `DefectFormation._setup()` - * [`DefectFormation.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes.DefectFormation.get_unit_cell) + * `DefectFormation.calculate()` - * [`ElasticConstant`](maml.apps.pes.md#maml.apps.pes.ElasticConstant) + * `DefectFormation.get_unit_cell()` - * [`ElasticConstant._RESTART_CONFIG`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._RESTART_CONFIG) + * `ElasticConstant` - * [`ElasticConstant._parse()`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._parse) + * `ElasticConstant._RESTART_CONFIG` - * [`ElasticConstant._sanity_check()`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._sanity_check) + * `ElasticConstant._parse()` - * [`ElasticConstant._setup()`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._setup) + * `ElasticConstant._sanity_check()` - * [`EnergyForceStress`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress) + * `ElasticConstant._setup()` - * [`EnergyForceStress._parse()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._parse) + * `EnergyForceStress` - * [`EnergyForceStress._rotate_force_stress()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._rotate_force_stress) + * `EnergyForceStress._parse()` - * [`EnergyForceStress._sanity_check()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._sanity_check) + * `EnergyForceStress._rotate_force_stress()` - * [`EnergyForceStress._setup()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._setup) + * `EnergyForceStress._sanity_check()` - * [`EnergyForceStress.calculate()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress.calculate) + * `EnergyForceStress._setup()` - * [`GAPotential`](maml.apps.pes.md#maml.apps.pes.GAPotential) + * `EnergyForceStress.calculate()` - * [`GAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.GAPotential._abc_impl) + * `GAPotential` - * [`GAPotential._line_up()`](maml.apps.pes.md#maml.apps.pes.GAPotential._line_up) + * `GAPotential._abc_impl` - * [`GAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.GAPotential.evaluate) + * `GAPotential._line_up()` - * [`GAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.GAPotential.from_config) + * `GAPotential.evaluate()` - * [`GAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.GAPotential.pair_coeff) + * `GAPotential.from_config()` - * [`GAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.GAPotential.pair_style) + * `GAPotential.pair_coeff` - * [`GAPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes.GAPotential.read_cfgs) + * `GAPotential.pair_style` - * [`GAPotential.save()`](maml.apps.pes.md#maml.apps.pes.GAPotential.save) + * `GAPotential.read_cfgs()` - * [`GAPotential.train()`](maml.apps.pes.md#maml.apps.pes.GAPotential.train) + * `GAPotential.save()` - * [`GAPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes.GAPotential.write_cfgs) + * `GAPotential.train()` - * [`GAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.GAPotential.write_param) + * `GAPotential.write_cfgs()` - * [`LMPStaticCalculator`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator) + * `GAPotential.write_param()` - * [`LMPStaticCalculator._COMMON_CMDS`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._COMMON_CMDS) + * `LMPStaticCalculator` - * [`LMPStaticCalculator._parse()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._parse) + * `LMPStaticCalculator._COMMON_CMDS` - * [`LMPStaticCalculator._sanity_check()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._sanity_check) + * `LMPStaticCalculator._parse()` - * [`LMPStaticCalculator._setup()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._setup) + * `LMPStaticCalculator._sanity_check()` - * [`LMPStaticCalculator.allowed_kwargs`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator.allowed_kwargs) + * `LMPStaticCalculator._setup()` - * [`LMPStaticCalculator.calculate()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator.calculate) + * `LMPStaticCalculator.allowed_kwargs` - * [`LMPStaticCalculator.set_lmp_exe()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator.set_lmp_exe) + * `LMPStaticCalculator.calculate()` - * [`LatticeConstant`](maml.apps.pes.md#maml.apps.pes.LatticeConstant) + * `LMPStaticCalculator.set_lmp_exe()` - * [`LatticeConstant.calculate()`](maml.apps.pes.md#maml.apps.pes.LatticeConstant.calculate) + * `LatticeConstant` - * [`MTPotential`](maml.apps.pes.md#maml.apps.pes.MTPotential) + * `LatticeConstant.calculate()` - * [`MTPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.MTPotential._abc_impl) + * `MTPotential` - * [`MTPotential._line_up()`](maml.apps.pes.md#maml.apps.pes.MTPotential._line_up) + * `MTPotential._abc_impl` - * [`MTPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.MTPotential.evaluate) + * `MTPotential._line_up()` - * [`MTPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.MTPotential.from_config) + * `MTPotential.evaluate()` - * [`MTPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.MTPotential.pair_coeff) + * `MTPotential.from_config()` - * [`MTPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.MTPotential.pair_style) + * `MTPotential.pair_coeff` - * [`MTPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes.MTPotential.read_cfgs) + * `MTPotential.pair_style` - * [`MTPotential.train()`](maml.apps.pes.md#maml.apps.pes.MTPotential.train) + * `MTPotential.read_cfgs()` - * [`MTPotential.write_cfg()`](maml.apps.pes.md#maml.apps.pes.MTPotential.write_cfg) + * `MTPotential.train()` - * [`MTPotential.write_ini()`](maml.apps.pes.md#maml.apps.pes.MTPotential.write_ini) + * `MTPotential.write_cfg()` - * [`MTPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.MTPotential.write_param) + * `MTPotential.write_ini()` - * [`NNPotential`](maml.apps.pes.md#maml.apps.pes.NNPotential) + * `MTPotential.write_param()` - * [`NNPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.NNPotential._abc_impl) + * `NNPotential` - * [`NNPotential._line_up()`](maml.apps.pes.md#maml.apps.pes.NNPotential._line_up) + * `NNPotential._abc_impl` - * [`NNPotential.bohr_to_angstrom`](maml.apps.pes.md#maml.apps.pes.NNPotential.bohr_to_angstrom) + * `NNPotential._line_up()` - * [`NNPotential.eV_to_Ha`](maml.apps.pes.md#maml.apps.pes.NNPotential.eV_to_Ha) + * `NNPotential.bohr_to_angstrom` - * [`NNPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.NNPotential.evaluate) + * `NNPotential.eV_to_Ha` - * [`NNPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.NNPotential.from_config) + * `NNPotential.evaluate()` - * [`NNPotential.load_input()`](maml.apps.pes.md#maml.apps.pes.NNPotential.load_input) + * `NNPotential.from_config()` - * [`NNPotential.load_scaler()`](maml.apps.pes.md#maml.apps.pes.NNPotential.load_scaler) + * `NNPotential.load_input()` - * [`NNPotential.load_weights()`](maml.apps.pes.md#maml.apps.pes.NNPotential.load_weights) + * `NNPotential.load_scaler()` - * [`NNPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.NNPotential.pair_coeff) + * `NNPotential.load_weights()` - * [`NNPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.NNPotential.pair_style) + * `NNPotential.pair_coeff` - * [`NNPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes.NNPotential.read_cfgs) + * `NNPotential.pair_style` - * [`NNPotential.train()`](maml.apps.pes.md#maml.apps.pes.NNPotential.train) + * `NNPotential.read_cfgs()` - * [`NNPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes.NNPotential.write_cfgs) + * `NNPotential.train()` - * [`NNPotential.write_input()`](maml.apps.pes.md#maml.apps.pes.NNPotential.write_input) + * `NNPotential.write_cfgs()` - * [`NNPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.NNPotential.write_param) + * `NNPotential.write_input()` - * [`NudgedElasticBand`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand) + * `NNPotential.write_param()` - * [`NudgedElasticBand._parse()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand._parse) + * `NudgedElasticBand` - * [`NudgedElasticBand._sanity_check()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand._sanity_check) + * `NudgedElasticBand._parse()` - * [`NudgedElasticBand._setup()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand._setup) + * `NudgedElasticBand._sanity_check()` - * [`NudgedElasticBand.calculate()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand.calculate) + * `NudgedElasticBand._setup()` - * [`NudgedElasticBand.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand.get_unit_cell) + * `NudgedElasticBand.calculate()` - * [`Potential`](maml.apps.pes.md#maml.apps.pes.Potential) + * `NudgedElasticBand.get_unit_cell()` - * [`SNAPotential`](maml.apps.pes.md#maml.apps.pes.SNAPotential) + * `Potential` - * [`SNAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.SNAPotential._abc_impl) + * `SNAPotential` - * [`SNAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.evaluate) + * `SNAPotential._abc_impl` - * [`SNAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.from_config) + * `SNAPotential.evaluate()` - * [`SNAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.SNAPotential.pair_coeff) + * `SNAPotential.from_config()` - * [`SNAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.SNAPotential.pair_style) + * `SNAPotential.pair_coeff` - * [`SNAPotential.train()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.train) + * `SNAPotential.pair_style` - * [`SNAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.write_param) + * `SNAPotential.train()` - * [`SpectralNeighborAnalysis`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis) + * `SNAPotential.write_param()` - * [`SpectralNeighborAnalysis._CMDS`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._CMDS) + * `SpectralNeighborAnalysis` - * [`SpectralNeighborAnalysis._parse()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._parse) + * `SpectralNeighborAnalysis._CMDS` - * [`SpectralNeighborAnalysis._sanity_check()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._sanity_check) + * `SpectralNeighborAnalysis._parse()` - * [`SpectralNeighborAnalysis._setup()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._setup) + * `SpectralNeighborAnalysis._sanity_check()` - * [`SpectralNeighborAnalysis.get_bs_subscripts()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis.get_bs_subscripts) + * `SpectralNeighborAnalysis._setup()` - * [`SpectralNeighborAnalysis.n_bs`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis.n_bs) + * `SpectralNeighborAnalysis.get_bs_subscripts()` - * [`get_default_lmp_exe()`](maml.apps.pes.md#maml.apps.pes.get_default_lmp_exe) + * `SpectralNeighborAnalysis.n_bs` + * `get_default_lmp_exe()` - * [maml.apps.pes._base module](maml.apps.pes.md#module-maml.apps.pes._base) + * maml.apps.pes._base module - * [`Potential`](maml.apps.pes.md#maml.apps.pes._base.Potential) + * `Potential` - * [`PotentialMixin`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin) + * `PotentialMixin` - * [`PotentialMixin.evaluate()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.evaluate) + * `PotentialMixin.evaluate()` - * [`PotentialMixin.from_config()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.from_config) + * `PotentialMixin.from_config()` - * [`PotentialMixin.predict_efs()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.predict_efs) + * `PotentialMixin.predict_efs()` - * [`PotentialMixin.train()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.train) + * `PotentialMixin.train()` - * [`PotentialMixin.write_param()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.write_param) + * `PotentialMixin.write_param()` - * [maml.apps.pes._gap module](maml.apps.pes.md#module-maml.apps.pes._gap) + * maml.apps.pes._gap module - * [`GAPotential`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential) + * `GAPotential` - * [`GAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential._abc_impl) + * `GAPotential._abc_impl` - * [`GAPotential._line_up()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential._line_up) + * `GAPotential._line_up()` - * [`GAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.evaluate) + * `GAPotential.evaluate()` - * [`GAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.from_config) + * `GAPotential.from_config()` - * [`GAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.pair_coeff) + * `GAPotential.pair_coeff` - * [`GAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.pair_style) + * `GAPotential.pair_style` - * [`GAPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.read_cfgs) + * `GAPotential.read_cfgs()` - * [`GAPotential.save()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.save) + * `GAPotential.save()` - * [`GAPotential.train()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.train) + * `GAPotential.train()` - * [`GAPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.write_cfgs) + * `GAPotential.write_cfgs()` - * [`GAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.write_param) + * `GAPotential.write_param()` - * [maml.apps.pes._lammps module](maml.apps.pes.md#module-maml.apps.pes._lammps) + * maml.apps.pes._lammps module - * [`DefectFormation`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation) + * `DefectFormation` - * [`DefectFormation._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation._parse) + * `DefectFormation._parse()` - * [`DefectFormation._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation._sanity_check) + * `DefectFormation._sanity_check()` - * [`DefectFormation._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation._setup) + * `DefectFormation._setup()` - * [`DefectFormation.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation.calculate) + * `DefectFormation.calculate()` - * [`DefectFormation.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation.get_unit_cell) + * `DefectFormation.get_unit_cell()` - * [`ElasticConstant`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant) + * `ElasticConstant` - * [`ElasticConstant._RESTART_CONFIG`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._RESTART_CONFIG) + * `ElasticConstant._RESTART_CONFIG` - * [`ElasticConstant._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._parse) + * `ElasticConstant._parse()` - * [`ElasticConstant._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._sanity_check) + * `ElasticConstant._sanity_check()` - * [`ElasticConstant._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._setup) + * `ElasticConstant._setup()` - * [`EnergyForceStress`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress) + * `EnergyForceStress` - * [`EnergyForceStress._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._parse) + * `EnergyForceStress._parse()` - * [`EnergyForceStress._rotate_force_stress()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._rotate_force_stress) + * `EnergyForceStress._rotate_force_stress()` - * [`EnergyForceStress._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._sanity_check) + * `EnergyForceStress._sanity_check()` - * [`EnergyForceStress._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._setup) + * `EnergyForceStress._setup()` - * [`EnergyForceStress.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress.calculate) + * `EnergyForceStress.calculate()` - * [`LMPRelaxationCalculator`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator) + * `LMPRelaxationCalculator` - * [`LMPRelaxationCalculator._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator._parse) + * `LMPRelaxationCalculator._parse()` - * [`LMPRelaxationCalculator._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator._sanity_check) + * `LMPRelaxationCalculator._sanity_check()` - * [`LMPRelaxationCalculator._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator._setup) + * `LMPRelaxationCalculator._setup()` - * [`LMPStaticCalculator`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator) + * `LMPStaticCalculator` - * [`LMPStaticCalculator._COMMON_CMDS`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._COMMON_CMDS) + * `LMPStaticCalculator._COMMON_CMDS` - * [`LMPStaticCalculator._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._parse) + * `LMPStaticCalculator._parse()` - * [`LMPStaticCalculator._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._sanity_check) + * `LMPStaticCalculator._sanity_check()` - * [`LMPStaticCalculator._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._setup) + * `LMPStaticCalculator._setup()` - * [`LMPStaticCalculator.allowed_kwargs`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator.allowed_kwargs) + * `LMPStaticCalculator.allowed_kwargs` - * [`LMPStaticCalculator.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator.calculate) + * `LMPStaticCalculator.calculate()` - * [`LMPStaticCalculator.set_lmp_exe()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator.set_lmp_exe) + * `LMPStaticCalculator.set_lmp_exe()` - * [`LammpsPotential`](maml.apps.pes.md#maml.apps.pes._lammps.LammpsPotential) + * `LammpsPotential` - * [`LammpsPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._lammps.LammpsPotential._abc_impl) + * `LammpsPotential._abc_impl` - * [`LammpsPotential.predict_efs()`](maml.apps.pes.md#maml.apps.pes._lammps.LammpsPotential.predict_efs) + * `LammpsPotential.predict_efs()` - * [`LatticeConstant`](maml.apps.pes.md#maml.apps.pes._lammps.LatticeConstant) + * `LatticeConstant` - * [`LatticeConstant.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.LatticeConstant.calculate) + * `LatticeConstant.calculate()` - * [`NudgedElasticBand`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand) + * `NudgedElasticBand` - * [`NudgedElasticBand._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand._parse) + * `NudgedElasticBand._parse()` - * [`NudgedElasticBand._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand._sanity_check) + * `NudgedElasticBand._sanity_check()` - * [`NudgedElasticBand._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand._setup) + * `NudgedElasticBand._setup()` - * [`NudgedElasticBand.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand.calculate) + * `NudgedElasticBand.calculate()` - * [`NudgedElasticBand.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand.get_unit_cell) + * `NudgedElasticBand.get_unit_cell()` - * [`SpectralNeighborAnalysis`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis) + * `SpectralNeighborAnalysis` - * [`SpectralNeighborAnalysis._CMDS`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._CMDS) + * `SpectralNeighborAnalysis._CMDS` - * [`SpectralNeighborAnalysis._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._parse) + * `SpectralNeighborAnalysis._parse()` - * [`SpectralNeighborAnalysis._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._sanity_check) + * `SpectralNeighborAnalysis._sanity_check()` - * [`SpectralNeighborAnalysis._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._setup) + * `SpectralNeighborAnalysis._setup()` - * [`SpectralNeighborAnalysis.get_bs_subscripts()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis.get_bs_subscripts) + * `SpectralNeighborAnalysis.get_bs_subscripts()` - * [`SpectralNeighborAnalysis.n_bs`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis.n_bs) + * `SpectralNeighborAnalysis.n_bs` - * [`SurfaceEnergy`](maml.apps.pes.md#maml.apps.pes._lammps.SurfaceEnergy) + * `SurfaceEnergy` - * [`SurfaceEnergy.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.SurfaceEnergy.calculate) + * `SurfaceEnergy.calculate()` - * [`_pretty_input()`](maml.apps.pes.md#maml.apps.pes._lammps._pretty_input) + * `_pretty_input()` - * [`_read_dump()`](maml.apps.pes.md#maml.apps.pes._lammps._read_dump) + * `_read_dump()` - * [`get_default_lmp_exe()`](maml.apps.pes.md#maml.apps.pes._lammps.get_default_lmp_exe) + * `get_default_lmp_exe()` - * [maml.apps.pes._mtp module](maml.apps.pes.md#module-maml.apps.pes._mtp) + * maml.apps.pes._mtp module - * [`MTPotential`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential) + * `MTPotential` - * [`MTPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential._abc_impl) + * `MTPotential._abc_impl` - * [`MTPotential._line_up()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential._line_up) + * `MTPotential._line_up()` - * [`MTPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.evaluate) + * `MTPotential.evaluate()` - * [`MTPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.from_config) + * `MTPotential.from_config()` - * [`MTPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.pair_coeff) + * `MTPotential.pair_coeff` - * [`MTPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.pair_style) + * `MTPotential.pair_style` - * [`MTPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.read_cfgs) + * `MTPotential.read_cfgs()` - * [`MTPotential.train()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.train) + * `MTPotential.train()` - * [`MTPotential.write_cfg()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.write_cfg) + * `MTPotential.write_cfg()` - * [`MTPotential.write_ini()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.write_ini) + * `MTPotential.write_ini()` - * [`MTPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.write_param) + * `MTPotential.write_param()` - * [`feed()`](maml.apps.pes.md#maml.apps.pes._mtp.feed) + * `feed()` - * [maml.apps.pes._nnp module](maml.apps.pes.md#module-maml.apps.pes._nnp) + * maml.apps.pes._nnp module - * [`NNPotential`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential) + * `NNPotential` - * [`NNPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential._abc_impl) + * `NNPotential._abc_impl` - * [`NNPotential._line_up()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential._line_up) + * `NNPotential._line_up()` - * [`NNPotential.bohr_to_angstrom`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.bohr_to_angstrom) + * `NNPotential.bohr_to_angstrom` - * [`NNPotential.eV_to_Ha`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.eV_to_Ha) + * `NNPotential.eV_to_Ha` - * [`NNPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.evaluate) + * `NNPotential.evaluate()` - * [`NNPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.from_config) + * `NNPotential.from_config()` - * [`NNPotential.load_input()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.load_input) + * `NNPotential.load_input()` - * [`NNPotential.load_scaler()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.load_scaler) + * `NNPotential.load_scaler()` - * [`NNPotential.load_weights()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.load_weights) + * `NNPotential.load_weights()` - * [`NNPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.pair_coeff) + * `NNPotential.pair_coeff` - * [`NNPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.pair_style) + * `NNPotential.pair_style` - * [`NNPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.read_cfgs) + * `NNPotential.read_cfgs()` - * [`NNPotential.train()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.train) + * `NNPotential.train()` - * [`NNPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.write_cfgs) + * `NNPotential.write_cfgs()` - * [`NNPotential.write_input()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.write_input) + * `NNPotential.write_input()` - * [`NNPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.write_param) + * `NNPotential.write_param()` - * [maml.apps.pes._snap module](maml.apps.pes.md#module-maml.apps.pes._snap) + * maml.apps.pes._snap module - * [`SNAPotential`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential) + * `SNAPotential` - * [`SNAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential._abc_impl) + * `SNAPotential._abc_impl` - * [`SNAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.evaluate) + * `SNAPotential.evaluate()` - * [`SNAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.from_config) + * `SNAPotential.from_config()` - * [`SNAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.pair_coeff) + * `SNAPotential.pair_coeff` - * [`SNAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.pair_style) + * `SNAPotential.pair_style` - * [`SNAPotential.train()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.train) + * `SNAPotential.train()` - * [`SNAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.write_param) + * `SNAPotential.write_param()` * [maml.apps.symbolic package](maml.apps.symbolic.md) - * [`AdaptiveLasso`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso) - - - * [`AdaptiveLasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso._penalty_jac) + * `AdaptiveLasso` - * [`AdaptiveLasso.get_w()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso.get_w) + * `AdaptiveLasso._penalty_jac()` - * [`AdaptiveLasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso.penalty) + * `AdaptiveLasso.get_w()` - * [`AdaptiveLasso.select()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso.select) + * `AdaptiveLasso.penalty()` - * [`DantzigSelector`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector) + * `AdaptiveLasso.select()` - * [`DantzigSelector.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector.construct_constraints) + * `DantzigSelector` - * [`DantzigSelector.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector.construct_jac) + * `DantzigSelector.construct_constraints()` - * [`DantzigSelector.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector.construct_loss) + * `DantzigSelector.construct_jac()` - * [`FeatureGenerator`](maml.apps.symbolic.md#maml.apps.symbolic.FeatureGenerator) + * `DantzigSelector.construct_loss()` - * [`FeatureGenerator.augment()`](maml.apps.symbolic.md#maml.apps.symbolic.FeatureGenerator.augment) + * `FeatureGenerator` - * [`ISIS`](maml.apps.symbolic.md#maml.apps.symbolic.ISIS) + * `FeatureGenerator.augment()` - * [`ISIS.evaluate()`](maml.apps.symbolic.md#maml.apps.symbolic.ISIS.evaluate) + * `ISIS` - * [`ISIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic.ISIS.run) + * `ISIS.evaluate()` - * [`L0BrutalForce`](maml.apps.symbolic.md#maml.apps.symbolic.L0BrutalForce) + * `ISIS.run()` - * [`L0BrutalForce.select()`](maml.apps.symbolic.md#maml.apps.symbolic.L0BrutalForce.select) + * `L0BrutalForce` - * [`Lasso`](maml.apps.symbolic.md#maml.apps.symbolic.Lasso) + * `L0BrutalForce.select()` - * [`Lasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.Lasso._penalty_jac) + * `Lasso` - * [`Lasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic.Lasso.penalty) + * `Lasso._penalty_jac()` - * [`Operator`](maml.apps.symbolic.md#maml.apps.symbolic.Operator) + * `Lasso.penalty()` - * [`Operator.compute()`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.compute) + * `Operator` - * [`Operator.from_str()`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.from_str) + * `Operator.compute()` - * [`Operator.gen_name()`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.gen_name) + * `Operator.from_str()` - * [`Operator.is_binary`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.is_binary) + * `Operator.gen_name()` - * [`Operator.is_commutative`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.is_commutative) + * `Operator.is_binary` - * [`Operator.is_unary`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.is_unary) + * `Operator.is_commutative` - * [`Operator.support_op_rep`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.support_op_rep) + * `Operator.is_unary` - * [`SCAD`](maml.apps.symbolic.md#maml.apps.symbolic.SCAD) + * `Operator.support_op_rep` - * [`SCAD._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.SCAD._penalty_jac) + * `SCAD` - * [`SCAD.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic.SCAD.penalty) + * `SCAD._penalty_jac()` - * [`SIS`](maml.apps.symbolic.md#maml.apps.symbolic.SIS) + * `SCAD.penalty()` - * [`SIS.compute_residual()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.compute_residual) + * `SIS` - * [`SIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.run) + * `SIS.compute_residual()` - * [`SIS.screen()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.screen) + * `SIS.run()` - * [`SIS.select()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.select) + * `SIS.screen()` - * [`SIS.set_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.set_gamma) + * `SIS.select()` - * [`SIS.set_selector()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.set_selector) + * `SIS.set_gamma()` - * [`SIS.update_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.update_gamma) + * `SIS.set_selector()` + * `SIS.update_gamma()` - * [maml.apps.symbolic._feature_generator module](maml.apps.symbolic.md#module-maml.apps.symbolic._feature_generator) + * maml.apps.symbolic._feature_generator module - * [`FeatureGenerator`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.FeatureGenerator) + * `FeatureGenerator` - * [`FeatureGenerator.augment()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.FeatureGenerator.augment) + * `FeatureGenerator.augment()` - * [`Operator`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator) + * `Operator` - * [`Operator.compute()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.compute) + * `Operator.compute()` - * [`Operator.from_str()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.from_str) + * `Operator.from_str()` - * [`Operator.gen_name()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.gen_name) + * `Operator.gen_name()` - * [`Operator.is_binary`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.is_binary) + * `Operator.is_binary` - * [`Operator.is_commutative`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.is_commutative) + * `Operator.is_commutative` - * [`Operator.is_unary`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.is_unary) + * `Operator.is_unary` - * [`Operator.support_op_rep`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.support_op_rep) + * `Operator.support_op_rep` - * [`_my_abs_diff()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_diff) + * `_my_abs_diff()` - * [`_my_abs_log10()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_log10) + * `_my_abs_log10()` - * [`_my_abs_sqrt()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_sqrt) + * `_my_abs_sqrt()` - * [`_my_abs_sum()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_sum) + * `_my_abs_sum()` - * [`_my_diff()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_diff) + * `_my_diff()` - * [`_my_div()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_div) + * `_my_div()` - * [`_my_exp()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_exp) + * `_my_exp()` - * [`_my_exp_power_2()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_exp_power_2) + * `_my_exp_power_2()` - * [`_my_exp_power_3()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_exp_power_3) + * `_my_exp_power_3()` - * [`_my_mul()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_mul) + * `_my_mul()` - * [`_my_power()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_power) + * `_my_power()` - * [`_my_sum()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum) + * `_my_sum()` - * [`_my_sum_exp()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum_exp) + * `_my_sum_exp()` - * [`_my_sum_power_2()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum_power_2) + * `_my_sum_power_2()` - * [`_my_sum_power_3()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum_power_3) + * `_my_sum_power_3()` - * [`_update_df()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._update_df) + * `_update_df()` - * [`generate_feature()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.generate_feature) + * `generate_feature()` - * [maml.apps.symbolic._selectors module](maml.apps.symbolic.md#module-maml.apps.symbolic._selectors) + * maml.apps.symbolic._selectors module - * [`AdaptiveLasso`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso) + * `AdaptiveLasso` - * [`AdaptiveLasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso._penalty_jac) + * `AdaptiveLasso._penalty_jac()` - * [`AdaptiveLasso.get_w()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso.get_w) + * `AdaptiveLasso.get_w()` - * [`AdaptiveLasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso.penalty) + * `AdaptiveLasso.penalty()` - * [`AdaptiveLasso.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso.select) + * `AdaptiveLasso.select()` - * [`BaseSelector`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector) + * `BaseSelector` - * [`BaseSelector._get_param_names()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector._get_param_names) + * `BaseSelector._get_param_names()` - * [`BaseSelector.compute_residual()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.compute_residual) + * `BaseSelector.compute_residual()` - * [`BaseSelector.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.construct_constraints) + * `BaseSelector.construct_constraints()` - * [`BaseSelector.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.construct_jac) + * `BaseSelector.construct_jac()` - * [`BaseSelector.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.construct_loss) + * `BaseSelector.construct_loss()` - * [`BaseSelector.evaluate()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.evaluate) + * `BaseSelector.evaluate()` - * [`BaseSelector.get_coef()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.get_coef) + * `BaseSelector.get_coef()` - * [`BaseSelector.get_feature_indices()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.get_feature_indices) + * `BaseSelector.get_feature_indices()` - * [`BaseSelector.get_params()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.get_params) + * `BaseSelector.get_params()` - * [`BaseSelector.predict()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.predict) + * `BaseSelector.predict()` - * [`BaseSelector.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.select) + * `BaseSelector.select()` - * [`BaseSelector.set_params()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.set_params) + * `BaseSelector.set_params()` - * [`DantzigSelector`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector) + * `DantzigSelector` - * [`DantzigSelector.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector.construct_constraints) + * `DantzigSelector.construct_constraints()` - * [`DantzigSelector.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector.construct_jac) + * `DantzigSelector.construct_jac()` - * [`DantzigSelector.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector.construct_loss) + * `DantzigSelector.construct_loss()` - * [`L0BrutalForce`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.L0BrutalForce) + * `L0BrutalForce` - * [`L0BrutalForce.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.L0BrutalForce.select) + * `L0BrutalForce.select()` - * [`Lasso`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.Lasso) + * `Lasso` - * [`Lasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.Lasso._penalty_jac) + * `Lasso._penalty_jac()` - * [`Lasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.Lasso.penalty) + * `Lasso.penalty()` - * [`PenalizedLeastSquares`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares) + * `PenalizedLeastSquares` - * [`PenalizedLeastSquares._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares._penalty_jac) + * `PenalizedLeastSquares._penalty_jac()` - * [`PenalizedLeastSquares._sse_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares._sse_jac) + * `PenalizedLeastSquares._sse_jac()` - * [`PenalizedLeastSquares.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.construct_constraints) + * `PenalizedLeastSquares.construct_constraints()` - * [`PenalizedLeastSquares.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.construct_jac) + * `PenalizedLeastSquares.construct_jac()` - * [`PenalizedLeastSquares.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.construct_loss) + * `PenalizedLeastSquares.construct_loss()` - * [`PenalizedLeastSquares.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.penalty) + * `PenalizedLeastSquares.penalty()` - * [`SCAD`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.SCAD) + * `SCAD` - * [`SCAD._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.SCAD._penalty_jac) + * `SCAD._penalty_jac()` - * [`SCAD.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.SCAD.penalty) + * `SCAD.penalty()` - * [maml.apps.symbolic._selectors_cvxpy module](maml.apps.symbolic.md#module-maml.apps.symbolic._selectors_cvxpy) + * maml.apps.symbolic._selectors_cvxpy module - * [`AdaptiveLassoCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP) + * `AdaptiveLassoCP` - * [`AdaptiveLassoCP.get_w()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP.get_w) + * `AdaptiveLassoCP.get_w()` - * [`AdaptiveLassoCP.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP.penalty) + * `AdaptiveLassoCP.penalty()` - * [`AdaptiveLassoCP.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP.select) + * `AdaptiveLassoCP.select()` - * [`BaseSelectorCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP) + * `BaseSelectorCP` - * [`BaseSelectorCP.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP.construct_constraints) + * `BaseSelectorCP.construct_constraints()` - * [`BaseSelectorCP.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP.construct_loss) + * `BaseSelectorCP.construct_loss()` - * [`BaseSelectorCP.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP.select) + * `BaseSelectorCP.select()` - * [`DantzigSelectorCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP) + * `DantzigSelectorCP` - * [`DantzigSelectorCP.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP.construct_constraints) + * `DantzigSelectorCP.construct_constraints()` - * [`DantzigSelectorCP.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP.construct_loss) + * `DantzigSelectorCP.construct_loss()` - * [`LassoCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.LassoCP) + * `LassoCP` - * [`LassoCP.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.LassoCP.penalty) + * `LassoCP.penalty()` - * [`PenalizedLeastSquaresCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP) + * `PenalizedLeastSquaresCP` - * [`PenalizedLeastSquaresCP.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP.construct_loss) + * `PenalizedLeastSquaresCP.construct_loss()` - * [`PenalizedLeastSquaresCP.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP.penalty) + * `PenalizedLeastSquaresCP.penalty()` - * [maml.apps.symbolic._sis module](maml.apps.symbolic.md#module-maml.apps.symbolic._sis) + * maml.apps.symbolic._sis module - * [`ISIS`](maml.apps.symbolic.md#maml.apps.symbolic._sis.ISIS) + * `ISIS` - * [`ISIS.evaluate()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.ISIS.evaluate) + * `ISIS.evaluate()` - * [`ISIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.ISIS.run) + * `ISIS.run()` - * [`SIS`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS) + * `SIS` - * [`SIS.compute_residual()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.compute_residual) + * `SIS.compute_residual()` - * [`SIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.run) + * `SIS.run()` - * [`SIS.screen()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.screen) + * `SIS.screen()` - * [`SIS.select()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.select) + * `SIS.select()` - * [`SIS.set_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.set_gamma) + * `SIS.set_gamma()` - * [`SIS.set_selector()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.set_selector) + * `SIS.set_selector()` - * [`SIS.update_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.update_gamma) + * `SIS.update_gamma()` - * [`_best_combination()`](maml.apps.symbolic.md#maml.apps.symbolic._sis._best_combination) + * `_best_combination()` - * [`_eval()`](maml.apps.symbolic.md#maml.apps.symbolic._sis._eval) + * `_eval()` - * [`_get_coeff()`](maml.apps.symbolic.md#maml.apps.symbolic._sis._get_coeff) \ No newline at end of file + * `_get_coeff()` \ No newline at end of file diff --git a/docs/maml.apps.pes.md b/docs/maml.apps.pes.md index 06fbe051..f7fa6bc7 100644 --- a/docs/maml.apps.pes.md +++ b/docs/maml.apps.pes.md @@ -8,36 +8,35 @@ nav_exclude: true This package contains PotentialMixin classes representing Interatomic Potentials. +## *class* maml.apps.pes.DefectFormation(ff_settings, specie, lattice, alat, \*\*kwargs) -### _class_ maml.apps.pes.DefectFormation(ff_settings, specie, lattice, alat, \*\*kwargs) Bases: `LMPStaticCalculator` Defect formation energy calculator. +### _parse() -#### _parse() Parse results from dump files. +### _sanity_check(structure) -#### _sanity_check(structure) Check if the structure is valid for this calculation. +### _setup() -#### _setup() Setup a calculation, writing input files, etc. +### calculate() -#### calculate() Calculate the vacancy formation given Potential class. +### *static* get_unit_cell(specie, lattice, alat) -#### _static_ get_unit_cell(specie, lattice, alat) Get the unit cell from specie, lattice type and lattice constant. * **Parameters** - * **specie** (*str*) – Name of specie. @@ -46,78 +45,74 @@ Get the unit cell from specie, lattice type and lattice constant. * **alat** (*float*) – The lattice constant of specific lattice and specie. +## *class* maml.apps.pes.ElasticConstant(ff_settings, potential_type=’external’, deformation_size=1e-06, jiggle=1e-05, maxiter=400, maxeval=1000, full_matrix=False, \*\*kwargs) - -### _class_ maml.apps.pes.ElasticConstant(ff_settings, potential_type='external', deformation_size=1e-06, jiggle=1e-05, maxiter=400, maxeval=1000, full_matrix=False, \*\*kwargs) Bases: `LMPStaticCalculator` Elastic constant calculator. +### *RESTART_CONFIG(* = {‘external’: {‘read_command’: ‘read_restart’, ‘restart_file’: ‘restart.equil’, ‘write_command’: ‘write_restart’}, ‘internal’: {‘read_command’: ‘read_restart’, ‘restart_file’: ‘restart.equil’, ‘write_command’: ‘write_restart’}_ ) -#### _RESTART_CONFIG(_ = {'external': {'read_command': 'read_restart', 'restart_file': 'restart.equil', 'write_command': 'write_restart'}, 'internal': {'read_command': 'read_restart', 'restart_file': 'restart.equil', 'write_command': 'write_restart'}_ ) +### _parse() -#### _parse() Parse results from dump files. +### _sanity_check(structure) -#### _sanity_check(structure) Check if the structure is valid for this calculation. +### _setup() -#### _setup() Setup a calculation, writing input files, etc. +## *class* maml.apps.pes.EnergyForceStress(ff_settings, \*\*kwargs) -### _class_ maml.apps.pes.EnergyForceStress(ff_settings, \*\*kwargs) Bases: `LMPStaticCalculator` Calculate energy, forces and virial stress of structures. +### _parse() -#### _parse() Parse results from dump files. +### *static* _rotate_force_stress(structure, forces, stresses) -#### _static_ _rotate_force_stress(structure, forces, stresses) +### _sanity_check(structure) -#### _sanity_check(structure) Check if the structure is valid for this calculation. +### _setup() -#### _setup() Setup a calculation, writing input files, etc. +### calculate(structures) -#### calculate(structures) Calculate the energy, forces and stresses of structures. Proper rotation of the results are applied when the structure is triclinic. * **Parameters** - - **structures** (*list*) – a list of structures - +**structures** (*list*) – a list of structures Returns: list of (energy, forces, stresses) tuple +## *class* maml.apps.pes.GAPotential(name=None, param=None) -### _class_ maml.apps.pes.GAPotential(name=None, param=None) Bases: `LammpsPotential` This class implements Smooth Overlap of Atomic Position potentials. +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *static* _line_up(structure, energy, forces, virial_stress) -#### _static_ _line_up(structure, energy, forces, virial_stress) Convert input structure, energy, forces, virial_stress to proper configuration format for MLIP usage. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. @@ -125,38 +120,36 @@ proper configuration format for MLIP usage. * **forces** (*list*) – The forces should have dimension - (num_atoms, 3). +(num_atoms, 3). * **virial_stress** (*list*) – stress should has 6 distinct - elements arranged in order [xx, yy, zz, xy, yz, xz]. - +elements arranged in order [xx, yy, zz, xy, yz, xz]. Returns: +### evaluate(test_structures, test_energies, test_forces, test_stresses=None, predict_energies=True, predict_forces=True, predict_stress=False) -#### evaluate(test_structures, test_energies, test_forces, test_stresses=None, predict_energies=True, predict_forces=True, predict_stress=False) Evaluate energies, forces and stresses of structures with trained interatomic potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. +of each structure in structures list. * **predict_energies** (*bool*) – Whether to predict energies of configurations. @@ -166,276 +159,273 @@ interatomic potentials. * **predict_stress** (*bool*) – Whether to predict virial stress of - configurations. - +configurations. +### *static* from_config(filename) -#### _static_ from_config(filename) Initialize potentials with parameters file. * **Parameters** - - **filename** (*str*) – The file storing parameters of potentials, - filename should ends with “.xml”. - +**filename** (*str*) – The file storing parameters of potentials, +filename should ends with “.xml”. * **Returns** +GAPotential. - GAPotential. - +### pair_coeff(_ = ‘pair_coeff \* \* {} {} {}_ ) +### pair_style(_ = ‘pair_style quip_ ) -#### pair_coeff(_ = 'pair_coeff \* \* {} {} {}_ ) +### *static* read_cfgs(filename, predict=False) -#### pair_style(_ = 'pair_style quip_ ) - -#### _static_ read_cfgs(filename, predict=False) Read the configuration file. * **Parameters** +**filename** (*str*) – The configuration file to be read. - **filename** (*str*) – The configuration file to be read. - +### save(filename=’param.yaml’) - -#### save(filename='param.yaml') Save parameters of the potentials. * **Parameters** - - **filename** (*str*) – The file to store parameters of potentials. - +**filename** (*str*) – The file to store parameters of potentials. * **Returns** +(str) - (str) - - +### train(train_structures, train_energies, train_forces, train_stresses=None, default_sigma=(0.0005, 0.1, 0.05, 0.01), use_energies=True, use_forces=True, use_stress=False, \*\*kwargs) -#### train(train_structures, train_energies, train_forces, train_stresses=None, default_sigma=(0.0005, 0.1, 0.05, 0.01), use_energies=True, use_forces=True, use_stress=False, \*\*kwargs) Training data with gaussian process regression. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each - single structure case. +with m atoms in structures list. m can be varied with each +single structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. +structure in structures list. * **default_sigma** (*list*) – Error criteria in energies, forces, stress - and hessian. Should have 4 numbers. +and hessian. Should have 4 numbers. * **use_energies** (*bool*) – Whether to use dft total energies for training. - Default to True. +Default to True. * **use_forces** (*bool*) – Whether to use dft atomic forces for training. - Default to True. +Default to True. * **use_stress** (*bool*) – Whether to use dft virial stress for training. - Default to False. +Default to False. * **kwargs** – l_max (int): Parameter to configure GAP. The band limit of - spherical harmonics basis function. Default to 12. - - n_max (int): Parameter to configure GAP. The number of radial basis +spherical harmonics basis function. Default to 12. - function. Default to 10. +n_max (int): Parameter to configure GAP. The number of radial basis - atom_sigma (float): Parameter to configure GAP. The width of gaussian +```none + function. Default to 10. +``` - atomic density. Default to 0.5. +atom_sigma (float): Parameter to configure GAP. The width of gaussian - zeta (float): Present when covariance function type is do product. +```none + atomic density. Default to 0.5. +``` - Default to 4. +zeta (float): Present when covariance function type is do product. - cutoff (float): Parameter to configure GAP. The cutoff radius. +```none + Default to 4. +``` - Default to 4.0. +cutoff (float): Parameter to configure GAP. The cutoff radius. - cutoff_transition_width (float): Parameter to configure GAP. +```none + Default to 4.0. +``` - The transition width of cutoff radial. Default to 0.5. +cutoff_transition_width (float): Parameter to configure GAP. - delta (float): Parameter to configure Sparsification. +```none + The transition width of cutoff radial. Default to 0.5. +``` - The signal variance of noise. Default to 1. +delta (float): Parameter to configure Sparsification. - f0 (float): Parameter to configure Sparsification. +```none + The signal variance of noise. Default to 1. +``` - The signal mean of noise. Default to 0.0. +f0 (float): Parameter to configure Sparsification. - n_sparse (int): Parameter to configure Sparsification. +```none + The signal mean of noise. Default to 0.0. +``` - Number of sparse points. +n_sparse (int): Parameter to configure Sparsification. - covariance_type (str): Parameter to configure Sparsification. +```none + Number of sparse points. +``` - The type of convariance function. Default to dot_product. +covariance_type (str): Parameter to configure Sparsification. - sparse_method (str): Method to perform clustering in sparsification. +```none + The type of convariance function. Default to dot_product. +``` - Default to ‘cur_points’. +sparse_method (str): Method to perform clustering in sparsification. - sparse_jitter (float): Intrisic error of atomic/bond energy, +```none + Default to ‘cur_points’. +``` - used to regularise the sparse covariance matrix. - Default to 1e-8. +sparse_jitter (float): Intrisic error of atomic/bond energy, - e0 (float): Atomic energy value to be subtracted from energies +```none + used to regularise the sparse covariance matrix. + Default to 1e-8. +``` - before fitting. Default to 0.0. +e0 (float): Atomic energy value to be subtracted from energies - e0_offset (float): Offset of baseline. If zero, the offset is +```none + before fitting. Default to 0.0. +``` - the average atomic energy of the input data or the e0 - specified manually. Default to 0.0. +e0_offset (float): Offset of baseline. If zero, the offset is +```none + the average atomic energy of the input data or the e0 + specified manually. Default to 0.0. +``` +### write_cfgs(filename, cfg_pool) - -#### write_cfgs(filename, cfg_pool) Write the formatted configuration file. * **Parameters** - * **filename** (*str*) – The filename to be written. * **cfg_pool** (*list*) – The configuration pool contains - structure and energy/forces properties. - +structure and energy/forces properties. +### write_param(xml_filename=’gap.2020.01.xml’) -#### write_param(xml_filename='gap.2020.01.xml') Write xml file to perform lammps calculation. * **Parameters** +**xml_filename** (*str*) – Filename to store xml formatted parameters. - **xml_filename** (*str*) – Filename to store xml formatted parameters. - +## *class* maml.apps.pes.LMPStaticCalculator(\*\*kwargs) - -### _class_ maml.apps.pes.LMPStaticCalculator(\*\*kwargs) Bases: `object` Abstract class to perform static structure property calculation using LAMMPS. +### *COMMON_CMDS(* = [‘units metal’, ‘atom_style charge’, ‘box tilt large’, ‘read_data data.static’, ‘run 0’_ ) -#### _COMMON_CMDS(_ = ['units metal', 'atom_style charge', 'box tilt large', 'read_data data.static', 'run 0'_ ) +### *abstract* _parse() -#### _abstract_ _parse() Parse results from dump files. +### *abstract* _sanity_check(structure) -#### _abstract_ _sanity_check(structure) Check if the structure is valid for this calculation. +### *abstract* _setup() -#### _abstract_ _setup() Setup a calculation, writing input files, etc. +### allowed_kwargs(_ = [‘lmp_exe’_ ) -#### allowed_kwargs(_ = ['lmp_exe'_ ) +### calculate(structures) -#### calculate(structures) Perform the calculation on a series of structures. * **Parameters** - - **structures** – Input structures in a list. - +**structures** – Input structures in a list. * **Returns** +List of computed data corresponding to each structure, +varies with different subclasses. - List of computed data corresponding to each structure, - varies with different subclasses. - +### set_lmp_exe(lmp_exe: str) - -#### set_lmp_exe(lmp_exe: str) Set lammps executable for the instance. * **Parameters** - - **lmp_exe** (*str*) – lammps executable path - +**lmp_exe** (*str*) – lammps executable path Returns: +## *class* maml.apps.pes.LatticeConstant(ff_settings, box_relax=True, box_relax_keywords=’aniso 0.0 vmax 0.001’, box_triclinic=False, min_style=’cg’, etol=1e-15, ftol=1e-15, maxiter=5000, maxeval=5000, \*\*kwargs) -### _class_ maml.apps.pes.LatticeConstant(ff_settings, box_relax=True, box_relax_keywords='aniso 0.0 vmax 0.001', box_triclinic=False, min_style='cg', etol=1e-15, ftol=1e-15, maxiter=5000, maxeval=5000, \*\*kwargs) Bases: `LMPRelaxationCalculator` Lattice Constant Relaxation Calculator. +### calculate(structures) -#### calculate(structures) Calculate the relaxed lattice parameters of a list of structures. * **Parameters** - - **structures** (*[**Structure**]*) – Input structures in a list. - +**structures** (*[**Structure**]*) – Input structures in a list. * **Returns** +List of relaxed lattice constants (a, b, c in Å) of the input structures. - List of relaxed lattice constants (a, b, c in Å) of the input structures. +## *class* maml.apps.pes.MTPotential(name=None, param=None, version=None) - - -### _class_ maml.apps.pes.MTPotential(name=None, param=None, version=None) Bases: `LammpsPotential` This class implements moment tensor potentials. Installation of the mlip package is needed. Please refer to [https://mlip.skoltech.ru](https://mlip.skoltech.ru). +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### _line_up(structure, energy, forces, virial_stress) -#### _line_up(structure, energy, forces, virial_stress) Convert input structure, energy, forces, virial_stress to proper configuration format for mlip usage. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. @@ -446,98 +436,88 @@ proper configuration format for mlip usage. * **virial_stress** (*list*) – stress should has 6 distinct - elements arranged in order [xx, yy, zz, yz, xz, xy]. - +elements arranged in order [xx, yy, zz, yz, xz, xy]. +### evaluate(test_structures, test_energies, test_forces, test_stresses=None, \*\*kwargs) -#### evaluate(test_structures, test_energies, test_forces, test_stresses=None, \*\*kwargs) Evaluate energies, forces and stresses of structures with trained interatomic potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. +of each structure in structures list. * **kwargs** – Parameters of write_param method. +### *static* from_config(filename, elements) - -#### _static_ from_config(filename, elements) Initialize potentials with parameters file. * **Parameters** - * **filename** (*str*) – The file storing parameters of potentials, filename should - ends with “.mtp”. +ends with “.mtp”. * **elements** (*list*) – The list of elements. - * **Returns** +MTPotential - MTPotential +### pair_coeff(_ = ‘pair_coeff \* \*_ ) +### pair_style(_ = ‘pair_style mlip {}_ ) +### read_cfgs(filename) -#### pair_coeff(_ = 'pair_coeff \* \*_ ) - -#### pair_style(_ = 'pair_style mlip {}_ ) - -#### read_cfgs(filename) * **Parameters** +**filename** (*str*) – The configuration file to be read. - **filename** (*str*) – The configuration file to be read. - - +### train(train_structures, train_energies, train_forces, train_stresses, unfitted_mtp=’08g.mtp’, max_dist=5, radial_basis_size=8, max_iter=1000, energy_weight=1, force_weight=0.01, stress_weight=0.001, init_params=’same’, scale_by_force=0, bfgs_conv_tol=0.001, weighting=’vibration’) -#### train(train_structures, train_energies, train_forces, train_stresses, unfitted_mtp='08g.mtp', max_dist=5, radial_basis_size=8, max_iter=1000, energy_weight=1, force_weight=0.01, stress_weight=0.001, init_params='same', scale_by_force=0, bfgs_conv_tol=0.001, weighting='vibration') Training data with moment tensor method. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each single - structure case. +with m atoms in structures list. m can be varied with each single +structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each structure - in structures list. +in structures list. * **unfitted_mtp** (*str*) – Define the initial mtp file. Default to the mtp file - stored in .params directory. +stored in .params directory. * **max_dist** (*float*) – The actual radial cutoff. @@ -559,23 +539,22 @@ Training data with moment tensor method. * **init_params** (*str*) – How to initialize parameters if a potential was not - pre-fitted. Choose from “same” and “random”. +pre-fitted. Choose from “same” and “random”. * **scale_by_force** (*float*) – Default=0. If >0 then configurations near equilibrium - (with roughly force < scale_by_force) get more weight. +(with roughly force < scale_by_force) get more weight. * **bfgs_conv_tol** (*float*) – Stop training if error dropped by a factor smaller than this - over 50 BFGS iterations. +over 50 BFGS iterations. * **weighting** (*str*) – How to weight configuration with different sizes relative to each other. - Choose from “vibrations”, “molecules” and “structures”. - +Choose from “vibrations”, “molecules” and “structures”. +### write_cfg(filename, cfg_pool) -#### write_cfg(filename, cfg_pool) Write configurations to file :param filename: filename :type filename: str @@ -584,8 +563,8 @@ Write configurations to file Returns: +### write_ini(mtp_filename=’fitted.mtp’, select=False, \*\*kwargs) -#### write_ini(mtp_filename='fitted.mtp', select=False, \*\*kwargs) Write mlip.ini file for mlip packages of version mlip-2 or mlip-dev. Supported keyword arguments are parallel with options stated in the mlip manuals. mlip-2 is recommended, as it is the only officially supported version by mlip. @@ -594,250 +573,324 @@ Please refer to [https://mlip.skoltech.ru](https://mlip.skoltech.ru). * **Parameters** - * **mlip-2** – mtp_filename (str): Name of file with MTP to be loaded. - write_cfgs (str): Name of file for mlp processed configurations to be written to. - write_cfgs_skip (int): Skipped number of processed configurations before writing. - select (bool): activates or deactivates calculation of extrapolation grades and - - > optionally writing configurations with high extrapolation grades. False is - > recommended for large-scale MD run. +write_cfgs (str): Name of file for mlp processed configurations to be written to. +write_cfgs_skip (int): Skipped number of processed configurations before writing. +select (bool): activates or deactivates calculation of extrapolation grades and - select_save_selected (str): Name of file for saving configurations with grade +> optionally writing configurations with high extrapolation grades. False is +> recommended for large-scale MD run. - exceeding select_threshold. +select_save_selected (str): Name of file for saving configurations with grade - select_threshold (float): Configurations with extrapolation grade exceeding the +```none + exceeding select_threshold. +``` - value will be saved to the specified file. +select_threshold (float): Configurations with extrapolation grade exceeding the - select_threshold_break (float): The mlip execution will be interrupted if the +```none + value will be saved to the specified file. +``` - extrapolation grade exceeds this value. +select_threshold_break (float): The mlip execution will be interrupted if the - select_load_state (str): Name of file for loading the active learning state, +```none + extrapolation grade exceeds this value. +``` - typically created by the mlp calc-grade command. +select_load_state (str): Name of file for loading the active learning state, - select_log (str): Name of file (or standard output stream stdout/stderr) for +```none + typically created by the mlp calc-grade command. +``` - writing a log of the configuration selection process. +select_log (str): Name of file (or standard output stream stdout/stderr) for +```none + writing a log of the configuration selection process. +``` * **mlip-dev** – Abinitio (int): Defines Ab-initio models. Default to 1. - > 0: If Ab-initio models is not required. - > 1: Used if driver provides EFS data with configurations. - > 2: Use embedded Lennard-Jones pair potentials. +> 0: If Ab-initio models is not required. +> 1: Used if driver provides EFS data with configurations. +> 2: Use embedded Lennard-Jones pair potentials. - > > r_min (float): Distance to minimum of pair function (in Angstroms). +> > r_min (float): Distance to minimum of pair function (in Angstroms). - > > Default to 2.0. +> > ```none +> > Default to 2.0. +> > ``` - > > scale (float): Value of pair function in minimum (in eV). +> > scale (float): Value of pair function in minimum (in eV). - > > Default to 1.0. +> > ```none +> > Default to 1.0. +> > ``` - > > cutoff (float): Cutoff radius (in Angstroms). Default to 5.0. +> > cutoff (float): Cutoff radius (in Angstroms). Default to 5.0. - > 3: Use DFT models by VASP. Linking via files exchange. +> 3: Use DFT models by VASP. Linking via files exchange. - > > POSCAR (str): Relative path of POSCAR file. - > > OUTCAR (str): Relative path of OUTCAR file. - > > Start_command (str): Relative path of command file. +> > POSCAR (str): Relative path of POSCAR file. +> > OUTCAR (str): Relative path of OUTCAR file. +> > Start_command (str): Relative path of command file. - > 4: Use potentials calculating by LAMMPS. Linking via files exchange. +> 4: Use potentials calculating by LAMMPS. Linking via files exchange. - > > Input_file (str): File with configuration to be read by lammps. - > > Output_file (str): File with configuration and EFS data to be read by MLIP. - > > Start_command (str): Relative path of command file. +> > Input_file (str): File with configuration to be read by lammps. +> > Output_file (str): File with configuration and EFS data to be read by MLIP. +> > Start_command (str): Relative path of command file. - > 5: Use MTP as Ab-initio potentials. +> 5: Use MTP as Ab-initio potentials. - > > MTP_filename (str): MTP file name. +> > MTP_filename (str): MTP file name. - MLIP (str): MTP. +MLIP (str): MTP. - > load_from (str): Potential filename. - > Cacluate_EFS (bool): Whether to perform EFS calculation by MTP. - > Fit (bool): Whether to perform MTP learning. +> load_from (str): Potential filename. +> Cacluate_EFS (bool): Whether to perform EFS calculation by MTP. +> Fit (bool): Whether to perform MTP learning. - > > Save (str): Output MTP file name (for trained MTP). - > > Energy_equation_weight (float): Weight for energy equation in +> > Save (str): Output MTP file name (for trained MTP). +> > Energy_equation_weight (float): Weight for energy equation in - > > > fitting procedure. Default to 1.0. +> > > fitting procedure. Default to 1.0. - > > Forces_equation_weight (float): Weight for forces equations in +> > Forces_equation_weight (float): Weight for forces equations in - > > fitting procedure. Default to 0.001. +> > ```none +> > fitting procedure. Default to 0.001. +> > ``` - > > Stress_equation_weight (float): Weight for stresses equations in +> > Stress_equation_weight (float): Weight for stresses equations in - > > fitting procedure. Default to 0.1. +> > ```none +> > fitting procedure. Default to 0.1. +> > ``` - > > Relative_forces_weight (float): If greater than zero, large forces +> > Relative_forces_weight (float): If greater than zero, large forces - > > will be fitted less accurate than small. Default to 0.0. +> > ```none +> > will be fitted less accurate than small. Default to 0.0. +> > ``` - > > Fit_log (str): File to write fitting log. No logging if not specified. +> > Fit_log (str): File to write fitting log. No logging if not specified. - > > Default to None. +> > ```none +> > Default to None. +> > ``` - > Select (bool): Whether to activate active learning. Default to False. +> Select (bool): Whether to activate active learning. Default to False. - > > Site_E_weight (float): Weight for site energy equations in +> > Site_E_weight (float): Weight for site energy equations in - > > selection procedure. Default to 1.0. +> > ```none +> > selection procedure. Default to 1.0. +> > ``` - > > Energy_weight (float): Weight for energy equation in +> > Energy_weight (float): Weight for energy equation in - > > selection procedure. Default to 0.0. +> > ```none +> > selection procedure. Default to 0.0. +> > ``` - > > Forces_weight (float): Weight for forces equations in +> > Forces_weight (float): Weight for forces equations in - > > selection procedure. Default to 0.0. +> > ```none +> > selection procedure. Default to 0.0. +> > ``` - > > Stress_weight (float): Weight for stresses equations in +> > Stress_weight (float): Weight for stresses equations in - > > selection procedure. Default to 0.0. +> > ```none +> > selection procedure. Default to 0.0. +> > ``` - > > Threshold_slct (float): Selection threshold - maximum +> > Threshold_slct (float): Selection threshold - maximum - > > allowed extrapolation level. Default to 0.1. +> > ```none +> > allowed extrapolation level. Default to 0.1. +> > ``` - > > Save_TS (str): Filename where selected configurations +> > Save_TS (str): Filename where selected configurations - > > will be saved. No configuration saving if not specified. - > > Default to None. +> > ```none +> > will be saved. No configuration saving if not specified. +> > Default to None. +> > ``` - > > Save_state (str): Filename where state of the selection +> > Save_state (str): Filename where state of the selection - > > will be saved. No saving if not specified. Default to None. +> > ```none +> > will be saved. No saving if not specified. Default to None. +> > ``` - > > Load_state (str): Filename where state of the selection +> > Load_state (str): Filename where state of the selection - > > will be loaded. No saving if not specified. Default to None. +> > ```none +> > will be loaded. No saving if not specified. Default to None. +> > ``` - > > Select_log (str): File to write fitting log. No logging +> > Select_log (str): File to write fitting log. No logging - > > if not specified. Default to None. +> > ```none +> > if not specified. Default to None. +> > ``` - > LOFT (bool): Whether to perform learning on the fly. Default to False +> LOFT (bool): Whether to perform learning on the fly. Default to False - > > EFSviaMTP (bool): Works only on LOFT regime. If True, +> > EFSviaMTP (bool): Works only on LOFT regime. If True, - > > only MTP-calculated EFS will be passed to driver, else - > > pass to driver ab-initio EFS while LOTF when learning occurs. +> > ```none +> > only MTP-calculated EFS will be passed to driver, else +> > pass to driver ab-initio EFS while LOTF when learning occurs. +> > ``` - > > Log (str): Filename to write log of learning on the fly process. +> > Log (str): Filename to write log of learning on the fly process. - > > No logging if not specified. Default to None. +> > ```none +> > No logging if not specified. Default to None. +> > ``` - > Check_errors (bool): If True, comparison and accumulation of +> Check_errors (bool): If True, comparison and accumulation of - > error statistics for EFS calculated by ab-initio models and MTP. - > Default to False. +> ```none +> error statistics for EFS calculated by ab-initio models and MTP. +> Default to False. +> ``` - > Log (str): Filename to write log of learning on the fly process. +> ```none +> Log (str): Filename to write log of learning on the fly process. +> ``` - > No logging if not specified. Default to None. +> ```none +> No logging if not specified. Default to None. +> ``` - > Write_cfgs (bool): File for writing all processed configurations. +> Write_cfgs (bool): File for writing all processed configurations. - > No configuration recording if not specified. Default to None. +> ```none +> No configuration recording if not specified. Default to None. +> ``` - > Skip_N (int): The number of configurations to skip while writing. +> ```none +> Skip_N (int): The number of configurations to skip while writing. +> ``` - > Default to 0. +> ```none +> Default to 0. +> ``` - > Log (str): Filename to write MLIP log. No logging if not specified. +> Log (str): Filename to write MLIP log. No logging if not specified. - > Default to None. +> ```none +> Default to None. +> ``` - Driver (int): Defines the configuration driver. Default to 1. +Driver (int): Defines the configuration driver. Default to 1. - > 0: No driver or external MD driver. - > 1: Read configurations from database file. +> 0: No driver or external MD driver. +> 1: Read configurations from database file. - > > Database_filename (str): Configuration file name. - > > Max_count (int): Maximal number of configurations to read. - > > Log (str): Filename to write reading log. No logging +> > Database_filename (str): Configuration file name. +> > Max_count (int): Maximal number of configurations to read. +> > Log (str): Filename to write reading log. No logging - > > > if not specified. Default to None. +> > > if not specified. Default to None. - > 2: Embedded algorithm for relaxation. +> 2: Embedded algorithm for relaxation. - > > Pressure (float): External pressure (in GPa). +> > Pressure (float): External pressure (in GPa). - > > If not zero enthalpy is minimized. Default to 0.0. +> > ```none +> > If not zero enthalpy is minimized. Default to 0.0. +> > ``` - > > Iteration_limit (int): Maximal number of iteration of +> > Iteration_limit (int): Maximal number of iteration of - > > the relaxation process. Default to 500. +> > ```none +> > the relaxation process. Default to 500. +> > ``` - > > Min_dist (float): Minimal interatomic distance constraint +> > Min_dist (float): Minimal interatomic distance constraint - > > (in Angstroms). Default to 1.0. +> > ```none +> > (in Angstroms). Default to 1.0. +> > ``` - > > Forces_tolerance (float): Forces on atoms in relaxed +> > Forces_tolerance (float): Forces on atoms in relaxed - > > configuration should be smaller than this value - > > (in eV/Angstroms). Default to 0.0001. +> > ```none +> > configuration should be smaller than this value +> > (in eV/Angstroms). Default to 0.0001. +> > ``` - > > Stress_tolerance (float): Stresses in relaxed configuration +> > Stress_tolerance (float): Stresses in relaxed configuration - > > should be smaller than this value (in GPa). Default to 0.001. +> > ```none +> > should be smaller than this value (in GPa). Default to 0.001. +> > ``` - > > Max_step (float): Maximal allowed displacement of atoms and +> > Max_step (float): Maximal allowed displacement of atoms and - > > lattice vectors in Cartesian coordinates (in Angstroms). - > > Default to 0.5. +> > ```none +> > lattice vectors in Cartesian coordinates (in Angstroms). +> > Default to 0.5. +> > ``` - > > Min_step (float): Minimal displacement of atoms and +> > Min_step (float): Minimal displacement of atoms and - > > lattice vectors in Cartesian coordinates (in Angstroms). - > > Default to 1.0e-8. +> > ```none +> > lattice vectors in Cartesian coordinates (in Angstroms). +> > Default to 1.0e-8. +> > ``` - > > BFGS_Wolfe_C1 (float): Wolfe condition constant on the function +> > BFGS_Wolfe_C1 (float): Wolfe condition constant on the function - > > decrease (linesearch stopping criterea). Default to 1.0e-3. +> > ```none +> > decrease (linesearch stopping criterea). Default to 1.0e-3. +> > ``` - > > BFGS_Wolfe_C2 (float): Wolfe condition constant on the gradient +> > BFGS_Wolfe_C2 (float): Wolfe condition constant on the gradient - > > decrease (linesearch stopping criterea). Default to 0.7. +> > ```none +> > decrease (linesearch stopping criterea). Default to 0.7. +> > ``` - > > Save_relaxed (str): Filename for output results of relaxation. +> > Save_relaxed (str): Filename for output results of relaxation. - > > No configuration will be saved if not specified. - > > Default to None. +> > ```none +> > No configuration will be saved if not specified. +> > Default to None. +> > ``` - > > Log (str): Filename to write relaxation log. No logging +> > Log (str): Filename to write relaxation log. No logging - > > if not specified. Default to None. +> > ```none +> > if not specified. Default to None. +> > ``` +### write_param(fitted_mtp=’fitted.mtp’, \*\*kwargs) - - -#### write_param(fitted_mtp='fitted.mtp', \*\*kwargs) Write fitted mtp parameter file to perform lammps calculation. * **Parameters** +**fitted_mtp** (*str*) – Filename to store xml formatted parameters. - **fitted_mtp** (*str*) – Filename to store xml formatted parameters. - +## *class* maml.apps.pes.NNPotential(name=None, param=None, weight_param=None, scaling_param=None) - -### _class_ maml.apps.pes.NNPotential(name=None, param=None, weight_param=None, scaling_param=None) Bases: `LammpsPotential` This class implements Neural Network Potential. +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### _line_up(structure, energy, forces, virial_stress) -#### _line_up(structure, energy, forces, virial_stress) Convert input structure, energy, forces, virial_stress to proper configuration format for n2p2 usage. Note that n2p2 takes bohr as length unit and Hartree as energy unit. @@ -845,7 +898,6 @@ n2p2 takes bohr as length unit and Hartree as energy unit. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. @@ -853,358 +905,351 @@ n2p2 takes bohr as length unit and Hartree as energy unit. * **forces** (*list*) – The forces should have dimension - (num_atoms, 3). +(num_atoms, 3). * **virial_stress** (*list*) – stress should has 6 distinct - elements arranged in order [xx, yy, zz, xy, yz, xz]. +elements arranged in order [xx, yy, zz, xy, yz, xz]. +### bohr_to_angstrom(_ = 0.52917721090_ ) +### eV_to_Ha(_ = 0.03674932217565_ ) -#### bohr_to_angstrom(_ = 0.52917721090_ ) +### evaluate(test_structures, test_energies, test_forces, test_stresses=None) -#### eV_to_Ha(_ = 0.03674932217565_ ) - -#### evaluate(test_structures, test_energies, test_forces, test_stresses=None) Evaluate energies, forces and stresses of structures with trained interatomic potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. - +of each structure in structures list. +### *static* from_config(input_filename, scaling_filename, weights_filenames) -#### _static_ from_config(input_filename, scaling_filename, weights_filenames) Initialize potentials with parameters file. * **Parameters** - * **input_filename** (*str*) – The file storing the input configuration of - Neural Network Potential. +Neural Network Potential. * **scaling_filename** (*str*) – The file storing scaling info of - Neural Network Potential. +Neural Network Potential. * **weights_filenames** (*list*) – List of files storing weights of each specie in - Neural Network Potential. +Neural Network Potential. +### load_input(filename=’input.nn’) - -#### load_input(filename='input.nn') Load input file from trained Neural Network Potential. * **Parameters** +**filename** (*str*) – The input filename. - **filename** (*str*) – The input filename. - +### load_scaler(scaling_filename) - -#### load_scaler(scaling_filename) Load scaling info of trained Neural Network Potential. * **Parameters** +**scaling_filename** (*str*) – The scaling file. - **scaling_filename** (*str*) – The scaling file. - +### load_weights(weights_filename, specie) - -#### load_weights(weights_filename, specie) Load weights file of trained Neural Network Potential. * **Parameters** - * **weights_filename** (*str*) – The weights file. * **specie** (*str*) – The name of specie. +### pair_coeff(_ = ‘pair_coeff \* \* {}_ ) +### pair_style(_ = ‘pair_style nnp dir “./” showew no showewsum 0 maxew 10000000 resetew yes cflength 1.8897261328 cfenergy 0.0367493254_ ) -#### pair_coeff(_ = 'pair_coeff \* \* {}_ ) - -#### pair_style(_ = 'pair_style nnp dir "./" showew no showewsum 0 maxew 10000000 resetew yes cflength 1.8897261328 cfenergy 0.0367493254_ ) +### read_cfgs(filename=’output.data’) -#### read_cfgs(filename='output.data') Read the configuration file. * **Parameters** +**filename** (*str*) – The configuration file to be read. - **filename** (*str*) – The configuration file to be read. - +### train(train_structures, train_energies, train_forces, train_stresses=None, \*\*kwargs) - -#### train(train_structures, train_energies, train_forces, train_stresses=None, \*\*kwargs) Training data with moment tensor method. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each - single structure case. +with m atoms in structures list. m can be varied with each +single structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. +structure in structures list. * **kwargs** – Parameters in write_input method. +### write_cfgs(filename, cfg_pool) - -#### write_cfgs(filename, cfg_pool) Write the formatted configuration file. * **Parameters** - * **filename** (*str*) – The filename to be written. * **cfg_pool** (*list*) – The configuration pool contains - structure and energy/forces properties. - +structure and energy/forces properties. +### write_input(\*\*kwargs) -#### write_input(\*\*kwargs) Write input.nn file to train the Neural Network Potential. * **Parameters** - * **atom_energy** (*float*) – Atomic reference energy. * **kwargs** – General nnp settings: - atom_energy (dict): Free atom reference energy for each specie. - cutoff_type (int): Type of cutoff function. Default to 1 - - > (i.e., cosine function). +atom_energy (dict): Free atom reference energy for each specie. +cutoff_type (int): Type of cutoff function. Default to 1 - scale_features (int): Determine the method to scale the +> (i.e., cosine function). - symmetry function. - 0: no scaling. - 1: scale_symmetry_functions. - 2: center_symmetry_functions. - 3. scale_symmetry_functions_sigma. +scale_features (int): Determine the method to scale the - scale_min_short (float): Minimum value for scaling. +```none + symmetry function. + 0: no scaling. + 1: scale_symmetry_functions. + 2: center_symmetry_functions. + 3. scale_symmetry_functions_sigma. +``` - Default to 0.0. +scale_min_short (float): Minimum value for scaling. - scale_max_short (float): Maximum value for scaling. +```none + Default to 0.0. +``` - Default to 1. +scale_max_short (float): Maximum value for scaling. - hidden_layers (list): List of the numbers of +```none + Default to 1. +``` - nodes in each hidden layer. +hidden_layers (list): List of the numbers of - activations (str): Activation function for each hidden layer. +```none + nodes in each hidden layer. +``` - ’t’: tanh, ‘s’: logistic, ‘p’: softplus. +activations (str): Activation function for each hidden layer. - normalize_nodes (boolean): Whether to normalize input of nodes. +```none + ’t’: tanh, ‘s’: logistic, ‘p’: softplus. +``` - Additional settings for training: +normalize_nodes (boolean): Whether to normalize input of nodes. - epoch (int): Number of training epochs. - updater_type (int): Weight update method +Additional settings for training: - > 0: gradient Descent, 1: Kalman filter. +```none + epoch (int): Number of training epochs. + updater_type (int): Weight update method - parallel_mode (int): Training parallelization used. + > 0: gradient Descent, 1: Kalman filter. - Default to serial mode. + parallel_mode (int): Training parallelization used. - jacobian_mode (int): Jacobian computation mode. + Default to serial mode. - 0: Summation to single gradient, - 1: Per-task summed gradient, - 2: Full Jacobian. + jacobian_mode (int): Jacobian computation mode. - update_strategy (int): Update strategy. + 0: Summation to single gradient, + 1: Per-task summed gradient, + 2: Full Jacobian. - 0: combined, 1: per-element. + update_strategy (int): Update strategy. - selection_mode (int): Update candidate selection mode. + 0: combined, 1: per-element. - 0: random, 1: sort, 2: threshold + selection_mode (int): Update candidate selection mode. - task_batch_size_energy (int): Number of energy update + 0: random, 1: sort, 2: threshold - candidates prepared per task for each update. + task_batch_size_energy (int): Number of energy update - task_batch_size_force (int): Number of force update + candidates prepared per task for each update. - candidates prepared per task for each update. + task_batch_size_force (int): Number of force update - test_fraction (float): Fraction of structures kept for + candidates prepared per task for each update. - testing. + test_fraction (float): Fraction of structures kept for - force_weight (float): Weight of force updates relative + testing. - to energy updates. Default to 10.0 + force_weight (float): Weight of force updates relative - short_energy_fraction (float): Fraction of energy updates + to energy updates. Default to 10.0 - per epoch. Default to 1.0. + short_energy_fraction (float): Fraction of energy updates - short_force_fraction (float): Fraction of force updates + per epoch. Default to 1.0. - per epoch. Default to 0.02315. + short_force_fraction (float): Fraction of force updates - short_energy_error_threshold (float): RMSE threshold for + per epoch. Default to 0.02315. - energy update candidates. Default to 0.0. + short_energy_error_threshold (float): RMSE threshold for - short_force_error_threshold (float): RMSE threshold for + energy update candidates. Default to 0.0. - force update candidates. Default to 1.0. + short_force_error_threshold (float): RMSE threshold for - rmse_threshold_trials (int): Maximum number of RMSE + force update candidates. Default to 1.0. - threshold trials. Default to 3. + rmse_threshold_trials (int): Maximum number of RMSE - weights_min (float): Minimum value for initial random + threshold trials. Default to 3. - weights. Default to -1. + weights_min (float): Minimum value for initial random - weights_max (float): Maximum value for initial random + weights. Default to -1. - weights. Default to 1. + weights_max (float): Maximum value for initial random - write_trainpoints (int): Write energy comparison every + weights. Default to 1. - this many epochs. Default to 1. + write_trainpoints (int): Write energy comparison every - write_trainforces (int): Write force comparison every + this many epochs. Default to 1. - this many epochs. Default to 1. + write_trainforces (int): Write force comparison every - write_weights_epoch (int): Write weights every this many + this many epochs. Default to 1. - epochs. Default to 1. + write_weights_epoch (int): Write weights every this many - write_neuronstats (int): Write neuron statistics every + epochs. Default to 1. - this many epochs. Default to 1. + write_neuronstats (int): Write neuron statistics every - # Kalman Filter - kalman_type (int): Kalman filter type. Default to 0. - kalman_epsilon (float): General Kalman filter parameter + this many epochs. Default to 1. - > epsilon. Default to 0.01. + # Kalman Filter + kalman_type (int): Kalman filter type. Default to 0. + kalman_epsilon (float): General Kalman filter parameter - kalman_q0 (float): General Kalman filter parameter q0. + > epsilon. Default to 0.01. - Default to 0.01. + kalman_q0 (float): General Kalman filter parameter q0. - kalman_qtau (float): General Kalman filter parameter + Default to 0.01. - qtau. Default to 2.302. + kalman_qtau (float): General Kalman filter parameter - kalman_qmin (float): General Kalman filter parameter qmin. + qtau. Default to 2.302. - Default to 1e-6. + kalman_qmin (float): General Kalman filter parameter qmin. - kalman_eta (float): Standard Kalman filter parameter eta. + Default to 1e-6. - Default to 0.01. + kalman_eta (float): Standard Kalman filter parameter eta. - kalman_etatau (float): Standard Kalman filter parameter + Default to 0.01. - etatau. Defaults to 2.302. + kalman_etatau (float): Standard Kalman filter parameter - kalman_etamax (float): Standard Kalman filter parameter + etatau. Defaults to 2.302. - etamax. Default to 1.0. + kalman_etamax (float): Standard Kalman filter parameter - Symmetry functions: + etamax. Default to 1.0. +``` - r_cut (float): Cutoff distance (unit: Å). - r_etas (numpy.array): η in radial function. - r_shift (numpy.array): Rs in radial function. - a_etas (numpy.array): η in angular function. - zetas (numpy.array): ζ in angular function. - lambdas (numpy.array): λ in angular function. Default to (1, -1). +Symmetry functions: +```none + r_cut (float): Cutoff distance (unit: Å). + r_etas (numpy.array): η in radial function. + r_shift (numpy.array): Rs in radial function. + a_etas (numpy.array): η in angular function. + zetas (numpy.array): ζ in angular function. + lambdas (numpy.array): λ in angular function. Default to (1, -1). +``` +### write_param() - -#### write_param() Write optimized weights file to perform energy and force prediction. +## *class* maml.apps.pes.NudgedElasticBand(ff_settings, specie, lattice, alat, num_replicas=7, \*\*kwargs) -### _class_ maml.apps.pes.NudgedElasticBand(ff_settings, specie, lattice, alat, num_replicas=7, \*\*kwargs) Bases: `LMPStaticCalculator` NudgedElasticBand migration energy calculator. +### _parse() -#### _parse() Parse results from dump files. +### _sanity_check(structure) -#### _sanity_check(structure) Check if the structure is valid for this calculation. +### _setup() -#### _setup() Setup a calculation, writing input files, etc. +### calculate() -#### calculate() Calculate the NEB barrier given Potential class. +### *static* get_unit_cell(specie, lattice, alat) -#### _static_ get_unit_cell(specie, lattice, alat) Get the unit cell from specie, lattice type and lattice constant. * **Parameters** - * **specie** (*str*) – Name of specie. @@ -1213,45 +1258,43 @@ Get the unit cell from specie, lattice type and lattice constant. * **alat** (*float*) – The lattice constant of specific lattice and specie. +## *class* maml.apps.pes.Potential(model, describer: BaseDescriber | None = None, \*\*kwargs) - -### _class_ maml.apps.pes.Potential(model, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, \*\*kwargs) -Bases: `PotentialMixin`, [`BaseModel`](maml.base.md#maml.base._model.BaseModel) +Bases: `PotentialMixin`, `BaseModel` Potential models that can be used to fit structure-[energy, force, stress] pairs. +## *class* maml.apps.pes.SNAPotential(model, name=None) -### _class_ maml.apps.pes.SNAPotential(model, name=None) Bases: `LammpsPotential` This class implements Spectral Neighbor Analysis Potential. +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### evaluate(test_structures, test_energies, test_forces, test_stresses=None, include_stress=False, stress_format=’VASP’) -#### evaluate(test_structures, test_energies, test_forces, test_stresses=None, include_stress=False, stress_format='VASP') Evaluate energies, forces and stresses of structures with trained machinea learning potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. +of each structure in structures list. * **include_stress** (*bool*) – Whether to include stress components. @@ -1259,55 +1302,49 @@ machinea learning potentials. * **stress_format** (*str*) – stress format, default to “VASP” +### *static* from_config(param_file, coeff_file, \*\*kwargs) - -#### _static_ from_config(param_file, coeff_file, \*\*kwargs) Initialize potentials with parameters file and coefficient file. * **Parameters** - * **param_file** (*str*) – The file storing the configuration of potentials. * **coeff_file** (*str*) – The file storing the coefficients of potentials. - * **Returns** +SNAPotential. - SNAPotential. +### pair_coeff(_ = ‘pair_coeff \* \* {coeff_file} {param_file} {elements}_ ) +### pair_style(_ = ‘pair_style snap_ ) +### train(train_structures, train_energies, train_forces, train_stresses=None, include_stress=False, stress_format=’VASP’, \*\*kwargs) -#### pair_coeff(_ = 'pair_coeff \* \* {coeff_file} {param_file} {elements}_ ) - -#### pair_style(_ = 'pair_style snap_ ) - -#### train(train_structures, train_energies, train_forces, train_stresses=None, include_stress=False, stress_format='VASP', \*\*kwargs) Training data with models. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each - structure with m atoms in structures list. m can be varied with - each single structure case. +structure with m atoms in structures list. m can be varied with +each single structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. +structure in structures list. * **include_stress** (*bool*) – Whether to include stress components. @@ -1315,13 +1352,12 @@ Training data with models. * **stress_format** (*string*) – stress format, default to VASP +### write_param() - -#### write_param() Write parameter and coefficient file to perform lammps calculation. +## *class* maml.apps.pes.SpectralNeighborAnalysis(rcutfac, twojmax, element_profile, quadratic=False, \*\*kwargs) -### _class_ maml.apps.pes.SpectralNeighborAnalysis(rcutfac, twojmax, element_profile, quadratic=False, \*\*kwargs) Bases: `LMPStaticCalculator` Calculator for bispectrum components to characterize the local @@ -1329,153 +1365,144 @@ neighborhood of each atom in a general way. Usage: - [(b, db, e)] = sna.calculate([Structure]) - b: 2d NumPy array with shape (N, n_bs) containing bispectrum +```none +[(b, db, e)] = sna.calculate([Structure]) +b: 2d NumPy array with shape (N, n_bs) containing bispectrum - > coefficients, where N is the No. of atoms in structure and - > n_bs is the No. of bispectrum components. +> coefficients, where N is the No. of atoms in structure and +> n_bs is the No. of bispectrum components. - db: 2d NumPy array with shape (N, 3 \* n_bs \* n_elements) +db: 2d NumPy array with shape (N, 3 \* n_bs \* n_elements) - containing the first order derivatives of bispectrum - coefficients with respect to atomic coordinates, - where n_elements is the No. of elements in element_profile. + containing the first order derivatives of bispectrum + coefficients with respect to atomic coordinates, + where n_elements is the No. of elements in element_profile. - e: 2d NumPy array with shape (N, 1) containing the element of +e: 2d NumPy array with shape (N, 1) containing the element of - each atom. + each atom. +``` +### *CMDS(* = [‘pair_style lj/cut 10’, ‘pair_coeff \* \* 1 1’, ‘compute sna all sna/atom ‘, ‘compute snad all snad/atom ‘, ‘compute snav all snav/atom ‘, ‘dump 1 all custom 1 dump.element element’, ‘dump_modify 1 sort id’, ‘dump 2 all custom 1 dump.sna c_sna[\*]’, ‘dump_modify 2 sort id’, ‘dump 3 all custom 1 dump.snad c_snad[\*]’, ‘dump_modify 3 sort id’, ‘dump 4 all custom 1 dump.snav c_snav[\*]’, ‘dump_modify 4 sort id’_ ) -#### _CMDS(_ = ['pair_style lj/cut 10', 'pair_coeff \* \* 1 1', 'compute sna all sna/atom ', 'compute snad all snad/atom ', 'compute snav all snav/atom ', 'dump 1 all custom 1 dump.element element', 'dump_modify 1 sort id', 'dump 2 all custom 1 dump.sna c_sna[\*]', 'dump_modify 2 sort id', 'dump 3 all custom 1 dump.snad c_snad[\*]', 'dump_modify 3 sort id', 'dump 4 all custom 1 dump.snav c_snav[\*]', 'dump_modify 4 sort id'_ ) +### _parse() -#### _parse() Parse results from dump files. +### _sanity_check(structure) -#### _sanity_check(structure) Check if the structure is valid for this calculation. +### _setup() -#### _setup() Setup a calculation, writing input files, etc. +### *static* get_bs_subscripts(twojmax) -#### _static_ get_bs_subscripts(twojmax) Method to list the subscripts 2j1, 2j2, 2j of bispectrum components. * **Parameters** - - **twojmax** (*int*) – Band limit for bispectrum components. - +**twojmax** (*int*) – Band limit for bispectrum components. * **Returns** +List of all subscripts [2j1, 2j2, 2j]. - List of all subscripts [2j1, 2j2, 2j]. +### *property* n_bs() - - -#### _property_ n_bs() Returns No. of bispectrum components to be calculated. +## maml.apps.pes.get_default_lmp_exe() -### maml.apps.pes.get_default_lmp_exe() Get lammps executable Returns: Lammps executable name. - ## maml.apps.pes._base module Base classes for potentials. +### *class* maml.apps.pes._base.Potential(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.apps.pes._base.Potential(model, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, \*\*kwargs) -Bases: `PotentialMixin`, [`BaseModel`](maml.base.md#maml.base._model.BaseModel) +Bases: `PotentialMixin`, `BaseModel` Potential models that can be used to fit structure-[energy, force, stress] pairs. +### *class* maml.apps.pes._base.PotentialMixin() -### _class_ maml.apps.pes._base.PotentialMixin() Bases: `object` Abstract base class for a Interatomic Potential. +#### *abstract* evaluate(test_structures, test_energies, test_forces, test_stresses) -#### _abstract_ evaluate(test_structures, test_energies, test_forces, test_stresses) Evaluate energies, forces and stresses of structures with trained interatomic potentials. * **Parameters** - * **test_structures** (*list*) – List of Pymatgen Structure Objects. * **test_energies** (*list*) – List of DFT-calculated total energies of each - structure in structures list. +structure in structures list. * **test_forces** (*list*) – List of DFT-calculated (m, 3) forces of each - structure with m atoms in structures list. m can be varied with - each single structure case. +structure with m atoms in structures list. m can be varied with +each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses of - each structure in structures list. - +each structure in structures list. +#### *abstract* from_config(\*\*kwargs) -#### _abstract_ from_config(\*\*kwargs) Initialize potentials with parameters file. +#### *abstract* predict_efs(structure) -#### _abstract_ predict_efs(structure) Predict energy, forces and stresses of the structure. * **Parameters** - - **structure** (*Structure*) – Pymatgen Structure object. - +**structure** (*Structure*) – Pymatgen Structure object. * **Returns** +energy, forces, stress - energy, forces, stress - +#### *abstract* train(train_structures, train_energies, train_forces, train_stresses, \*\*kwargs) - -#### _abstract_ train(train_structures, train_energies, train_forces, train_stresses, \*\*kwargs) Train interatomic potentials with energies, forces ann stresses corresponding - to structures. +```none +to structures. +``` * **Parameters** - * **train_structures** (*list*) – List of Pymatgen Structure objects. * **train_energies** (*list*) – List of DFT-calculated total energies of each - structure in structures list. +structure in structures list. * **train_forces** (*list*) – List of DFT-calculated (m, 3) forces of each - structure with m atoms in structures list. m can be varied with - each single structure case. +structure with m atoms in structures list. m can be varied with +each single structure case. * **train_stresses** (*list*) – List of DFT-calculated (6, ) virial stresses of - each structure in structures list. +each structure in structures list. +#### *abstract* write_param() - -#### _abstract_ write_param() Write optimized weights file to perform energy and force prediction via lammps calculation. @@ -1483,23 +1510,22 @@ lammps calculation. This module provides SOAP-GAP interatomic potential class. +### *class* maml.apps.pes._gap.GAPotential(name=None, param=None) -### _class_ maml.apps.pes._gap.GAPotential(name=None, param=None) Bases: `LammpsPotential` This class implements Smooth Overlap of Atomic Position potentials. +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *static* _line_up(structure, energy, forces, virial_stress) -#### _static_ _line_up(structure, energy, forces, virial_stress) Convert input structure, energy, forces, virial_stress to proper configuration format for MLIP usage. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. @@ -1507,38 +1533,36 @@ proper configuration format for MLIP usage. * **forces** (*list*) – The forces should have dimension - (num_atoms, 3). +(num_atoms, 3). * **virial_stress** (*list*) – stress should has 6 distinct - elements arranged in order [xx, yy, zz, xy, yz, xz]. - +elements arranged in order [xx, yy, zz, xy, yz, xz]. Returns: - #### evaluate(test_structures, test_energies, test_forces, test_stresses=None, predict_energies=True, predict_forces=True, predict_stress=False) + Evaluate energies, forces and stresses of structures with trained interatomic potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. +of each structure in structures list. * **predict_energies** (*bool*) – Whether to predict energies of configurations. @@ -1548,217 +1572,224 @@ interatomic potentials. * **predict_stress** (*bool*) – Whether to predict virial stress of - configurations. - +configurations. +#### *static* from_config(filename) -#### _static_ from_config(filename) Initialize potentials with parameters file. * **Parameters** - - **filename** (*str*) – The file storing parameters of potentials, - filename should ends with “.xml”. - +**filename** (*str*) – The file storing parameters of potentials, +filename should ends with “.xml”. * **Returns** +GAPotential. - GAPotential. - +#### pair_coeff(_ = ‘pair_coeff \* \* {} {} {}_ ) +#### pair_style(_ = ‘pair_style quip_ ) -#### pair_coeff(_ = 'pair_coeff \* \* {} {} {}_ ) +#### *static* read_cfgs(filename, predict=False) -#### pair_style(_ = 'pair_style quip_ ) - -#### _static_ read_cfgs(filename, predict=False) Read the configuration file. * **Parameters** +**filename** (*str*) – The configuration file to be read. - **filename** (*str*) – The configuration file to be read. - - +#### save(filename=’param.yaml’) -#### save(filename='param.yaml') Save parameters of the potentials. * **Parameters** - - **filename** (*str*) – The file to store parameters of potentials. - +**filename** (*str*) – The file to store parameters of potentials. * **Returns** - - (str) - - +(str) #### train(train_structures, train_energies, train_forces, train_stresses=None, default_sigma=(0.0005, 0.1, 0.05, 0.01), use_energies=True, use_forces=True, use_stress=False, \*\*kwargs) + Training data with gaussian process regression. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each - single structure case. +with m atoms in structures list. m can be varied with each +single structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. +structure in structures list. * **default_sigma** (*list*) – Error criteria in energies, forces, stress - and hessian. Should have 4 numbers. +and hessian. Should have 4 numbers. * **use_energies** (*bool*) – Whether to use dft total energies for training. - Default to True. +Default to True. * **use_forces** (*bool*) – Whether to use dft atomic forces for training. - Default to True. +Default to True. * **use_stress** (*bool*) – Whether to use dft virial stress for training. - Default to False. +Default to False. * **kwargs** – l_max (int): Parameter to configure GAP. The band limit of - spherical harmonics basis function. Default to 12. +spherical harmonics basis function. Default to 12. - n_max (int): Parameter to configure GAP. The number of radial basis +n_max (int): Parameter to configure GAP. The number of radial basis - function. Default to 10. +```none + function. Default to 10. +``` - atom_sigma (float): Parameter to configure GAP. The width of gaussian +atom_sigma (float): Parameter to configure GAP. The width of gaussian - atomic density. Default to 0.5. +```none + atomic density. Default to 0.5. +``` - zeta (float): Present when covariance function type is do product. +zeta (float): Present when covariance function type is do product. - Default to 4. +```none + Default to 4. +``` - cutoff (float): Parameter to configure GAP. The cutoff radius. +cutoff (float): Parameter to configure GAP. The cutoff radius. - Default to 4.0. +```none + Default to 4.0. +``` - cutoff_transition_width (float): Parameter to configure GAP. +cutoff_transition_width (float): Parameter to configure GAP. - The transition width of cutoff radial. Default to 0.5. +```none + The transition width of cutoff radial. Default to 0.5. +``` - delta (float): Parameter to configure Sparsification. +delta (float): Parameter to configure Sparsification. - The signal variance of noise. Default to 1. +```none + The signal variance of noise. Default to 1. +``` - f0 (float): Parameter to configure Sparsification. +f0 (float): Parameter to configure Sparsification. - The signal mean of noise. Default to 0.0. +```none + The signal mean of noise. Default to 0.0. +``` - n_sparse (int): Parameter to configure Sparsification. +n_sparse (int): Parameter to configure Sparsification. - Number of sparse points. +```none + Number of sparse points. +``` - covariance_type (str): Parameter to configure Sparsification. +covariance_type (str): Parameter to configure Sparsification. - The type of convariance function. Default to dot_product. +```none + The type of convariance function. Default to dot_product. +``` - sparse_method (str): Method to perform clustering in sparsification. +sparse_method (str): Method to perform clustering in sparsification. - Default to ‘cur_points’. +```none + Default to ‘cur_points’. +``` - sparse_jitter (float): Intrisic error of atomic/bond energy, +sparse_jitter (float): Intrisic error of atomic/bond energy, - used to regularise the sparse covariance matrix. - Default to 1e-8. +```none + used to regularise the sparse covariance matrix. + Default to 1e-8. +``` - e0 (float): Atomic energy value to be subtracted from energies - - before fitting. Default to 0.0. - - e0_offset (float): Offset of baseline. If zero, the offset is - - the average atomic energy of the input data or the e0 - specified manually. Default to 0.0. +e0 (float): Atomic energy value to be subtracted from energies +```none + before fitting. Default to 0.0. +``` +e0_offset (float): Offset of baseline. If zero, the offset is +```none + the average atomic energy of the input data or the e0 + specified manually. Default to 0.0. +``` #### write_cfgs(filename, cfg_pool) + Write the formatted configuration file. * **Parameters** - * **filename** (*str*) – The filename to be written. * **cfg_pool** (*list*) – The configuration pool contains - structure and energy/forces properties. +structure and energy/forces properties. +#### write_param(xml_filename=’gap.2020.01.xml’) - -#### write_param(xml_filename='gap.2020.01.xml') Write xml file to perform lammps calculation. * **Parameters** - - **xml_filename** (*str*) – Filename to store xml formatted parameters. - +**xml_filename** (*str*) – Filename to store xml formatted parameters. ## maml.apps.pes._lammps module This module provides basic LAMMPS calculator classes. +### *class* maml.apps.pes._lammps.DefectFormation(ff_settings, specie, lattice, alat, \*\*kwargs) -### _class_ maml.apps.pes._lammps.DefectFormation(ff_settings, specie, lattice, alat, \*\*kwargs) Bases: `LMPStaticCalculator` Defect formation energy calculator. - #### _parse() -Parse results from dump files. +Parse results from dump files. #### _sanity_check(structure) -Check if the structure is valid for this calculation. +Check if the structure is valid for this calculation. #### _setup() -Setup a calculation, writing input files, etc. +Setup a calculation, writing input files, etc. #### calculate() + Calculate the vacancy formation given Potential class. +#### *static* get_unit_cell(specie, lattice, alat) -#### _static_ get_unit_cell(specie, lattice, alat) Get the unit cell from specie, lattice type and lattice constant. * **Parameters** - * **specie** (*str*) – Name of specie. @@ -1767,208 +1798,190 @@ Get the unit cell from specie, lattice type and lattice constant. * **alat** (*float*) – The lattice constant of specific lattice and specie. +### *class* maml.apps.pes._lammps.ElasticConstant(ff_settings, potential_type=’external’, deformation_size=1e-06, jiggle=1e-05, maxiter=400, maxeval=1000, full_matrix=False, \*\*kwargs) - -### _class_ maml.apps.pes._lammps.ElasticConstant(ff_settings, potential_type='external', deformation_size=1e-06, jiggle=1e-05, maxiter=400, maxeval=1000, full_matrix=False, \*\*kwargs) Bases: `LMPStaticCalculator` Elastic constant calculator. - -#### _RESTART_CONFIG(_ = {'external': {'read_command': 'read_restart', 'restart_file': 'restart.equil', 'write_command': 'write_restart'}, 'internal': {'read_command': 'read_restart', 'restart_file': 'restart.equil', 'write_command': 'write_restart'}_ ) +#### *RESTART_CONFIG(* = {‘external’: {‘read_command’: ‘read_restart’, ‘restart_file’: ‘restart.equil’, ‘write_command’: ‘write_restart’}, ‘internal’: {‘read_command’: ‘read_restart’, ‘restart_file’: ‘restart.equil’, ‘write_command’: ‘write_restart’}_ ) #### _parse() -Parse results from dump files. +Parse results from dump files. #### _sanity_check(structure) -Check if the structure is valid for this calculation. +Check if the structure is valid for this calculation. #### _setup() + Setup a calculation, writing input files, etc. +### *class* maml.apps.pes._lammps.EnergyForceStress(ff_settings, \*\*kwargs) -### _class_ maml.apps.pes._lammps.EnergyForceStress(ff_settings, \*\*kwargs) Bases: `LMPStaticCalculator` Calculate energy, forces and virial stress of structures. - #### _parse() -Parse results from dump files. +Parse results from dump files. -#### _static_ _rotate_force_stress(structure, forces, stresses) +#### *static* _rotate_force_stress(structure, forces, stresses) #### _sanity_check(structure) -Check if the structure is valid for this calculation. +Check if the structure is valid for this calculation. #### _setup() -Setup a calculation, writing input files, etc. +Setup a calculation, writing input files, etc. #### calculate(structures) + Calculate the energy, forces and stresses of structures. Proper rotation of the results are applied when the structure is triclinic. * **Parameters** - - **structures** (*list*) – a list of structures - +**structures** (*list*) – a list of structures Returns: list of (energy, forces, stresses) tuple +### *class* maml.apps.pes._lammps.LMPRelaxationCalculator(ff_settings, box_relax=True, box_relax_keywords=’aniso 0.0 vmax 0.001’, box_triclinic=False, min_style=’cg’, etol=1e-15, ftol=1e-15, maxiter=5000, maxeval=5000, \*\*kwargs) -### _class_ maml.apps.pes._lammps.LMPRelaxationCalculator(ff_settings, box_relax=True, box_relax_keywords='aniso 0.0 vmax 0.001', box_triclinic=False, min_style='cg', etol=1e-15, ftol=1e-15, maxiter=5000, maxeval=5000, \*\*kwargs) Bases: `LMPStaticCalculator` Structural Relaxation Calculator. - #### _parse() -Parse results from dump files. +Parse results from dump files. #### _sanity_check(structure) -Check if the structure is valid for this calculation. +Check if the structure is valid for this calculation. #### _setup() + Setup a calculation, writing input files, etc. +### *class* maml.apps.pes._lammps.LMPStaticCalculator(\*\*kwargs) -### _class_ maml.apps.pes._lammps.LMPStaticCalculator(\*\*kwargs) Bases: `object` Abstract class to perform static structure property calculation using LAMMPS. +#### *COMMON_CMDS(* = [‘units metal’, ‘atom_style charge’, ‘box tilt large’, ‘read_data data.static’, ‘run 0’_ ) -#### _COMMON_CMDS(_ = ['units metal', 'atom_style charge', 'box tilt large', 'read_data data.static', 'run 0'_ ) +#### *abstract* _parse() -#### _abstract_ _parse() Parse results from dump files. +#### *abstract* _sanity_check(structure) -#### _abstract_ _sanity_check(structure) Check if the structure is valid for this calculation. +#### *abstract* _setup() -#### _abstract_ _setup() Setup a calculation, writing input files, etc. - -#### allowed_kwargs(_ = ['lmp_exe'_ ) +#### allowed_kwargs(_ = [‘lmp_exe’_ ) #### calculate(structures) + Perform the calculation on a series of structures. * **Parameters** - - **structures** – Input structures in a list. - +**structures** – Input structures in a list. * **Returns** - - List of computed data corresponding to each structure, - varies with different subclasses. - - +List of computed data corresponding to each structure, +varies with different subclasses. #### set_lmp_exe(lmp_exe: str) + Set lammps executable for the instance. * **Parameters** - - **lmp_exe** (*str*) – lammps executable path - +**lmp_exe** (*str*) – lammps executable path Returns: +### *class* maml.apps.pes._lammps.LammpsPotential(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.apps.pes._lammps.LammpsPotential(model, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, \*\*kwargs) Bases: `Potential`, `ABC` Lammps compatible potentials that call lammps executable for energy/force/stress calculations. - -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *abc_impl(* = <_abc.*abc_data object* ) #### predict_efs(structure) + Predict energy, forces and stresses of the structure. * **Parameters** - - **structure** (*Structure*) – Pymatgen Structure object. - +**structure** (*Structure*) – Pymatgen Structure object. * **Returns** +energy, forces, stress - energy, forces, stress - +### *class* maml.apps.pes._lammps.LatticeConstant(ff_settings, box_relax=True, box_relax_keywords=’aniso 0.0 vmax 0.001’, box_triclinic=False, min_style=’cg’, etol=1e-15, ftol=1e-15, maxiter=5000, maxeval=5000, \*\*kwargs) - -### _class_ maml.apps.pes._lammps.LatticeConstant(ff_settings, box_relax=True, box_relax_keywords='aniso 0.0 vmax 0.001', box_triclinic=False, min_style='cg', etol=1e-15, ftol=1e-15, maxiter=5000, maxeval=5000, \*\*kwargs) Bases: `LMPRelaxationCalculator` Lattice Constant Relaxation Calculator. - #### calculate(structures) + Calculate the relaxed lattice parameters of a list of structures. * **Parameters** - - **structures** (*[**Structure**]*) – Input structures in a list. - +**structures** (*[**Structure**]*) – Input structures in a list. * **Returns** +List of relaxed lattice constants (a, b, c in Å) of the input structures. - List of relaxed lattice constants (a, b, c in Å) of the input structures. +### *class* maml.apps.pes._lammps.NudgedElasticBand(ff_settings, specie, lattice, alat, num_replicas=7, \*\*kwargs) - - -### _class_ maml.apps.pes._lammps.NudgedElasticBand(ff_settings, specie, lattice, alat, num_replicas=7, \*\*kwargs) Bases: `LMPStaticCalculator` NudgedElasticBand migration energy calculator. - #### _parse() -Parse results from dump files. +Parse results from dump files. #### _sanity_check(structure) -Check if the structure is valid for this calculation. +Check if the structure is valid for this calculation. #### _setup() -Setup a calculation, writing input files, etc. +Setup a calculation, writing input files, etc. #### calculate() + Calculate the NEB barrier given Potential class. +#### *static* get_unit_cell(specie, lattice, alat) -#### _static_ get_unit_cell(specie, lattice, alat) Get the unit cell from specie, lattice type and lattice constant. * **Parameters** - * **specie** (*str*) – Name of specie. @@ -1977,9 +1990,8 @@ Get the unit cell from specie, lattice type and lattice constant. * **alat** (*float*) – The lattice constant of specific lattice and specie. +### *class* maml.apps.pes._lammps.SpectralNeighborAnalysis(rcutfac, twojmax, element_profile, quadratic=False, \*\*kwargs) - -### _class_ maml.apps.pes._lammps.SpectralNeighborAnalysis(rcutfac, twojmax, element_profile, quadratic=False, \*\*kwargs) Bases: `LMPStaticCalculator` Calculator for bispectrum components to characterize the local @@ -1987,59 +1999,57 @@ neighborhood of each atom in a general way. Usage: - [(b, db, e)] = sna.calculate([Structure]) - b: 2d NumPy array with shape (N, n_bs) containing bispectrum - - > coefficients, where N is the No. of atoms in structure and - > n_bs is the No. of bispectrum components. +```none +[(b, db, e)] = sna.calculate([Structure]) +b: 2d NumPy array with shape (N, n_bs) containing bispectrum - db: 2d NumPy array with shape (N, 3 \* n_bs \* n_elements) +> coefficients, where N is the No. of atoms in structure and +> n_bs is the No. of bispectrum components. - containing the first order derivatives of bispectrum - coefficients with respect to atomic coordinates, - where n_elements is the No. of elements in element_profile. +db: 2d NumPy array with shape (N, 3 \* n_bs \* n_elements) - e: 2d NumPy array with shape (N, 1) containing the element of + containing the first order derivatives of bispectrum + coefficients with respect to atomic coordinates, + where n_elements is the No. of elements in element_profile. - each atom. +e: 2d NumPy array with shape (N, 1) containing the element of + each atom. +``` -#### _CMDS(_ = ['pair_style lj/cut 10', 'pair_coeff \* \* 1 1', 'compute sna all sna/atom ', 'compute snad all snad/atom ', 'compute snav all snav/atom ', 'dump 1 all custom 1 dump.element element', 'dump_modify 1 sort id', 'dump 2 all custom 1 dump.sna c_sna[\*]', 'dump_modify 2 sort id', 'dump 3 all custom 1 dump.snad c_snad[\*]', 'dump_modify 3 sort id', 'dump 4 all custom 1 dump.snav c_snav[\*]', 'dump_modify 4 sort id'_ ) +#### *CMDS(* = [‘pair_style lj/cut 10’, ‘pair_coeff \* \* 1 1’, ‘compute sna all sna/atom ‘, ‘compute snad all snad/atom ‘, ‘compute snav all snav/atom ‘, ‘dump 1 all custom 1 dump.element element’, ‘dump_modify 1 sort id’, ‘dump 2 all custom 1 dump.sna c_sna[\*]’, ‘dump_modify 2 sort id’, ‘dump 3 all custom 1 dump.snad c_snad[\*]’, ‘dump_modify 3 sort id’, ‘dump 4 all custom 1 dump.snav c_snav[\*]’, ‘dump_modify 4 sort id’_ ) #### _parse() -Parse results from dump files. +Parse results from dump files. #### _sanity_check(structure) -Check if the structure is valid for this calculation. +Check if the structure is valid for this calculation. #### _setup() + Setup a calculation, writing input files, etc. +#### *static* get_bs_subscripts(twojmax) -#### _static_ get_bs_subscripts(twojmax) Method to list the subscripts 2j1, 2j2, 2j of bispectrum components. * **Parameters** - - **twojmax** (*int*) – Band limit for bispectrum components. - +**twojmax** (*int*) – Band limit for bispectrum components. * **Returns** +List of all subscripts [2j1, 2j2, 2j]. - List of all subscripts [2j1, 2j2, 2j]. +#### *property* n_bs() - - -#### _property_ n_bs() Returns No. of bispectrum components to be calculated. +### *class* maml.apps.pes._lammps.SurfaceEnergy(ff_settings, bulk_structure, miller_indexes, min_slab_size=15, min_vacuum_size=15, lll_reduce=False, center_slab=False, in_unit_planes=False, primitive=True, max_normal_search=None, reorient_lattice=True, box_relax=False, \*\*kwargs) -### _class_ maml.apps.pes._lammps.SurfaceEnergy(ff_settings, bulk_structure, miller_indexes, min_slab_size=15, min_vacuum_size=15, lll_reduce=False, center_slab=False, in_unit_planes=False, primitive=True, max_normal_search=None, reorient_lattice=True, box_relax=False, \*\*kwargs) Bases: `LMPRelaxationCalculator` Surface energy Calculator. @@ -2048,23 +2058,21 @@ This calculator generate and calculate surface energies of slab structures based bulk_structure and miller_indexes with the SlabGenerator in pymatgen: [https://pymatgen.org/pymatgen.core.surface.html](https://pymatgen.org/pymatgen.core.surface.html) - #### calculate() + Calculate surface energies with the formula: E(Surface) = (E(Slab) - E(bulk)) / Area(surface). (J/m^2). * **Returns** - - List of miller_indexes with their respective relaxed slab structures and surface energies in J/m^2. - - +List of miller_indexes with their respective relaxed slab structures and surface energies in J/m^2. ### maml.apps.pes._lammps._pretty_input(lines) -### maml.apps.pes._lammps._read_dump(file_name, dtype='float_') +### maml.apps.pes._lammps.*read_dump(file_name, dtype=’float*’) ### maml.apps.pes._lammps.get_default_lmp_exe() + Get lammps executable Returns: Lammps executable name. @@ -2072,25 +2080,24 @@ Returns: Lammps executable name. This module provides MTP interatomic potential class. +### *class* maml.apps.pes._mtp.MTPotential(name=None, param=None, version=None) -### _class_ maml.apps.pes._mtp.MTPotential(name=None, param=None, version=None) Bases: `LammpsPotential` This class implements moment tensor potentials. Installation of the mlip package is needed. Please refer to [https://mlip.skoltech.ru](https://mlip.skoltech.ru). - -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *abc_impl(* = <_abc.*abc_data object* ) #### _line_up(structure, energy, forces, virial_stress) + Convert input structure, energy, forces, virial_stress to proper configuration format for mlip usage. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. @@ -2101,98 +2108,88 @@ proper configuration format for mlip usage. * **virial_stress** (*list*) – stress should has 6 distinct - elements arranged in order [xx, yy, zz, yz, xz, xy]. - - +elements arranged in order [xx, yy, zz, yz, xz, xy]. #### evaluate(test_structures, test_energies, test_forces, test_stresses=None, \*\*kwargs) + Evaluate energies, forces and stresses of structures with trained interatomic potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. +of each structure in structures list. * **kwargs** – Parameters of write_param method. +#### *static* from_config(filename, elements) - -#### _static_ from_config(filename, elements) Initialize potentials with parameters file. * **Parameters** - * **filename** (*str*) – The file storing parameters of potentials, filename should - ends with “.mtp”. +ends with “.mtp”. * **elements** (*list*) – The list of elements. - * **Returns** +MTPotential - MTPotential - - +#### pair_coeff(_ = ‘pair_coeff \* \*_ ) -#### pair_coeff(_ = 'pair_coeff \* \*_ ) - -#### pair_style(_ = 'pair_style mlip {}_ ) +#### pair_style(_ = ‘pair_style mlip {}_ ) #### read_cfgs(filename) -* **Parameters** - - **filename** (*str*) – The configuration file to be read. +* **Parameters** +**filename** (*str*) – The configuration file to be read. +#### train(train_structures, train_energies, train_forces, train_stresses, unfitted_mtp=’08g.mtp’, max_dist=5, radial_basis_size=8, max_iter=1000, energy_weight=1, force_weight=0.01, stress_weight=0.001, init_params=’same’, scale_by_force=0, bfgs_conv_tol=0.001, weighting=’vibration’) -#### train(train_structures, train_energies, train_forces, train_stresses, unfitted_mtp='08g.mtp', max_dist=5, radial_basis_size=8, max_iter=1000, energy_weight=1, force_weight=0.01, stress_weight=0.001, init_params='same', scale_by_force=0, bfgs_conv_tol=0.001, weighting='vibration') Training data with moment tensor method. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each single - structure case. +with m atoms in structures list. m can be varied with each single +structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each structure - in structures list. +in structures list. * **unfitted_mtp** (*str*) – Define the initial mtp file. Default to the mtp file - stored in .params directory. +stored in .params directory. * **max_dist** (*float*) – The actual radial cutoff. @@ -2214,23 +2211,22 @@ Training data with moment tensor method. * **init_params** (*str*) – How to initialize parameters if a potential was not - pre-fitted. Choose from “same” and “random”. +pre-fitted. Choose from “same” and “random”. * **scale_by_force** (*float*) – Default=0. If >0 then configurations near equilibrium - (with roughly force < scale_by_force) get more weight. +(with roughly force < scale_by_force) get more weight. * **bfgs_conv_tol** (*float*) – Stop training if error dropped by a factor smaller than this - over 50 BFGS iterations. +over 50 BFGS iterations. * **weighting** (*str*) – How to weight configuration with different sizes relative to each other. - Choose from “vibrations”, “molecules” and “structures”. - - +Choose from “vibrations”, “molecules” and “structures”. #### write_cfg(filename, cfg_pool) + Write configurations to file :param filename: filename :type filename: str @@ -2239,8 +2235,8 @@ Write configurations to file Returns: +#### write_ini(mtp_filename=’fitted.mtp’, select=False, \*\*kwargs) -#### write_ini(mtp_filename='fitted.mtp', select=False, \*\*kwargs) Write mlip.ini file for mlip packages of version mlip-2 or mlip-dev. Supported keyword arguments are parallel with options stated in the mlip manuals. mlip-2 is recommended, as it is the only officially supported version by mlip. @@ -2249,246 +2245,319 @@ Please refer to [https://mlip.skoltech.ru](https://mlip.skoltech.ru). * **Parameters** - * **mlip-2** – mtp_filename (str): Name of file with MTP to be loaded. - write_cfgs (str): Name of file for mlp processed configurations to be written to. - write_cfgs_skip (int): Skipped number of processed configurations before writing. - select (bool): activates or deactivates calculation of extrapolation grades and - - > optionally writing configurations with high extrapolation grades. False is - > recommended for large-scale MD run. +write_cfgs (str): Name of file for mlp processed configurations to be written to. +write_cfgs_skip (int): Skipped number of processed configurations before writing. +select (bool): activates or deactivates calculation of extrapolation grades and - select_save_selected (str): Name of file for saving configurations with grade +> optionally writing configurations with high extrapolation grades. False is +> recommended for large-scale MD run. - exceeding select_threshold. +select_save_selected (str): Name of file for saving configurations with grade - select_threshold (float): Configurations with extrapolation grade exceeding the +```none + exceeding select_threshold. +``` - value will be saved to the specified file. +select_threshold (float): Configurations with extrapolation grade exceeding the - select_threshold_break (float): The mlip execution will be interrupted if the +```none + value will be saved to the specified file. +``` - extrapolation grade exceeds this value. +select_threshold_break (float): The mlip execution will be interrupted if the - select_load_state (str): Name of file for loading the active learning state, +```none + extrapolation grade exceeds this value. +``` - typically created by the mlp calc-grade command. +select_load_state (str): Name of file for loading the active learning state, - select_log (str): Name of file (or standard output stream stdout/stderr) for +```none + typically created by the mlp calc-grade command. +``` - writing a log of the configuration selection process. +select_log (str): Name of file (or standard output stream stdout/stderr) for +```none + writing a log of the configuration selection process. +``` * **mlip-dev** – Abinitio (int): Defines Ab-initio models. Default to 1. - > 0: If Ab-initio models is not required. - > 1: Used if driver provides EFS data with configurations. - > 2: Use embedded Lennard-Jones pair potentials. +> 0: If Ab-initio models is not required. +> 1: Used if driver provides EFS data with configurations. +> 2: Use embedded Lennard-Jones pair potentials. - > > r_min (float): Distance to minimum of pair function (in Angstroms). +> > r_min (float): Distance to minimum of pair function (in Angstroms). - > > Default to 2.0. +> > ```none +> > Default to 2.0. +> > ``` - > > scale (float): Value of pair function in minimum (in eV). +> > scale (float): Value of pair function in minimum (in eV). - > > Default to 1.0. +> > ```none +> > Default to 1.0. +> > ``` - > > cutoff (float): Cutoff radius (in Angstroms). Default to 5.0. +> > cutoff (float): Cutoff radius (in Angstroms). Default to 5.0. - > 3: Use DFT models by VASP. Linking via files exchange. +> 3: Use DFT models by VASP. Linking via files exchange. - > > POSCAR (str): Relative path of POSCAR file. - > > OUTCAR (str): Relative path of OUTCAR file. - > > Start_command (str): Relative path of command file. +> > POSCAR (str): Relative path of POSCAR file. +> > OUTCAR (str): Relative path of OUTCAR file. +> > Start_command (str): Relative path of command file. - > 4: Use potentials calculating by LAMMPS. Linking via files exchange. +> 4: Use potentials calculating by LAMMPS. Linking via files exchange. - > > Input_file (str): File with configuration to be read by lammps. - > > Output_file (str): File with configuration and EFS data to be read by MLIP. - > > Start_command (str): Relative path of command file. +> > Input_file (str): File with configuration to be read by lammps. +> > Output_file (str): File with configuration and EFS data to be read by MLIP. +> > Start_command (str): Relative path of command file. - > 5: Use MTP as Ab-initio potentials. +> 5: Use MTP as Ab-initio potentials. - > > MTP_filename (str): MTP file name. +> > MTP_filename (str): MTP file name. - MLIP (str): MTP. +MLIP (str): MTP. - > load_from (str): Potential filename. - > Cacluate_EFS (bool): Whether to perform EFS calculation by MTP. - > Fit (bool): Whether to perform MTP learning. +> load_from (str): Potential filename. +> Cacluate_EFS (bool): Whether to perform EFS calculation by MTP. +> Fit (bool): Whether to perform MTP learning. - > > Save (str): Output MTP file name (for trained MTP). - > > Energy_equation_weight (float): Weight for energy equation in +> > Save (str): Output MTP file name (for trained MTP). +> > Energy_equation_weight (float): Weight for energy equation in - > > > fitting procedure. Default to 1.0. +> > > fitting procedure. Default to 1.0. - > > Forces_equation_weight (float): Weight for forces equations in +> > Forces_equation_weight (float): Weight for forces equations in - > > fitting procedure. Default to 0.001. +> > ```none +> > fitting procedure. Default to 0.001. +> > ``` - > > Stress_equation_weight (float): Weight for stresses equations in +> > Stress_equation_weight (float): Weight for stresses equations in - > > fitting procedure. Default to 0.1. +> > ```none +> > fitting procedure. Default to 0.1. +> > ``` - > > Relative_forces_weight (float): If greater than zero, large forces +> > Relative_forces_weight (float): If greater than zero, large forces - > > will be fitted less accurate than small. Default to 0.0. +> > ```none +> > will be fitted less accurate than small. Default to 0.0. +> > ``` - > > Fit_log (str): File to write fitting log. No logging if not specified. +> > Fit_log (str): File to write fitting log. No logging if not specified. - > > Default to None. +> > ```none +> > Default to None. +> > ``` - > Select (bool): Whether to activate active learning. Default to False. +> Select (bool): Whether to activate active learning. Default to False. - > > Site_E_weight (float): Weight for site energy equations in +> > Site_E_weight (float): Weight for site energy equations in - > > selection procedure. Default to 1.0. +> > ```none +> > selection procedure. Default to 1.0. +> > ``` - > > Energy_weight (float): Weight for energy equation in +> > Energy_weight (float): Weight for energy equation in - > > selection procedure. Default to 0.0. +> > ```none +> > selection procedure. Default to 0.0. +> > ``` - > > Forces_weight (float): Weight for forces equations in +> > Forces_weight (float): Weight for forces equations in - > > selection procedure. Default to 0.0. +> > ```none +> > selection procedure. Default to 0.0. +> > ``` - > > Stress_weight (float): Weight for stresses equations in +> > Stress_weight (float): Weight for stresses equations in - > > selection procedure. Default to 0.0. +> > ```none +> > selection procedure. Default to 0.0. +> > ``` - > > Threshold_slct (float): Selection threshold - maximum +> > Threshold_slct (float): Selection threshold - maximum - > > allowed extrapolation level. Default to 0.1. +> > ```none +> > allowed extrapolation level. Default to 0.1. +> > ``` - > > Save_TS (str): Filename where selected configurations +> > Save_TS (str): Filename where selected configurations - > > will be saved. No configuration saving if not specified. - > > Default to None. +> > ```none +> > will be saved. No configuration saving if not specified. +> > Default to None. +> > ``` - > > Save_state (str): Filename where state of the selection +> > Save_state (str): Filename where state of the selection - > > will be saved. No saving if not specified. Default to None. +> > ```none +> > will be saved. No saving if not specified. Default to None. +> > ``` - > > Load_state (str): Filename where state of the selection +> > Load_state (str): Filename where state of the selection - > > will be loaded. No saving if not specified. Default to None. +> > ```none +> > will be loaded. No saving if not specified. Default to None. +> > ``` - > > Select_log (str): File to write fitting log. No logging +> > Select_log (str): File to write fitting log. No logging - > > if not specified. Default to None. +> > ```none +> > if not specified. Default to None. +> > ``` - > LOFT (bool): Whether to perform learning on the fly. Default to False +> LOFT (bool): Whether to perform learning on the fly. Default to False - > > EFSviaMTP (bool): Works only on LOFT regime. If True, +> > EFSviaMTP (bool): Works only on LOFT regime. If True, - > > only MTP-calculated EFS will be passed to driver, else - > > pass to driver ab-initio EFS while LOTF when learning occurs. +> > ```none +> > only MTP-calculated EFS will be passed to driver, else +> > pass to driver ab-initio EFS while LOTF when learning occurs. +> > ``` - > > Log (str): Filename to write log of learning on the fly process. +> > Log (str): Filename to write log of learning on the fly process. - > > No logging if not specified. Default to None. +> > ```none +> > No logging if not specified. Default to None. +> > ``` - > Check_errors (bool): If True, comparison and accumulation of +> Check_errors (bool): If True, comparison and accumulation of - > error statistics for EFS calculated by ab-initio models and MTP. - > Default to False. +> ```none +> error statistics for EFS calculated by ab-initio models and MTP. +> Default to False. +> ``` - > Log (str): Filename to write log of learning on the fly process. +> ```none +> Log (str): Filename to write log of learning on the fly process. +> ``` - > No logging if not specified. Default to None. +> ```none +> No logging if not specified. Default to None. +> ``` - > Write_cfgs (bool): File for writing all processed configurations. +> Write_cfgs (bool): File for writing all processed configurations. - > No configuration recording if not specified. Default to None. +> ```none +> No configuration recording if not specified. Default to None. +> ``` - > Skip_N (int): The number of configurations to skip while writing. +> ```none +> Skip_N (int): The number of configurations to skip while writing. +> ``` - > Default to 0. +> ```none +> Default to 0. +> ``` - > Log (str): Filename to write MLIP log. No logging if not specified. +> Log (str): Filename to write MLIP log. No logging if not specified. - > Default to None. +> ```none +> Default to None. +> ``` - Driver (int): Defines the configuration driver. Default to 1. +Driver (int): Defines the configuration driver. Default to 1. - > 0: No driver or external MD driver. - > 1: Read configurations from database file. +> 0: No driver or external MD driver. +> 1: Read configurations from database file. - > > Database_filename (str): Configuration file name. - > > Max_count (int): Maximal number of configurations to read. - > > Log (str): Filename to write reading log. No logging +> > Database_filename (str): Configuration file name. +> > Max_count (int): Maximal number of configurations to read. +> > Log (str): Filename to write reading log. No logging - > > > if not specified. Default to None. +> > > if not specified. Default to None. - > 2: Embedded algorithm for relaxation. +> 2: Embedded algorithm for relaxation. - > > Pressure (float): External pressure (in GPa). +> > Pressure (float): External pressure (in GPa). - > > If not zero enthalpy is minimized. Default to 0.0. +> > ```none +> > If not zero enthalpy is minimized. Default to 0.0. +> > ``` - > > Iteration_limit (int): Maximal number of iteration of +> > Iteration_limit (int): Maximal number of iteration of - > > the relaxation process. Default to 500. +> > ```none +> > the relaxation process. Default to 500. +> > ``` - > > Min_dist (float): Minimal interatomic distance constraint +> > Min_dist (float): Minimal interatomic distance constraint - > > (in Angstroms). Default to 1.0. +> > ```none +> > (in Angstroms). Default to 1.0. +> > ``` - > > Forces_tolerance (float): Forces on atoms in relaxed +> > Forces_tolerance (float): Forces on atoms in relaxed - > > configuration should be smaller than this value - > > (in eV/Angstroms). Default to 0.0001. +> > ```none +> > configuration should be smaller than this value +> > (in eV/Angstroms). Default to 0.0001. +> > ``` - > > Stress_tolerance (float): Stresses in relaxed configuration +> > Stress_tolerance (float): Stresses in relaxed configuration - > > should be smaller than this value (in GPa). Default to 0.001. +> > ```none +> > should be smaller than this value (in GPa). Default to 0.001. +> > ``` - > > Max_step (float): Maximal allowed displacement of atoms and +> > Max_step (float): Maximal allowed displacement of atoms and - > > lattice vectors in Cartesian coordinates (in Angstroms). - > > Default to 0.5. +> > ```none +> > lattice vectors in Cartesian coordinates (in Angstroms). +> > Default to 0.5. +> > ``` - > > Min_step (float): Minimal displacement of atoms and +> > Min_step (float): Minimal displacement of atoms and - > > lattice vectors in Cartesian coordinates (in Angstroms). - > > Default to 1.0e-8. +> > ```none +> > lattice vectors in Cartesian coordinates (in Angstroms). +> > Default to 1.0e-8. +> > ``` - > > BFGS_Wolfe_C1 (float): Wolfe condition constant on the function +> > BFGS_Wolfe_C1 (float): Wolfe condition constant on the function - > > decrease (linesearch stopping criterea). Default to 1.0e-3. +> > ```none +> > decrease (linesearch stopping criterea). Default to 1.0e-3. +> > ``` - > > BFGS_Wolfe_C2 (float): Wolfe condition constant on the gradient +> > BFGS_Wolfe_C2 (float): Wolfe condition constant on the gradient - > > decrease (linesearch stopping criterea). Default to 0.7. +> > ```none +> > decrease (linesearch stopping criterea). Default to 0.7. +> > ``` - > > Save_relaxed (str): Filename for output results of relaxation. +> > Save_relaxed (str): Filename for output results of relaxation. - > > No configuration will be saved if not specified. - > > Default to None. +> > ```none +> > No configuration will be saved if not specified. +> > Default to None. +> > ``` - > > Log (str): Filename to write relaxation log. No logging +> > Log (str): Filename to write relaxation log. No logging - > > if not specified. Default to None. +> > ```none +> > if not specified. Default to None. +> > ``` +#### write_param(fitted_mtp=’fitted.mtp’, \*\*kwargs) - - -#### write_param(fitted_mtp='fitted.mtp', \*\*kwargs) Write fitted mtp parameter file to perform lammps calculation. * **Parameters** +**fitted_mtp** (*str*) – Filename to store xml formatted parameters. - **fitted_mtp** (*str*) – Filename to store xml formatted parameters. - +### maml.apps.pes._mtp.feed(attribute, kwargs, dictionary, tab=’\\t’) -### maml.apps.pes._mtp.feed(attribute, kwargs, dictionary, tab='\\t') - * **Parameters** - * **attribute** (*str*) – Attribute to be operated. @@ -2501,26 +2570,23 @@ Write fitted mtp parameter file to perform lammps calculation. * **tab** (*str*) – ‘t’ or ‘tt’, depend on orders of attribute. - * **Returns** - - (str). - +(str). ## maml.apps.pes._nnp module This module provides NNP interatomic potential class. +### *class* maml.apps.pes._nnp.NNPotential(name=None, param=None, weight_param=None, scaling_param=None) -### _class_ maml.apps.pes._nnp.NNPotential(name=None, param=None, weight_param=None, scaling_param=None) Bases: `LammpsPotential` This class implements Neural Network Potential. - -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *abc_impl(* = <_abc.*abc_data object* ) #### _line_up(structure, energy, forces, virial_stress) + Convert input structure, energy, forces, virial_stress to proper configuration format for n2p2 usage. Note that n2p2 takes bohr as length unit and Hartree as energy unit. @@ -2528,7 +2594,6 @@ n2p2 takes bohr as length unit and Hartree as energy unit. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. @@ -2536,363 +2601,356 @@ n2p2 takes bohr as length unit and Hartree as energy unit. * **forces** (*list*) – The forces should have dimension - (num_atoms, 3). +(num_atoms, 3). * **virial_stress** (*list*) – stress should has 6 distinct - elements arranged in order [xx, yy, zz, xy, yz, xz]. - - +elements arranged in order [xx, yy, zz, xy, yz, xz]. #### bohr_to_angstrom(_ = 0.52917721090_ ) #### eV_to_Ha(_ = 0.03674932217565_ ) #### evaluate(test_structures, test_energies, test_forces, test_stresses=None) + Evaluate energies, forces and stresses of structures with trained interatomic potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. +of each structure in structures list. +#### *static* from_config(input_filename, scaling_filename, weights_filenames) - -#### _static_ from_config(input_filename, scaling_filename, weights_filenames) Initialize potentials with parameters file. * **Parameters** - * **input_filename** (*str*) – The file storing the input configuration of - Neural Network Potential. +Neural Network Potential. * **scaling_filename** (*str*) – The file storing scaling info of - Neural Network Potential. +Neural Network Potential. * **weights_filenames** (*list*) – List of files storing weights of each specie in - Neural Network Potential. - +Neural Network Potential. +#### load_input(filename=’input.nn’) -#### load_input(filename='input.nn') Load input file from trained Neural Network Potential. * **Parameters** - - **filename** (*str*) – The input filename. - - +**filename** (*str*) – The input filename. #### load_scaler(scaling_filename) + Load scaling info of trained Neural Network Potential. * **Parameters** - - **scaling_filename** (*str*) – The scaling file. - - +**scaling_filename** (*str*) – The scaling file. #### load_weights(weights_filename, specie) + Load weights file of trained Neural Network Potential. * **Parameters** - * **weights_filename** (*str*) – The weights file. * **specie** (*str*) – The name of specie. +#### pair_coeff(_ = ‘pair_coeff \* \* {}_ ) +#### pair_style(_ = ‘pair_style nnp dir “./” showew no showewsum 0 maxew 10000000 resetew yes cflength 1.8897261328 cfenergy 0.0367493254_ ) -#### pair_coeff(_ = 'pair_coeff \* \* {}_ ) - -#### pair_style(_ = 'pair_style nnp dir "./" showew no showewsum 0 maxew 10000000 resetew yes cflength 1.8897261328 cfenergy 0.0367493254_ ) +#### read_cfgs(filename=’output.data’) -#### read_cfgs(filename='output.data') Read the configuration file. * **Parameters** - - **filename** (*str*) – The configuration file to be read. - - +**filename** (*str*) – The configuration file to be read. #### train(train_structures, train_energies, train_forces, train_stresses=None, \*\*kwargs) + Training data with moment tensor method. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each - single structure case. +with m atoms in structures list. m can be varied with each +single structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. +structure in structures list. * **kwargs** – Parameters in write_input method. - - #### write_cfgs(filename, cfg_pool) + Write the formatted configuration file. * **Parameters** - * **filename** (*str*) – The filename to be written. * **cfg_pool** (*list*) – The configuration pool contains - structure and energy/forces properties. - - +structure and energy/forces properties. #### write_input(\*\*kwargs) + Write input.nn file to train the Neural Network Potential. * **Parameters** - * **atom_energy** (*float*) – Atomic reference energy. * **kwargs** – General nnp settings: - atom_energy (dict): Free atom reference energy for each specie. - cutoff_type (int): Type of cutoff function. Default to 1 - - > (i.e., cosine function). - - scale_features (int): Determine the method to scale the +atom_energy (dict): Free atom reference energy for each specie. +cutoff_type (int): Type of cutoff function. Default to 1 - symmetry function. - 0: no scaling. - 1: scale_symmetry_functions. - 2: center_symmetry_functions. - 3. scale_symmetry_functions_sigma. +> (i.e., cosine function). - scale_min_short (float): Minimum value for scaling. +scale_features (int): Determine the method to scale the - Default to 0.0. +```none + symmetry function. + 0: no scaling. + 1: scale_symmetry_functions. + 2: center_symmetry_functions. + 3. scale_symmetry_functions_sigma. +``` - scale_max_short (float): Maximum value for scaling. +scale_min_short (float): Minimum value for scaling. - Default to 1. +```none + Default to 0.0. +``` - hidden_layers (list): List of the numbers of +scale_max_short (float): Maximum value for scaling. - nodes in each hidden layer. +```none + Default to 1. +``` - activations (str): Activation function for each hidden layer. +hidden_layers (list): List of the numbers of - ’t’: tanh, ‘s’: logistic, ‘p’: softplus. +```none + nodes in each hidden layer. +``` - normalize_nodes (boolean): Whether to normalize input of nodes. +activations (str): Activation function for each hidden layer. - Additional settings for training: +```none + ’t’: tanh, ‘s’: logistic, ‘p’: softplus. +``` - epoch (int): Number of training epochs. - updater_type (int): Weight update method +normalize_nodes (boolean): Whether to normalize input of nodes. - > 0: gradient Descent, 1: Kalman filter. +Additional settings for training: - parallel_mode (int): Training parallelization used. +```none + epoch (int): Number of training epochs. + updater_type (int): Weight update method - Default to serial mode. + > 0: gradient Descent, 1: Kalman filter. - jacobian_mode (int): Jacobian computation mode. + parallel_mode (int): Training parallelization used. - 0: Summation to single gradient, - 1: Per-task summed gradient, - 2: Full Jacobian. + Default to serial mode. - update_strategy (int): Update strategy. + jacobian_mode (int): Jacobian computation mode. - 0: combined, 1: per-element. + 0: Summation to single gradient, + 1: Per-task summed gradient, + 2: Full Jacobian. - selection_mode (int): Update candidate selection mode. + update_strategy (int): Update strategy. - 0: random, 1: sort, 2: threshold + 0: combined, 1: per-element. - task_batch_size_energy (int): Number of energy update + selection_mode (int): Update candidate selection mode. - candidates prepared per task for each update. + 0: random, 1: sort, 2: threshold - task_batch_size_force (int): Number of force update + task_batch_size_energy (int): Number of energy update - candidates prepared per task for each update. + candidates prepared per task for each update. - test_fraction (float): Fraction of structures kept for + task_batch_size_force (int): Number of force update - testing. + candidates prepared per task for each update. - force_weight (float): Weight of force updates relative + test_fraction (float): Fraction of structures kept for - to energy updates. Default to 10.0 + testing. - short_energy_fraction (float): Fraction of energy updates + force_weight (float): Weight of force updates relative - per epoch. Default to 1.0. + to energy updates. Default to 10.0 - short_force_fraction (float): Fraction of force updates + short_energy_fraction (float): Fraction of energy updates - per epoch. Default to 0.02315. + per epoch. Default to 1.0. - short_energy_error_threshold (float): RMSE threshold for + short_force_fraction (float): Fraction of force updates - energy update candidates. Default to 0.0. + per epoch. Default to 0.02315. - short_force_error_threshold (float): RMSE threshold for + short_energy_error_threshold (float): RMSE threshold for - force update candidates. Default to 1.0. + energy update candidates. Default to 0.0. - rmse_threshold_trials (int): Maximum number of RMSE + short_force_error_threshold (float): RMSE threshold for - threshold trials. Default to 3. + force update candidates. Default to 1.0. - weights_min (float): Minimum value for initial random + rmse_threshold_trials (int): Maximum number of RMSE - weights. Default to -1. + threshold trials. Default to 3. - weights_max (float): Maximum value for initial random + weights_min (float): Minimum value for initial random - weights. Default to 1. + weights. Default to -1. - write_trainpoints (int): Write energy comparison every + weights_max (float): Maximum value for initial random - this many epochs. Default to 1. + weights. Default to 1. - write_trainforces (int): Write force comparison every + write_trainpoints (int): Write energy comparison every - this many epochs. Default to 1. + this many epochs. Default to 1. - write_weights_epoch (int): Write weights every this many + write_trainforces (int): Write force comparison every - epochs. Default to 1. + this many epochs. Default to 1. - write_neuronstats (int): Write neuron statistics every + write_weights_epoch (int): Write weights every this many - this many epochs. Default to 1. + epochs. Default to 1. - # Kalman Filter - kalman_type (int): Kalman filter type. Default to 0. - kalman_epsilon (float): General Kalman filter parameter + write_neuronstats (int): Write neuron statistics every - > epsilon. Default to 0.01. + this many epochs. Default to 1. - kalman_q0 (float): General Kalman filter parameter q0. + # Kalman Filter + kalman_type (int): Kalman filter type. Default to 0. + kalman_epsilon (float): General Kalman filter parameter - Default to 0.01. + > epsilon. Default to 0.01. - kalman_qtau (float): General Kalman filter parameter + kalman_q0 (float): General Kalman filter parameter q0. - qtau. Default to 2.302. + Default to 0.01. - kalman_qmin (float): General Kalman filter parameter qmin. + kalman_qtau (float): General Kalman filter parameter - Default to 1e-6. + qtau. Default to 2.302. - kalman_eta (float): Standard Kalman filter parameter eta. + kalman_qmin (float): General Kalman filter parameter qmin. - Default to 0.01. + Default to 1e-6. - kalman_etatau (float): Standard Kalman filter parameter + kalman_eta (float): Standard Kalman filter parameter eta. - etatau. Defaults to 2.302. + Default to 0.01. - kalman_etamax (float): Standard Kalman filter parameter + kalman_etatau (float): Standard Kalman filter parameter - etamax. Default to 1.0. + etatau. Defaults to 2.302. - Symmetry functions: - - r_cut (float): Cutoff distance (unit: Å). - r_etas (numpy.array): η in radial function. - r_shift (numpy.array): Rs in radial function. - a_etas (numpy.array): η in angular function. - zetas (numpy.array): ζ in angular function. - lambdas (numpy.array): λ in angular function. Default to (1, -1). + kalman_etamax (float): Standard Kalman filter parameter + etamax. Default to 1.0. +``` +Symmetry functions: +```none + r_cut (float): Cutoff distance (unit: Å). + r_etas (numpy.array): η in radial function. + r_shift (numpy.array): Rs in radial function. + a_etas (numpy.array): η in angular function. + zetas (numpy.array): ζ in angular function. + lambdas (numpy.array): λ in angular function. Default to (1, -1). +``` #### write_param() + Write optimized weights file to perform energy and force prediction. ## maml.apps.pes._snap module This module provides SNAP interatomic potential class. +### *class* maml.apps.pes._snap.SNAPotential(model, name=None) -### _class_ maml.apps.pes._snap.SNAPotential(model, name=None) Bases: `LammpsPotential` This class implements Spectral Neighbor Analysis Potential. +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### evaluate(test_structures, test_energies, test_forces, test_stresses=None, include_stress=False, stress_format=’VASP’) -#### evaluate(test_structures, test_energies, test_forces, test_stresses=None, include_stress=False, stress_format='VASP') Evaluate energies, forces and stresses of structures with trained machinea learning potentials. * **Parameters** - * **test_structures** (*[**Structure**]*) – List of Pymatgen Structure Objects. * **test_energies** (*[**float**]*) – List of DFT-calculated total energies of - each structure in structures list. +each structure in structures list. * **test_forces** (*[**np.array**]*) – List of DFT-calculated (m, 3) forces of - each structure with m atoms in structures list. m can be varied - with each single structure case. +each structure with m atoms in structures list. m can be varied +with each single structure case. * **test_stresses** (*list*) – List of DFT-calculated (6, ) viriral stresses - of each structure in structures list. +of each structure in structures list. * **include_stress** (*bool*) – Whether to include stress components. @@ -2900,55 +2958,49 @@ machinea learning potentials. * **stress_format** (*str*) – stress format, default to “VASP” +#### *static* from_config(param_file, coeff_file, \*\*kwargs) - -#### _static_ from_config(param_file, coeff_file, \*\*kwargs) Initialize potentials with parameters file and coefficient file. * **Parameters** - * **param_file** (*str*) – The file storing the configuration of potentials. * **coeff_file** (*str*) – The file storing the coefficients of potentials. - * **Returns** +SNAPotential. - SNAPotential. - +#### pair_coeff(_ = ‘pair_coeff \* \* {coeff_file} {param_file} {elements}_ ) +#### pair_style(_ = ‘pair_style snap_ ) -#### pair_coeff(_ = 'pair_coeff \* \* {coeff_file} {param_file} {elements}_ ) +#### train(train_structures, train_energies, train_forces, train_stresses=None, include_stress=False, stress_format=’VASP’, \*\*kwargs) -#### pair_style(_ = 'pair_style snap_ ) - -#### train(train_structures, train_energies, train_forces, train_stresses=None, include_stress=False, stress_format='VASP', \*\*kwargs) Training data with models. * **Parameters** - * **train_structures** (*[**Structure**]*) – The list of Pymatgen Structure object. - energies ([float]): The list of total energies of each structure - in structures list. +energies ([float]): The list of total energies of each structure +in structures list. * **train_energies** (*[**float**]*) – List of total energies of each structure in - structures list. +structures list. * **train_forces** (*[**np.array**]*) – List of (m, 3) forces array of each - structure with m atoms in structures list. m can be varied with - each single structure case. +structure with m atoms in structures list. m can be varied with +each single structure case. * **train_stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. +structure in structures list. * **include_stress** (*bool*) – Whether to include stress components. @@ -2956,7 +3008,6 @@ Training data with models. * **stress_format** (*string*) – stress format, default to VASP - - #### write_param() + Write parameter and coefficient file to perform lammps calculation. \ No newline at end of file diff --git a/docs/maml.apps.symbolic.md b/docs/maml.apps.symbolic.md index ecd56039..11f65938 100644 --- a/docs/maml.apps.symbolic.md +++ b/docs/maml.apps.symbolic.md @@ -8,38 +8,35 @@ nav_exclude: true Symbolic learning. +## *class* maml.apps.symbolic.AdaptiveLasso(lambd, gamma, \*\*kwargs) -### _class_ maml.apps.symbolic.AdaptiveLasso(lambd, gamma, \*\*kwargs) Bases: `PenalizedLeastSquares` Adaptive lasso regression using OLS coefficients as the root-n estimator coefficients. +### _penalty_jac(x, y, beta) -#### _penalty_jac(x, y, beta) +### get_w(x, y) -#### get_w(x, y) Get adaptive weights from data. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array * **y** (*np.ndarray*) – M output targets - Returns: coefficients array. +### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) -#### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) Calculate the penalty from input x, output y and coefficient beta. * **Parameters** - * **beta** (*np.ndarray*) – N coefficients @@ -48,17 +45,15 @@ Calculate the penalty from input x, output y and coefficient beta. * **y** (*np.ndarray*) – M output targets - Returns: penalty value. +### select(x, y, options=None) -#### select(x, y, options=None) Select feature indices from x. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -66,28 +61,26 @@ Select feature indices from x. * **options** (*dict*) – options in the optimizations provided - to scipy.optimize.minimize - +to scipy.optimize.minimize Returns: list of int indices. +## *class* maml.apps.symbolic.DantzigSelector(lambd, sigma=1.0, \*\*kwargs) -### _class_ maml.apps.symbolic.DantzigSelector(lambd, sigma=1.0, \*\*kwargs) Bases: `BaseSelector` Equation 11 in [https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf](https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf) and reference in [https://projecteuclid.org/download/pdfview_1/euclid.aos/1201012958](https://projecteuclid.org/download/pdfview_1/euclid.aos/1201012958). +### construct_constraints(x: np.ndarray, y: np.ndarray, beta: np.ndarray | None = None) -#### construct_constraints(x: np.ndarray, y: np.ndarray, beta: np.ndarray | None = None) Get constraints dictionary from data, e.g., {“func”: lambda beta: fun(x, y, beta), “type”: “ineq”}. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -96,33 +89,29 @@ Get constraints dictionary from data, e.g., * **beta** (*np.ndarray*) – placeholder - Returns: dict of constraints. +### construct_jac(x: ndarray, y: ndarray) -#### construct_jac(x: ndarray, y: ndarray) Jacobian of cost functions. * **Parameters** - * **x** – ndarray * **y** – ndarray - Returns: callable +### construct_loss(x, y, beta) -#### construct_loss(x, y, beta) Get loss function from data and tentative coefficients beta. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -131,37 +120,35 @@ Get loss function from data and tentative coefficients beta. * **beta** (*np.ndarray*) – N coefficients - Returns: loss value. +## *class* maml.apps.symbolic.FeatureGenerator(feature_df: pd.DataFrame, operators: list) -### _class_ maml.apps.symbolic.FeatureGenerator(feature_df: pd.DataFrame, operators: list) Bases: `object` FeatureGenerator class for feature augmentation before selection. +### augment(n: int = 1) -#### augment(n: int = 1) Augment features :param n: number of rounds of iteration. :type n: int Returns: augmented dataframe +## *class* maml.apps.symbolic.ISIS(sis: SIS | None = None, l0_regulate: bool = True) -### _class_ maml.apps.symbolic.ISIS(sis: SIS | None = None, l0_regulate: bool = True) Bases: `object` Iterative SIS. +### evaluate(x: ndarray, y: ndarray, metric: str = ‘neg_mean_absolute_error’) -#### evaluate(x: ndarray, y: ndarray, metric: str = 'neg_mean_absolute_error') Evaluate the linear models using x, and y test data. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -169,13 +156,12 @@ Evaluate the linear models using x, and y test data. * **metric** (*str*) – scorer function, used with - sklearn.metrics.get_scorer - +sklearn.metrics.get_scorer Returns: float. +### run(x: np.ndarray, y: np.ndarray, max_p: int = 10, metric: str = ‘neg_mean_absolute_error’, options: dict | None = None, step: float = 0.5) -#### run(x: np.ndarray, y: np.ndarray, max_p: int = 10, metric: str = 'neg_mean_absolute_error', options: dict | None = None, step: float = 0.5) Run the ISIS :param x: input array :type x: np.ndarray @@ -190,28 +176,22 @@ Run the ISIS * **Parameters** - * **options** – * **step** (*float*) – step to update gamma with. - * **Returns** - - np.array of index of selected features - coeff(np.array): np.array of coeff of selected features - +np.array of index of selected features +coeff(np.array): np.array of coeff of selected features * **Return type** +find_sel(np.array) - find_sel(np.array) - +## *class* maml.apps.symbolic.L0BrutalForce(lambd: float, \*\*kwargs) - -### _class_ maml.apps.symbolic.L0BrutalForce(lambd: float, \*\*kwargs) Bases: `BaseSelector` Brutal force combinatorial screening of features. @@ -220,20 +200,19 @@ and optimize the following loss function > 1/2 \* mean((y-x @ beta)\*\*2) + lambd \* -> ``` +> ```default > | > ``` > beta|_0. +### select(x: np.ndarray, y: np.ndarray, options: dict | None = None, n_job: int = 1) -#### select(x: np.ndarray, y: np.ndarray, options: dict | None = None, n_job: int = 1) L0 combinatorial optimization. * **Parameters** - * **x** (*np.ndarray*) – design matrix @@ -245,25 +224,23 @@ L0 combinatorial optimization. * **n_job** (*int*) – number of cpu - Returns: +## *class* maml.apps.symbolic.Lasso(lambd, \*\*kwargs) -### _class_ maml.apps.symbolic.Lasso(lambd, \*\*kwargs) Bases: `PenalizedLeastSquares` Simple Lasso regression. +### _penalty_jac(x, y, beta) -#### _penalty_jac(x, y, beta) +### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) -#### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) Calculate the penalty from input x, output y and coefficient beta. * **Parameters** - * **beta** (*np.ndarray*) – N coefficients @@ -272,19 +249,18 @@ Calculate the penalty from input x, output y and coefficient beta. * **y** (*np.ndarray*) – M output targets - Returns: penalty value. +## *class* maml.apps.symbolic.Operator(operation: Callable[[…], Any], rep: str, unary: bool, commutative: bool) -### _class_ maml.apps.symbolic.Operator(operation: Callable[[...], Any], rep: str, unary: bool, commutative: bool) Bases: `object` Operator class. Wrap math operators with more attributes including check is_unary, is_binary, and is_commutative, and generate name string for the output. +### compute(i1: np.ndarray, i2: np.ndarray | None = None) -#### compute(i1: np.ndarray, i2: np.ndarray | None = None) Compute the results :param i1: first input array :type i1: np.ndarray @@ -293,8 +269,8 @@ Compute the results Returns: array of computed results +### *classmethod* from_str(op_name: str) -#### _classmethod_ from_str(op_name: str) Operator from name of the operator :param op_name: string representation of the operator, :type op_name: str @@ -302,8 +278,8 @@ Operator from name of the operator Returns: Operator +### gen_name(f1: str, f2: str | None = None) -#### gen_name(f1: str, f2: str | None = None) Generate string representation for output :param f1: name of the first input array :type f1: str @@ -312,57 +288,52 @@ Generate string representation for output Returns: name of the output +### *property* is_binary(*: boo* ) -#### _property_ is_binary(_: boo_ ) True if the operator takes two arguments else False. * **Type** +Returns - Returns +### *property* is_commutative(*: boo* ) - - -#### _property_ is_commutative(_: boo_ ) True if the operator is commutative else False. * **Type** +Returns - Returns - +### *property* is_unary(*: boo* ) - -#### _property_ is_unary(_: boo_ ) True if the operator takes one argument else False. * **Type** +Returns - Returns - +### support_op_rep(_ = [‘^2’, ‘^3’, ‘sqrt’, ‘abssqrt’, ‘cbrt’, ‘exp’, ‘abs’, ‘log10’, ‘abslog10’, ‘+’, ‘-’, ‘\*’, ‘/’, ‘|+|’, ‘|-|’, ‘sum_power_2’, ‘sum_exp’_ ) +## *class* maml.apps.symbolic.SCAD(lambd: float | np.ndarray, a: float = 3.7, \*\*kwargs) -#### support_op_rep(_ = ['^2', '^3', 'sqrt', 'abssqrt', 'cbrt', 'exp', 'abs', 'log10', 'abslog10', '+', '-', '\*', '/', '|+|', '|-|', 'sum_power_2', 'sum_exp'_ ) - -### _class_ maml.apps.symbolic.SCAD(lambd: float | np.ndarray, a: float = 3.7, \*\*kwargs) Bases: `PenalizedLeastSquares` Smoothly clipped absolute deviation (SCAD), equation 12 and 13 in [https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf](https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf). +### _penalty_jac(x, y, beta) -#### _penalty_jac(x, y, beta) +### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) -#### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) Calculate the SCAD penalty from input x, output y - and coefficient beta +```none +and coefficient beta +``` * **Parameters** - * **beta** (*np.ndarray*) – N coefficients @@ -371,11 +342,10 @@ Calculate the SCAD penalty from input x, output y * **y** (*np.ndarray*) – M output targets - Returns: penalty value. +## *class* maml.apps.symbolic.SIS(gamma=0.1, selector: BaseSelector | None = None, verbose: bool = True) -### _class_ maml.apps.symbolic.SIS(gamma=0.1, selector: BaseSelector | None = None, verbose: bool = True) Bases: `object` Sure independence screening method. @@ -384,11 +354,11 @@ The method consists of two steps: > > 1. Screen +> +> 1. Select. -> 2. Select. - +### compute_residual(x, y) -#### compute_residual(x, y) Compute residual :param x: input array :type x: np.ndarray @@ -397,8 +367,8 @@ Compute residual Returns: residual vector +### run(x, y, select_options=None) -#### run(x, y, select_options=None) Run the SIS with selector :param x: MxN input data array :type x: np.ndarray @@ -411,25 +381,23 @@ Run the SIS with selector Returns: selected feature indices +### screen(x, y) -#### screen(x, y) Simple screening method by comparing the correlation between features and the target. * **Parameters** - * **x** (*np.ndarray*) – input array * **y** (*np.ndarray*) – target array - Returns: top indices +### select(x, y, options=None) -#### select(x, y, options=None) Select features using selectors :param x: input array :type x: np.ndarray @@ -438,62 +406,57 @@ Select features using selectors :param options: options for the optimization. :type options: dict +### set_gamma(gamma) -#### set_gamma(gamma) Set gamma. * **Parameters** +**gamma** (*float*) – new gamma value - **gamma** (*float*) – new gamma value - +### set_selector(selector: BaseSelector) - -#### set_selector(selector: BaseSelector) Set new selector :param selector: a feature selector. :type selector: BaseSelector +### update_gamma(ratio: float = 0.5) -#### update_gamma(ratio: float = 0.5) Update the sis object so that sis.select return at least one feature. * **Parameters** - - **ratio** (*float*) – ratio to update the parameters - - +**ratio** (*float*) – ratio to update the parameters ## maml.apps.symbolic._feature_generator module Feature Generator. +### *class* maml.apps.symbolic._feature_generator.FeatureGenerator(feature_df: pd.DataFrame, operators: list) -### _class_ maml.apps.symbolic._feature_generator.FeatureGenerator(feature_df: pd.DataFrame, operators: list) Bases: `object` FeatureGenerator class for feature augmentation before selection. - #### augment(n: int = 1) + Augment features :param n: number of rounds of iteration. :type n: int Returns: augmented dataframe +### *class* maml.apps.symbolic._feature_generator.Operator(operation: Callable[[…], Any], rep: str, unary: bool, commutative: bool) -### _class_ maml.apps.symbolic._feature_generator.Operator(operation: Callable[[...], Any], rep: str, unary: bool, commutative: bool) Bases: `object` Operator class. Wrap math operators with more attributes including check is_unary, is_binary, and is_commutative, and generate name string for the output. - #### compute(i1: np.ndarray, i2: np.ndarray | None = None) + Compute the results :param i1: first input array :type i1: np.ndarray @@ -502,8 +465,8 @@ Compute the results Returns: array of computed results +#### *classmethod* from_str(op_name: str) -#### _classmethod_ from_str(op_name: str) Operator from name of the operator :param op_name: string representation of the operator, :type op_name: str @@ -511,8 +474,8 @@ Operator from name of the operator Returns: Operator - #### gen_name(f1: str, f2: str | None = None) + Generate string representation for output :param f1: name of the first input array :type f1: str @@ -521,38 +484,31 @@ Generate string representation for output Returns: name of the output +#### *property* is_binary(*: boo* ) -#### _property_ is_binary(_: boo_ ) True if the operator takes two arguments else False. * **Type** +Returns - Returns - - +#### *property* is_commutative(*: boo* ) -#### _property_ is_commutative(_: boo_ ) True if the operator is commutative else False. * **Type** +Returns - Returns +#### *property* is_unary(*: boo* ) - - -#### _property_ is_unary(_: boo_ ) True if the operator takes one argument else False. * **Type** +Returns - Returns - - - -#### support_op_rep(_ = ['^2', '^3', 'sqrt', 'abssqrt', 'cbrt', 'exp', 'abs', 'log10', 'abslog10', '+', '-', '\*', '/', '|+|', '|-|', 'sum_power_2', 'sum_exp'_ ) +#### support_op_rep(_ = [‘^2’, ‘^3’, ‘sqrt’, ‘abssqrt’, ‘cbrt’, ‘exp’, ‘abs’, ‘log10’, ‘abslog10’, ‘+’, ‘-’, ‘\*’, ‘/’, ‘|+|’, ‘|-|’, ‘sum_power_2’, ‘sum_exp’_ ) ### maml.apps.symbolic._feature_generator._my_abs_diff(x, y) @@ -585,60 +541,56 @@ True if the operator takes one argument else False. ### maml.apps.symbolic._feature_generator._my_sum_power_3(x, y) ### maml.apps.symbolic._feature_generator._update_df(df, op, fn1, fn2=None) -Helper function to update the dataframe with new generated feature array. +Helper function to update the dataframe with new generated feature array. ### maml.apps.symbolic._feature_generator.generate_feature(feature_df: pd.DataFrame, operators: list) + Generate new features by applying operators to columns in feature_df. * **Parameters** - * **feature_df** (*pd.DataFrame*) – dataframe of original features * **operators** (*list*) – list of str of operators (check Operator.support_op_rep for reference) - Returns: dataframe of augmented features ## maml.apps.symbolic._selectors module Selectors. +### *class* maml.apps.symbolic._selectors.AdaptiveLasso(lambd, gamma, \*\*kwargs) -### _class_ maml.apps.symbolic._selectors.AdaptiveLasso(lambd, gamma, \*\*kwargs) Bases: `PenalizedLeastSquares` Adaptive lasso regression using OLS coefficients as the root-n estimator coefficients. - #### _penalty_jac(x, y, beta) #### get_w(x, y) + Get adaptive weights from data. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array * **y** (*np.ndarray*) – M output targets - Returns: coefficients array. - #### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) + Calculate the penalty from input x, output y and coefficient beta. * **Parameters** - * **beta** (*np.ndarray*) – N coefficients @@ -647,17 +599,15 @@ Calculate the penalty from input x, output y and coefficient beta. * **y** (*np.ndarray*) – M output targets - Returns: penalty value. - #### select(x, y, options=None) + Select feature indices from x. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -665,45 +615,41 @@ Select feature indices from x. * **options** (*dict*) – options in the optimizations provided - to scipy.optimize.minimize - +to scipy.optimize.minimize Returns: list of int indices. +### *class* maml.apps.symbolic._selectors.BaseSelector(coef_thres: float = 1e-06, method: str = ‘SLSQP’) -### _class_ maml.apps.symbolic._selectors.BaseSelector(coef_thres: float = 1e-06, method: str = 'SLSQP') Bases: `object` Feature selector. This is meant to work on relatively smaller number of features. - -#### _classmethod_ _get_param_names() +#### *classmethod* _get_param_names() #### compute_residual(x: ndarray, y: ndarray) + Compute. * **Parameters** - * **x** (*np.ndarray*) – design matrix * **y** (*np.ndarray*) – target vector - Returns: residual vector. - #### construct_constraints(x: np.ndarray, y: np.ndarray, beta: np.ndarray | None = None) + Get constraints dictionary from data, e.g., {“func”: lambda beta: fun(x, y, beta), “type”: “ineq”}. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -712,11 +658,10 @@ Get constraints dictionary from data, e.g., * **beta** (*np.ndarray*) – parameter to optimize - Returns: dict of constraints. - #### construct_jac(x: np.ndarray, y: np.ndarray) + Jacobian of cost function :param x: MxN input data array :type x: np.ndarray @@ -725,8 +670,8 @@ Jacobian of cost function Returns: Jacobian function. - #### construct_loss(x: ndarray, y: ndarray, beta: ndarray) + Get loss function from data and tentative coefficients beta :param x: MxN input data array :type x: np.ndarray @@ -737,14 +682,13 @@ Get loss function from data and tentative coefficients beta Returns: loss value. +#### evaluate(x: ndarray, y: ndarray, metric: str = ‘neg_mean_absolute_error’) -#### evaluate(x: ndarray, y: ndarray, metric: str = 'neg_mean_absolute_error') Evaluate the linear models using x, and y test data. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -752,44 +696,43 @@ Evaluate the linear models using x, and y test data. * **metric** (*str*) – scorer function, used with - sklearn.metrics.get_scorer - +sklearn.metrics.get_scorer Returns: - #### get_coef() + Get coefficients Returns: the coefficients array. - #### get_feature_indices() + Get selected feature indices. Returns: ndarray - #### get_params() + Get params for this selector. Returns: mapping of string to any - parameter names mapped to their values - +```none +parameter names mapped to their values +``` #### predict(x: ndarray) + Predict the results using sparsified coefficients. * **Parameters** - - **x** (*np.ndarray*) – design matrix - +**x** (*np.ndarray*) – design matrix Returns: ndarray - #### select(x: np.ndarray, y: np.ndarray, options: dict | None = None) + Select feature indices from x :param x: MxN input data array :type x: np.ndarray @@ -801,41 +744,36 @@ Select feature indices from x Returns: list of int indices. - #### set_params(\*\*params) + Set the parameters of this selector :param \*\*params: dict :param Selector parameters.: * **Returns** - - selector instance - +selector instance * **Return type** +self - self - +### *class* maml.apps.symbolic._selectors.DantzigSelector(lambd, sigma=1.0, \*\*kwargs) - -### _class_ maml.apps.symbolic._selectors.DantzigSelector(lambd, sigma=1.0, \*\*kwargs) Bases: `BaseSelector` Equation 11 in [https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf](https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf) and reference in [https://projecteuclid.org/download/pdfview_1/euclid.aos/1201012958](https://projecteuclid.org/download/pdfview_1/euclid.aos/1201012958). - #### construct_constraints(x: np.ndarray, y: np.ndarray, beta: np.ndarray | None = None) + Get constraints dictionary from data, e.g., {“func”: lambda beta: fun(x, y, beta), “type”: “ineq”}. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -844,33 +782,29 @@ Get constraints dictionary from data, e.g., * **beta** (*np.ndarray*) – placeholder - Returns: dict of constraints. - #### construct_jac(x: ndarray, y: ndarray) + Jacobian of cost functions. * **Parameters** - * **x** – ndarray * **y** – ndarray - Returns: callable - #### construct_loss(x, y, beta) + Get loss function from data and tentative coefficients beta. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -879,11 +813,10 @@ Get loss function from data and tentative coefficients beta. * **beta** (*np.ndarray*) – N coefficients - Returns: loss value. +### *class* maml.apps.symbolic._selectors.L0BrutalForce(lambd: float, \*\*kwargs) -### _class_ maml.apps.symbolic._selectors.L0BrutalForce(lambd: float, \*\*kwargs) Bases: `BaseSelector` Brutal force combinatorial screening of features. @@ -892,20 +825,19 @@ and optimize the following loss function > 1/2 \* mean((y-x @ beta)\*\*2) + lambd \* -> ``` +> ```default > | > ``` > beta|_0. - #### select(x: np.ndarray, y: np.ndarray, options: dict | None = None, n_job: int = 1) + L0 combinatorial optimization. * **Parameters** - * **x** (*np.ndarray*) – design matrix @@ -917,25 +849,23 @@ L0 combinatorial optimization. * **n_job** (*int*) – number of cpu - Returns: +### *class* maml.apps.symbolic._selectors.Lasso(lambd, \*\*kwargs) -### _class_ maml.apps.symbolic._selectors.Lasso(lambd, \*\*kwargs) Bases: `PenalizedLeastSquares` Simple Lasso regression. - #### _penalty_jac(x, y, beta) #### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) + Calculate the penalty from input x, output y and coefficient beta. * **Parameters** - * **beta** (*np.ndarray*) – N coefficients @@ -944,22 +874,21 @@ Calculate the penalty from input x, output y and coefficient beta. * **y** (*np.ndarray*) – M output targets - Returns: penalty value. +### *class* maml.apps.symbolic._selectors.PenalizedLeastSquares(coef_thres: float = 1e-06, method: str = ‘SLSQP’) -### _class_ maml.apps.symbolic._selectors.PenalizedLeastSquares(coef_thres: float = 1e-06, method: str = 'SLSQP') Bases: `BaseSelector` Penalized least squares. In addition to minimizing the sum of squares loss, it adds an additional penalty to the coefficients. - #### _penalty_jac(x, y, beta) #### _sse_jac(x, y, beta) #### construct_constraints(x: np.ndarray, y: np.ndarray, beta: np.ndarray | None = None) + No constraints :param x: MxN input data array :type x: np.ndarray @@ -970,8 +899,8 @@ No constraints Returns: a list of dictionary constraints. - #### construct_jac(x: ndarray, y: ndarray) + Construct the jacobian of loss function :param x: MxN input data array :type x: np.ndarray @@ -980,8 +909,8 @@ Construct the jacobian of loss function Returns: jacobian vector. - #### construct_loss(x: ndarray, y: ndarray, beta: ndarray) + Construct the loss function. An extra penalty term is added :param x: MxN input data array :type x: np.ndarray @@ -992,8 +921,8 @@ Construct the loss function. An extra penalty term is added Returns: sum of errors. - #### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) + Calculate the penalty from input x, output y and coefficient beta :param x: MxN input data array :type x: np.ndarray @@ -1004,25 +933,26 @@ Calculate the penalty from input x, output y and coefficient beta Returns: penalty value. +### *class* maml.apps.symbolic._selectors.SCAD(lambd: float | np.ndarray, a: float = 3.7, \*\*kwargs) -### _class_ maml.apps.symbolic._selectors.SCAD(lambd: float | np.ndarray, a: float = 3.7, \*\*kwargs) Bases: `PenalizedLeastSquares` Smoothly clipped absolute deviation (SCAD), equation 12 and 13 in [https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf](https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf). - #### _penalty_jac(x, y, beta) #### penalty(beta: np.ndarray, x: np.ndarray | None = None, y: np.ndarray | None = None) + Calculate the SCAD penalty from input x, output y - and coefficient beta +```none +and coefficient beta +``` * **Parameters** - * **beta** (*np.ndarray*) – N coefficients @@ -1031,7 +961,6 @@ Calculate the SCAD penalty from input x, output y * **y** (*np.ndarray*) – M output targets - Returns: penalty value. ## maml.apps.symbolic._selectors_cvxpy module @@ -1039,15 +968,15 @@ Returns: penalty value. This module implements more robust optimization using the cvxpy package. +### *class* maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP(lambd, gamma, \*\*kwargs) -### _class_ maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP(lambd, gamma, \*\*kwargs) Bases: `PenalizedLeastSquaresCP` Adaptive lasso regression using OLS coefficients as the root-n estimator coefficients. - #### get_w(x: ndarray, y: ndarray) + Get adaptive weights from data :param x: MxN input data array :type x: np.ndarray @@ -1056,8 +985,8 @@ Get adaptive weights from data Returns: coefficients array. - #### penalty(beta: cp.Variable, x: np.ndarray | None = None, y: np.ndarray | None = None) + Calculate the penalty from input x, output y and coefficient beta :param x: MxN input data array :type x: np.ndarray @@ -1068,8 +997,8 @@ Calculate the penalty from input x, output y and coefficient beta Returns: penalty value. - #### select(x: np.ndarray, y: np.ndarray, options: dict | None = None) + Select feature indices from x :param x: MxN input data array :type x: np.ndarray @@ -1080,21 +1009,20 @@ Select feature indices from x Returns: array int indices. +### *class* maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP(coef_thres: float = 1e-06, method: str = ‘ECOS’) -### _class_ maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP(coef_thres: float = 1e-06, method: str = 'ECOS') Bases: `BaseSelector` Base selector using cvxpy (CP). - #### construct_constraints(x: np.ndarray, y: np.ndarray, beta: cp.Variable | None = None) + Get constraints dictionary from data, e.g., {“func”: lambda beta: fun(x, y, beta), “type”: “ineq”}. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -1103,11 +1031,10 @@ Get constraints dictionary from data, e.g., * **beta** – (np.ndarray): target variable for optimization - Returns: dict of constraints. - #### construct_loss(x: np.ndarray, y: np.ndarray, beta: cp.Variable) + Get loss function from data and tentative coefficients beta :param x: MxN input data array :type x: np.ndarray @@ -1118,8 +1045,8 @@ Get loss function from data and tentative coefficients beta Returns: loss value. - #### select(x: np.ndarray, y: np.ndarray, options: dict | None = None) + Select feature indices from x :param x: MxN input data array :type x: np.ndarray @@ -1130,16 +1057,16 @@ Select feature indices from x Returns: list of int indices. +### *class* maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP(lambd, sigma=1.0, \*\*kwargs) -### _class_ maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP(lambd, sigma=1.0, \*\*kwargs) Bases: `BaseSelectorCP` Equation 11 in [https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf](https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf) and reference in [https://projecteuclid.org/download/pdfview_1/euclid.aos/1201012958](https://projecteuclid.org/download/pdfview_1/euclid.aos/1201012958). - #### construct_constraints(x: np.ndarray, y: np.ndarray, beta: cp.Variable | None = None) + Dantzig selector constraints :param x: MxN input data array :type x: np.ndarray @@ -1150,8 +1077,8 @@ Dantzig selector constraints Returns: List of constraints. - #### construct_loss(x: np.ndarray, y: np.ndarray, beta: cp.Variable) + L1 loss :param x: MxN input data array :type x: np.ndarray @@ -1162,14 +1089,14 @@ L1 loss Returns: loss expression. +### *class* maml.apps.symbolic._selectors_cvxpy.LassoCP(lambd, \*\*kwargs) -### _class_ maml.apps.symbolic._selectors_cvxpy.LassoCP(lambd, \*\*kwargs) Bases: `PenalizedLeastSquaresCP` Simple Lasso regression. - #### penalty(beta: cp.Variable, x: np.ndarray | None = None, y: np.ndarray | None = None) + Calculate the penalty from input x, output y and coefficient beta :param x: MxN input data array :type x: np.ndarray @@ -1180,15 +1107,15 @@ Calculate the penalty from input x, output y and coefficient beta Returns: penalty value. +### *class* maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP(coef_thres: float = 1e-06, method: str = ‘ECOS’) -### _class_ maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP(coef_thres: float = 1e-06, method: str = 'ECOS') Bases: `BaseSelectorCP` Penalized least squares. In addition to minimizing the sum of squares loss, it adds an additional penalty to the coefficients. - #### construct_loss(x: np.ndarray, y: np.ndarray, beta: cp.Variable) + L1 loss :param x: MxN input data array :type x: np.ndarray @@ -1199,8 +1126,8 @@ L1 loss Returns: loss expression. - #### penalty(beta: cp.Variable, x: np.ndarray | None = None, y: np.ndarray | None = None) + Calculate the penalty from input x, output y and coefficient beta :param x: MxN input data array :type x: np.ndarray @@ -1217,20 +1144,19 @@ Sure Independence Screening. [https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf](https://orfe.princeton.edu/~jqfan/papers/06/SIS.pdf) +### *class* maml.apps.symbolic._sis.ISIS(sis: SIS | None = None, l0_regulate: bool = True) -### _class_ maml.apps.symbolic._sis.ISIS(sis: SIS | None = None, l0_regulate: bool = True) Bases: `object` Iterative SIS. +#### evaluate(x: ndarray, y: ndarray, metric: str = ‘neg_mean_absolute_error’) -#### evaluate(x: ndarray, y: ndarray, metric: str = 'neg_mean_absolute_error') Evaluate the linear models using x, and y test data. * **Parameters** - * **x** (*np.ndarray*) – MxN input data array @@ -1238,13 +1164,12 @@ Evaluate the linear models using x, and y test data. * **metric** (*str*) – scorer function, used with - sklearn.metrics.get_scorer - +sklearn.metrics.get_scorer Returns: float. +#### run(x: np.ndarray, y: np.ndarray, max_p: int = 10, metric: str = ‘neg_mean_absolute_error’, options: dict | None = None, step: float = 0.5) -#### run(x: np.ndarray, y: np.ndarray, max_p: int = 10, metric: str = 'neg_mean_absolute_error', options: dict | None = None, step: float = 0.5) Run the ISIS :param x: input array :type x: np.ndarray @@ -1259,28 +1184,22 @@ Run the ISIS * **Parameters** - * **options** – * **step** (*float*) – step to update gamma with. - * **Returns** - - np.array of index of selected features - coeff(np.array): np.array of coeff of selected features - +np.array of index of selected features +coeff(np.array): np.array of coeff of selected features * **Return type** +find_sel(np.array) - find_sel(np.array) - +### *class* maml.apps.symbolic._sis.SIS(gamma=0.1, selector: BaseSelector | None = None, verbose: bool = True) - -### _class_ maml.apps.symbolic._sis.SIS(gamma=0.1, selector: BaseSelector | None = None, verbose: bool = True) Bases: `object` Sure independence screening method. @@ -1289,11 +1208,11 @@ The method consists of two steps: > > 1. Screen - -> 2. Select. - +> +> 1. Select. #### compute_residual(x, y) + Compute residual :param x: input array :type x: np.ndarray @@ -1302,8 +1221,8 @@ Compute residual Returns: residual vector - #### run(x, y, select_options=None) + Run the SIS with selector :param x: MxN input data array :type x: np.ndarray @@ -1316,25 +1235,23 @@ Run the SIS with selector Returns: selected feature indices - #### screen(x, y) + Simple screening method by comparing the correlation between features and the target. * **Parameters** - * **x** (*np.ndarray*) – input array * **y** (*np.ndarray*) – target array - Returns: top indices - #### select(x, y, options=None) + Select features using selectors :param x: input array :type x: np.ndarray @@ -1343,35 +1260,30 @@ Select features using selectors :param options: options for the optimization. :type options: dict - #### set_gamma(gamma) + Set gamma. * **Parameters** - - **gamma** (*float*) – new gamma value - - +**gamma** (*float*) – new gamma value #### set_selector(selector: BaseSelector) + Set new selector :param selector: a feature selector. :type selector: BaseSelector - #### update_gamma(ratio: float = 0.5) + Update the sis object so that sis.select return at least one feature. * **Parameters** +**ratio** (*float*) – ratio to update the parameters - **ratio** (*float*) – ratio to update the parameters - - - -### maml.apps.symbolic._sis._best_combination(x, y, find_sel, find_sel_new, metric: str = 'neg_mean_absolute_error') +### maml.apps.symbolic._sis._best_combination(x, y, find_sel, find_sel_new, metric: str = ‘neg_mean_absolute_error’) ### maml.apps.symbolic._sis._eval(x, y, coeff, metric) diff --git a/docs/maml.base.md b/docs/maml.base.md index a5add2a3..0c8a00f7 100644 --- a/docs/maml.base.md +++ b/docs/maml.base.md @@ -8,18 +8,18 @@ nav_exclude: true Define abstract base classes. +## *class* maml.base.BaseDataSource() -### _class_ maml.base.BaseDataSource() Bases: `object` Abstract base class for a data source. +### *abstract* get(\*args, \*\*kwargs) -#### _abstract_ get(\*args, \*\*kwargs) Get data from sources. +## *class* maml.base.BaseDescriber(\*\*kwargs) -### _class_ maml.base.BaseDescriber(\*\*kwargs) Bases: `BaseEstimator`, `TransformerMixin`, `MSONable` Base class for a Describer. A describers converts an object to a descriptor, @@ -27,130 +27,117 @@ typically a numerical representation useful for machine learning. The output for the describers can be a single DataFrame/numpy.ndarray or a list of DataFrame/numpy.ndarray. +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### _is_multi_output() -#### _is_multi_output() +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### clear_cache() -#### clear_cache() Clear cache. +### *property* feature_dim() -#### _property_ feature_dim() Feature dimension, useful when certain models need to specify the feature dimension, e.g., MLP models. +### fit(x: Any, y: Any | None = None) -#### fit(x: Any, y: Any | None = None) Place holder for fit API. * **Parameters** - * **x** – Any inputs * **y** – Any outputs - Returns: self +### transform(objs: list[Any]) -#### transform(objs: list[Any]) Transform a list of objs. If the return data is DataFrame, use df.xs(index, level=’input_index’) to get the result for the i-th object. * **Parameters** - - **objs** (*list*) – A list of objects. - +**objs** (*list*) – A list of objects. * **Returns** +One or a list of pandas data frame/numpy ndarray - One or a list of pandas data frame/numpy ndarray - +### transform_one(obj: Any) - -#### transform_one(obj: Any) Transform an object. +## *class* maml.base.BaseModel(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.base.BaseModel(model, describer: BaseDescriber | None = None, \*\*kwargs) Bases: `object` Abstract Base class for a Model. Basically, it usually wraps around a deep learning package, e.g., the Sequential Model in Keras, but provides for transparent conversion of arbitrary input and outputs. +### _predict(features: ndarray, \*\*kwargs) -#### _predict(features: ndarray, \*\*kwargs) Predict the values given a set of inputs based on fitted models. * **Parameters** - - **features** (*np.ndarray*) – array-like input features. - +**features** (*np.ndarray*) – array-like input features. * **Returns** +List of output objects. - List of output objects. +### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) - -#### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) - * **Parameters** - - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **val_features** (*list** or **np.ndarray*) – validation features + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_targets** (*list** or **np.ndarray*) – validation targets. - + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. * **Returns** +self - self - - +### predict_objs(objs: list | np.ndarray) -#### predict_objs(objs: list | np.ndarray) Predict the values given a set of objects. Usually Pymatgen - Structure objects. +```none +Structure objects. +``` +### train(objs: list | np.ndarray, targets: list | np.ndarray | None = None, val_objs: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -#### train(objs: list | np.ndarray, targets: list | np.ndarray | None = None, val_objs: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) Train the models from object, target pairs. * **Parameters** - - * **objs** (*list** of **objects*) – List of objects + * **objs** (*list*\* of \**objects*) – List of objects * **targets** (*list*) – list of float or np.ndarray - * **val_objs** (*list** of **objects*) – list of validation objects + * **val_objs** (*list*\* of \**objects*) – list of validation objects * **val_targets** (*list*) – list of validation targets @@ -158,112 +145,106 @@ Train the models from object, target pairs. * **\*\*kwargs** – - Returns: self +## *class* maml.base.DummyDescriber(\*\*kwargs) -### _class_ maml.base.DummyDescriber(\*\*kwargs) Bases: `BaseDescriber` Dummy Describer that does nothing. +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### transform_one(obj: Any) -#### transform_one(obj: Any) Does nothing but return the original features. * **Parameters** - - **obj** – Any inputs - +**obj** – Any inputs Returns: Any outputs +## *class* maml.base.KerasModel(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.base.KerasModel(model, describer: BaseDescriber | None = None, \*\*kwargs) Bases: `BaseModel`, `KerasMixin` MAML models with keras models as estimators. +### *static* _get_validation_data(val_features, val_targets, \*\*val_kwargs) -#### _static_ _get_validation_data(val_features, val_targets, \*\*val_kwargs) construct validation data, the default is just returning a list of val_features and val_targets. +### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -#### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) * **Parameters** + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. - - - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **val_features** (*list** or **np.ndarray*) – validation features + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_targets** (*list** or **np.ndarray*) – validation targets. + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. * **Returns** +self - self +## *class* maml.base.SKLModel(model, describer: BaseDescriber | None = None, \*\*kwargs) - - -### _class_ maml.base.SKLModel(model, describer: BaseDescriber | None = None, \*\*kwargs) Bases: `BaseModel`, `SklearnMixin` MAML models with sklearn models as estimator. +## *class* maml.base.SequentialDescriber(describers: list, \*\*kwargs) -### _class_ maml.base.SequentialDescriber(describers: list, \*\*kwargs) Bases: `Pipeline` A thin wrapper of sklearn Pipeline. +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### steps(*: List[Any* ) -#### steps(_: List[Any_ ) +## *class* maml.base.TargetScalerMixin(\*args, \*\*kwargs) -### _class_ maml.base.TargetScalerMixin(\*args, \*\*kwargs) Bases: `object` Mixin class for models with target scaler. +### predict_objs(objs: list | np.ndarray) -#### predict_objs(objs: list | np.ndarray) Predict the values given a set of objects. Usually Pymatgen - Structure objects. +```none +Structure objects. +``` +### train(objs: list | np.ndarray, targets: list | np.ndarray | None = None, val_objs: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -#### train(objs: list | np.ndarray, targets: list | np.ndarray | None = None, val_objs: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) Train the models from object, target pairs. * **Parameters** - - * **objs** (*list** of **objects*) – List of objects + * **objs** (*list*\* of \**objects*) – List of objects * **targets** (*list*) – list of float or np.ndarray - * **val_objs** (*list** of **objects*) – list of validation objects + * **val_objs** (*list*\* of \**objects*) – list of validation objects * **val_targets** (*list*) – list of validation targets @@ -271,70 +252,64 @@ Train the models from object, target pairs. * **\*\*kwargs** – - Returns: self +## maml.base.describer_type(dtype: str) -### maml.base.describer_type(dtype: str) Decorate to set describers class type. * **Parameters** - - **dtype** (*str*) – describers type, e.g., site, composition, structure etc. - +**dtype** (*str*) – describers type, e.g., site, composition, structure etc. * **Returns** +wrapped class - wrapped class - +## maml.base.get_feature_batch(fb_name: str | Callable | None = None) - -### maml.base.get_feature_batch(fb_name: str | Callable | None = None) Providing a feature batch name, returning the function callable :param fb_name: name of the feature batch function :type fb_name: str Returns: callable feature batch function. +## maml.base.is_keras_model(model: BaseModel) -### maml.base.is_keras_model(model: BaseModel) Check whether the model is keras :param model: model :type model: BaseModel Returns: bool. +## maml.base.is_sklearn_model(model: BaseModel) -### maml.base.is_sklearn_model(model: BaseModel) Check whether the model is sklearn :param model: model :type model: BaseModel Returns: bool. - ## maml.base._data module MAML data base classes. +### *class* maml.base._data.BaseDataSource() -### _class_ maml.base._data.BaseDataSource() Bases: `object` Abstract base class for a data source. +#### *abstract* get(\*args, \*\*kwargs) -#### _abstract_ get(\*args, \*\*kwargs) Get data from sources. ## maml.base._describer module MAML describers base classes. +### *class* maml.base._describer.BaseDescriber(\*\*kwargs) -### _class_ maml.base._describer.BaseDescriber(\*\*kwargs) Bases: `BaseEstimator`, `TransformerMixin`, `MSONable` Base class for a Describer. A describers converts an object to a descriptor, @@ -342,148 +317,132 @@ typically a numerical representation useful for machine learning. The output for the describers can be a single DataFrame/numpy.ndarray or a list of DataFrame/numpy.ndarray. - -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *abc_impl(* = <_abc.*abc_data object* ) #### _is_multi_output() -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) #### clear_cache() + Clear cache. +#### *property* feature_dim() -#### _property_ feature_dim() Feature dimension, useful when certain models need to specify the feature dimension, e.g., MLP models. - #### fit(x: Any, y: Any | None = None) + Place holder for fit API. * **Parameters** - * **x** – Any inputs * **y** – Any outputs - Returns: self - #### transform(objs: list[Any]) + Transform a list of objs. If the return data is DataFrame, use df.xs(index, level=’input_index’) to get the result for the i-th object. * **Parameters** - - **objs** (*list*) – A list of objects. - +**objs** (*list*) – A list of objects. * **Returns** - - One or a list of pandas data frame/numpy ndarray - - +One or a list of pandas data frame/numpy ndarray #### transform_one(obj: Any) + Transform an object. +### *class* maml.base._describer.DummyDescriber(\*\*kwargs) -### _class_ maml.base._describer.DummyDescriber(\*\*kwargs) Bases: `BaseDescriber` Dummy Describer that does nothing. +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) #### transform_one(obj: Any) + Does nothing but return the original features. * **Parameters** - - **obj** – Any inputs - +**obj** – Any inputs Returns: Any outputs +### *class* maml.base._describer.SequentialDescriber(describers: list, \*\*kwargs) -### _class_ maml.base._describer.SequentialDescriber(describers: list, \*\*kwargs) Bases: `Pipeline` A thin wrapper of sklearn Pipeline. +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) - -#### steps(_: List[Any_ ) +#### steps(*: List[Any* ) ### maml.base._describer._transform_one(describer: BaseDescriber, obj: Any) + A wrapper to make a pure function. * **Parameters** - - **describer** (*BaseDescriber*) – a describers - +**describer** (*BaseDescriber*) – a describers * **Returns** - - np.ndarray - - +np.ndarray ### maml.base._describer.describer_type(dtype: str) + Decorate to set describers class type. * **Parameters** - - **dtype** (*str*) – describers type, e.g., site, composition, structure etc. - +**dtype** (*str*) – describers type, e.g., site, composition, structure etc. * **Returns** - - wrapped class - +wrapped class ## maml.base._feature_batch module Batch a list of features output by describers.transform method. - ### maml.base._feature_batch.get_feature_batch(fb_name: str | Callable | None = None) + Providing a feature batch name, returning the function callable :param fb_name: name of the feature batch function :type fb_name: str Returns: callable feature batch function. - ### maml.base._feature_batch.no_action(features: list[Any]) -Return original feature lists. +Return original feature lists. ### maml.base._feature_batch.pandas_concat(features: list[pandas.core.frame.DataFrame]) + Concatenate a list of pandas dataframe into a single one :param features: list of pandas dataframe. :type features: list Returns: concatenated pandas dataframe - ### maml.base._feature_batch.stack_first_dim(features: list[numpy.ndarray]) + Stack the first dimension. If the original features are a list of nxm array, the stacked features will be lxnxm, where l is the number of entries in the list @@ -492,8 +451,8 @@ where l is the number of entries in the list Returns: stacked features - ### maml.base._feature_batch.stack_padded(features: list[numpy.ndarray]) + Stack the first dimension. If the original features are a list of nxm array, the stacked features will be lxnxm, where l is the number of entries in the list @@ -506,33 +465,34 @@ Returns: stacked features Model mixins. +### *class* maml.base._mixin.TargetScalerMixin(\*args, \*\*kwargs) -### _class_ maml.base._mixin.TargetScalerMixin(\*args, \*\*kwargs) Bases: `object` Mixin class for models with target scaler. - #### predict_objs(objs: list | np.ndarray) -Predict the values given a set of objects. Usually Pymatgen - Structure objects. +Predict the values given a set of objects. Usually Pymatgen +```none +Structure objects. +``` #### train(objs: list | np.ndarray, targets: list | np.ndarray | None = None, val_objs: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) + Train the models from object, target pairs. * **Parameters** - - * **objs** (*list** of **objects*) – List of objects + * **objs** (*list*\* of \**objects*) – List of objects * **targets** (*list*) – list of float or np.ndarray - * **val_objs** (*list** of **objects*) – list of validation objects + * **val_objs** (*list*\* of \**objects*) – list of validation objects * **val_targets** (*list*) – list of validation targets @@ -540,85 +500,77 @@ Train the models from object, target pairs. * **\*\*kwargs** – - Returns: self ## maml.base._model module MAML models base classes. +### *class* maml.base._model.BaseModel(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.base._model.BaseModel(model, describer: BaseDescriber | None = None, \*\*kwargs) Bases: `object` Abstract Base class for a Model. Basically, it usually wraps around a deep learning package, e.g., the Sequential Model in Keras, but provides for transparent conversion of arbitrary input and outputs. - #### _predict(features: ndarray, \*\*kwargs) + Predict the values given a set of inputs based on fitted models. * **Parameters** - - **features** (*np.ndarray*) – array-like input features. - +**features** (*np.ndarray*) – array-like input features. * **Returns** - - List of output objects. - - +List of output objects. #### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -* **Parameters** +* **Parameters** - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. - + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **val_features** (*list** or **np.ndarray*) – validation features + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_targets** (*list** or **np.ndarray*) – validation targets. + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. * **Returns** - - self - - +self #### predict_objs(objs: list | np.ndarray) -Predict the values given a set of objects. Usually Pymatgen - Structure objects. +Predict the values given a set of objects. Usually Pymatgen +```none +Structure objects. +``` #### train(objs: list | np.ndarray, targets: list | np.ndarray | None = None, val_objs: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) + Train the models from object, target pairs. * **Parameters** - - * **objs** (*list** of **objects*) – List of objects + * **objs** (*list*\* of \**objects*) – List of objects * **targets** (*list*) – list of float or np.ndarray - * **val_objs** (*list** of **objects*) – list of validation objects + * **val_objs** (*list*\* of \**objects*) – list of validation objects * **val_targets** (*list*) – list of validation targets @@ -626,23 +578,21 @@ Train the models from object, target pairs. * **\*\*kwargs** – - Returns: self +### *class* maml.base._model.KerasMixin() -### _class_ maml.base._model.KerasMixin() Bases: `object` keras models mixin with save and load functionality. - #### evaluate(eval_objs: list | np.ndarray, eval_targets: list | np.ndarray, is_feature: bool = False) + Evaluate objs, targets. * **Parameters** - * **eval_objs** (*list*) – objs for evaluation @@ -654,9 +604,8 @@ Evaluate objs, targets. * **metric** (*callable*) – metric for evaluation +#### *classmethod* from_file(filename: str, \*\*kwargs) - -#### _classmethod_ from_file(filename: str, \*\*kwargs) Load the models from file :param filename: filename :type filename: str @@ -664,96 +613,87 @@ Load the models from file Returns: object instance +#### *static* get_input_dim(describer: BaseDescriber | None = None, input_dim: int | None = None) -#### _static_ get_input_dim(describer: BaseDescriber | None = None, input_dim: int | None = None) Get feature dimension/input_dim from describers or input_dim. * **Parameters** - * **describer** (*Describer*) – describers * **input_dim** (*int*) – optional input dim int - - #### load(filename: str, custom_objects: list | None = None) + Load models parameters from filename :param filename: models file name. :type filename: str Returns: None - #### save(filename: str) + Save the models and describers. * **Parameters** +**filename** (*str*) – filename for save - **filename** (*str*) – filename for save - +### *class* maml.base._model.KerasModel(model, describer: BaseDescriber | None = None, \*\*kwargs) - -### _class_ maml.base._model.KerasModel(model, describer: BaseDescriber | None = None, \*\*kwargs) Bases: `BaseModel`, `KerasMixin` MAML models with keras models as estimators. +#### *static* _get_validation_data(val_features, val_targets, \*\*val_kwargs) -#### _static_ _get_validation_data(val_features, val_targets, \*\*val_kwargs) construct validation data, the default is just returning a list of val_features and val_targets. - #### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -* **Parameters** - - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. +* **Parameters** + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **val_features** (*list** or **np.ndarray*) – validation features + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_targets** (*list** or **np.ndarray*) – validation targets. + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. * **Returns** +self - self - - +### *class* maml.base._model.SKLModel(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.base._model.SKLModel(model, describer: BaseDescriber | None = None, \*\*kwargs) Bases: `BaseModel`, `SklearnMixin` MAML models with sklearn models as estimator. +### *class* maml.base._model.SklearnMixin() -### _class_ maml.base._model.SklearnMixin() Bases: `object` Sklearn models save and load functionality. - #### evaluate(eval_objs: list | np.ndarray, eval_targets: list | np.ndarray, is_feature: bool = False, metric: str | Callable | None = None) + Evaluate objs, targets. * **Parameters** - * **eval_objs** (*list*) – objs for evaluation @@ -765,9 +705,8 @@ Evaluate objs, targets. * **metric** (*callable*) – metric for evaluation +#### *classmethod* from_file(filename: str, \*\*kwargs) - -#### _classmethod_ from_file(filename: str, \*\*kwargs) Load the models from file :param filename: filename :type filename: str @@ -775,34 +714,32 @@ Load the models from file Returns: object instance - #### load(filename: str) + Load models parameters from filename :param filename: models file name. :type filename: str Returns: None - #### save(filename: str) + Save the models and describers. * **Parameters** - - **filename** (*str*) – filename for save - - +**filename** (*str*) – filename for save ### maml.base._model.is_keras_model(model: BaseModel) + Check whether the model is keras :param model: model :type model: BaseModel Returns: bool. - ### maml.base._model.is_sklearn_model(model: BaseModel) + Check whether the model is sklearn :param model: model :type model: BaseModel diff --git a/docs/maml.data.md b/docs/maml.data.md index 84dd7d68..661065f2 100644 --- a/docs/maml.data.md +++ b/docs/maml.data.md @@ -8,119 +8,101 @@ nav_exclude: true Get data from various sources. +## *class* maml.data.MaterialsProject(api_key: str | None = None) -### _class_ maml.data.MaterialsProject(api_key: str | None = None) -Bases: [`BaseDataSource`](maml.base.md#maml.base._data.BaseDataSource) +Bases: `BaseDataSource` Query the Materials Project for Data. +### get(criteria: str | dict, properties: list[str]) -#### get(criteria: str | dict, properties: list[str]) * **Parameters** - - * **criteria** (*str** or **dict*) – Criteria for query + * **criteria** (*str*\* or \**dict*) – Criteria for query * **properties** (*list*) – Properties to be queried. - * **Returns** +pandas DataFrame - pandas DataFrame - +## *class* maml.data.URLSource(fmt: str = ‘csv’, read_kwargs=None) - -### _class_ maml.data.URLSource(fmt: str = 'csv', read_kwargs=None) -Bases: [`BaseDataSource`](maml.base.md#maml.base._data.BaseDataSource) +Bases: `BaseDataSource` Load raw data from a URL, e.g., figshare. +### get(url: str) -#### get(url: str) Get url data source. * **Parameters** - - **url** – URL to obtain raw data from. - +**url** – URL to obtain raw data from. * **Returns** - - pd.DataFrame - - +pd.DataFrame ## maml.data._mp module Materials Project DataSource. +### *class* maml.data._mp.MaterialsProject(api_key: str | None = None) -### _class_ maml.data._mp.MaterialsProject(api_key: str | None = None) -Bases: [`BaseDataSource`](maml.base.md#maml.base._data.BaseDataSource) +Bases: `BaseDataSource` Query the Materials Project for Data. - #### get(criteria: str | dict, properties: list[str]) -* **Parameters** +* **Parameters** - * **criteria** (*str** or **dict*) – Criteria for query + * **criteria** (*str*\* or \**dict*) – Criteria for query * **properties** (*list*) – Properties to be queried. - * **Returns** - - pandas DataFrame - +pandas DataFrame ## maml.data._url module Get data from url. +### *class* maml.data._url.FigshareSource(fmt: str = ‘csv’, read_kwargs=None) -### _class_ maml.data._url.FigshareSource(fmt: str = 'csv', read_kwargs=None) Bases: `URLSource` Load data from figshare. - #### get(file_id: str) + Get data from Figshare :param file_id: file id. * **Returns** +data frame - data frame - +### *class* maml.data._url.URLSource(fmt: str = ‘csv’, read_kwargs=None) - -### _class_ maml.data._url.URLSource(fmt: str = 'csv', read_kwargs=None) -Bases: [`BaseDataSource`](maml.base.md#maml.base._data.BaseDataSource) +Bases: `BaseDataSource` Load raw data from a URL, e.g., figshare. - #### get(url: str) + Get url data source. * **Parameters** - - **url** – URL to obtain raw data from. - +**url** – URL to obtain raw data from. * **Returns** - - pd.DataFrame \ No newline at end of file +pd.DataFrame \ No newline at end of file diff --git a/docs/maml.describers.md b/docs/maml.describers.md index e5e93e85..e4a22ed7 100644 --- a/docs/maml.describers.md +++ b/docs/maml.describers.md @@ -9,9 +9,9 @@ nav_exclude: true Describer for converting (structural) objects into models-readable numeric vectors or tensors. +## *class* maml.describers.BPSymmetryFunctions(cutoff: float, r_etas: ndarray, r_shift: ndarray, a_etas: ndarray, zetas: ndarray, lambdas: ndarray, feature_batch: str = ‘pandas_concat’, \*\*kwargs) -### _class_ maml.describers.BPSymmetryFunctions(cutoff: float, r_etas: ndarray, r_shift: ndarray, a_etas: ndarray, zetas: ndarray, lambdas: ndarray, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Behler-Parrinello symmetry function to describe the local environment of each atom. @@ -21,9 +21,11 @@ Reference: > title={Generalized neural-network representation of -> high-dimensional potential-energy surfaces}, +> ```none +> high-dimensional potential-energy surfaces}, +> ``` -> author={Behler, J{"o}rg and Parrinello, Michele}, +> author={Behler, J{“o}rg and Parrinello, Michele}, > journal={Physical review letters}, > volume={98}, > number={14}, @@ -31,33 +33,29 @@ Reference: > year={2007}, > publisher={APS}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### _fc(r: float) -#### _fc(r: float) Cutoff function to decay the symmetry functions at vicinity of radial cutoff. * **Parameters** +**r** (*float*) – The pair distance. - **r** (*float*) – The pair distance. - +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) +### describer_type(_ = ‘site_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### transform_one(structure: Structure) -#### describer_type(_ = 'site_ ) - -#### transform_one(structure: Structure) * **Parameters** +**structure** (*Structure*) – Pymatgen Structure object. - **structure** (*Structure*) – Pymatgen Structure object. +## *class* maml.describers.BispectrumCoefficients(rcutfac: float, twojmax: int, element_profile: dict, quadratic: bool = False, pot_fit: bool = False, include_stress: bool = False, feature_batch: str = ‘pandas_concat’, \*\*kwargs) - - -### _class_ maml.describers.BispectrumCoefficients(rcutfac: float, twojmax: int, element_profile: dict, quadratic: bool = False, pot_fit: bool = False, include_stress: bool = False, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Bispectrum coefficients to describe the local environment of each atom. Lammps is required to perform this computation. @@ -67,41 +65,43 @@ Reference: > title={Gaussian approximation potentials: The -> accuracy of quantum mechanics, without the electrons}, +> ```none +> accuracy of quantum mechanics, without the electrons}, +> ``` -> author={Bart{'o}k, Albert P and Payne, Mike C +> author={Bart{‘o}k, Albert P and Payne, Mike C -> and Kondor, Risi and Cs{'a}nyi, G{'a}bor}, +> ```none +> and Kondor, Risi and Cs{'a}nyi, G{'a}bor}, +> ``` > journal={Physical review letters}, > volume={104}, number={13}, pages={136403}, year={2010}, publisher={APS}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘site_ ) -#### describer_type(_ = 'site_ ) +### *property* feature_dim(*: int | Non* ) -#### _property_ feature_dim(_: int | Non_ ) Bispectrum feature dimension. +### *property* subscripts(*: lis* ) -#### _property_ subscripts(_: lis_ ) The subscripts (2j1, 2j2, 2j) of all bispectrum components involved. +### transform_one(structure: Structure) -#### transform_one(structure: Structure) * **Parameters** +**structure** (*Structure*) – Pymatgen Structure object. - **structure** (*Structure*) – Pymatgen Structure object. +## *class* maml.describers.CoulombEigenSpectrum(max_atoms: int | None = None, \*\*kwargs) - - -### _class_ maml.describers.CoulombEigenSpectrum(max_atoms: int | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Get the Coulomb Eigen Spectrum describers. @@ -110,35 +110,37 @@ Reference: > title={Fast and accurate modeling of molecular -> atomization energies with machine learning}, +> ```none +> atomization energies with machine learning}, +> ``` -> author={Rupp, Matthias and Tkatchenko, Alexandre and M{"u}ller, +> author={Rupp, Matthias and Tkatchenko, Alexandre and M{“u}ller, -> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ```none +> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ``` > journal={Physical review letters}, volume={108}, > number={5}, pages={058301}, > year={2012}, publisher={APS}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘structure_ ) -#### describer_type(_ = 'structure_ ) +### transform_one(mol: Molecule) -#### transform_one(mol: Molecule) * **Parameters** - - **mol** (*Molecule*) – pymatgen molecule. - +**mol** (*Molecule*) – pymatgen molecule. Returns: np.ndarray the eigen value vectors of Coulob matrix +## *class* maml.describers.CoulombMatrix(random_seed: int | None = None, max_atoms: int | None = None, is_ravel: bool = True, \*\*kwargs) -### _class_ maml.describers.CoulombMatrix(random_seed: int | None = None, max_atoms: int | None = None, is_ravel: bool = True, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Coulomb Matrix to describe structure. @@ -147,72 +149,64 @@ Reference: > title={Fast and accurate modeling of molecular -> atomization energies with machine learning}, +> ```none +> atomization energies with machine learning}, +> ``` -> author={Rupp, Matthias and Tkatchenko, Alexandre and M{"u}ller, +> author={Rupp, Matthias and Tkatchenko, Alexandre and M{“u}ller, -> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ```none +> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ``` > journal={Physical review letters}, volume={108}, > number={5}, pages={058301}, > year={2012}, publisher={APS}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *static* _get_columb_mat(s: Molecule | Structure) -#### _static_ _get_columb_mat(s: Molecule | Structure) * **Parameters** - - **s** (*Molecule/Structure*) – input Molecule or Structure. Structure - is not advised since the feature will depend on the supercell size. - +**s** (*Molecule/Structure*) – input Molecule or Structure. Structure +is not advised since the feature will depend on the supercell size. * **Returns** +Coulomb matrix of the structure - Coulomb matrix of the structure - +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) +### describer_type(_ = ‘structure_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### get_coulomb_mat(s: Molecule | Structure) -#### describer_type(_ = 'structure_ ) - -#### get_coulomb_mat(s: Molecule | Structure) * **Parameters** - - **s** (*Molecule/Structure*) – input Molecule or Structure. Structure - is not advised since the feature will depend on the supercell size - +**s** (*Molecule/Structure*) – input Molecule or Structure. Structure +is not advised since the feature will depend on the supercell size * **Returns** +Coulomb matrix of the structure. - Coulomb matrix of the structure. - +### transform_one(s: Molecule | Structure) -#### transform_one(s: Molecule | Structure) - * **Parameters** - - **s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not - advised since the features will depend on supercell size. - +**s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not +advised since the features will depend on supercell size. * **Returns** +pandas.DataFrame. +The column is index of the structure, which is 0 for single input +df[0] returns the serials of coulomb_mat raval - pandas.DataFrame. - The column is index of the structure, which is 0 for single input - df[0] returns the serials of coulomb_mat raval - - +## *class* maml.describers.DistinctSiteProperty(properties: list[str], symprec: float = 0.1, wyckoffs: list[str] | None = None, feature_batch: str = ‘pandas_concat’, \*\*kwargs) -### _class_ maml.describers.DistinctSiteProperty(properties: list[str], symprec: float = 0.1, wyckoffs: list[str] | None = None, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Constructs a describers based on properties of distinct sites in a structure. For now, this assumes that there is only one type of species in @@ -233,31 +227,27 @@ Reference: > year={2018}, > publisher={Nature Publishing Group}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘structure_ ) -#### describer_type(_ = 'structure_ ) +### supported_properties(_ = [‘mendeleev_no’, ‘electrical_resistivity’, ‘velocity_of_sound’, ‘reflectivity’, ‘refractive_index’, ‘poissons_ratio’, ‘molar_volume’, ‘thermal_conductivity’, ‘boiling_point’, ‘melting_point’, ‘critical_temperature’, ‘superconduction_temperature’, ‘liquid_range’, ‘bulk_modulus’, ‘youngs_modulus’, ‘brinell_hardness’, ‘rigidity_modulus’, ‘mineral_hardness’, ‘vickers_hardness’, ‘density_of_solid’, ‘atomic_radius_calculated’, ‘van_der_waals_radius’, ‘coefficient_of_linear_thermal_expansion’, ‘ground_state_term_symbol’, ‘valence’, ‘Z’, ‘X’, ‘atomic_mass’, ‘block’, ‘row’, ‘group’, ‘atomic_radius’, ‘average_ionic_radius’, ‘average_cationic_radius’, ‘average_anionic_radius’, ‘metallic_radius’, ‘ionic_radii’, ‘oxi_state’, ‘max_oxidation_state’, ‘min_oxidation_state’, ‘is_transition_metal’, ‘is_alkali’, ‘is_alkaline’, ‘is_chalcogen’, ‘is_halogen’, ‘is_lanthanoid’, ‘is_metal’, ‘is_metalloid’, ‘is_noble_gas’, ‘is_post_transition_metal’, ‘is_quadrupolar’, ‘is_rare_earth_metal’, ‘is_actinoid’_ ) -#### supported_properties(_ = ['mendeleev_no', 'electrical_resistivity', 'velocity_of_sound', 'reflectivity', 'refractive_index', 'poissons_ratio', 'molar_volume', 'thermal_conductivity', 'boiling_point', 'melting_point', 'critical_temperature', 'superconduction_temperature', 'liquid_range', 'bulk_modulus', 'youngs_modulus', 'brinell_hardness', 'rigidity_modulus', 'mineral_hardness', 'vickers_hardness', 'density_of_solid', 'atomic_radius_calculated', 'van_der_waals_radius', 'coefficient_of_linear_thermal_expansion', 'ground_state_term_symbol', 'valence', 'Z', 'X', 'atomic_mass', 'block', 'row', 'group', 'atomic_radius', 'average_ionic_radius', 'average_cationic_radius', 'average_anionic_radius', 'metallic_radius', 'ionic_radii', 'oxi_state', 'max_oxidation_state', 'min_oxidation_state', 'is_transition_metal', 'is_alkali', 'is_alkaline', 'is_chalcogen', 'is_halogen', 'is_lanthanoid', 'is_metal', 'is_metalloid', 'is_noble_gas', 'is_post_transition_metal', 'is_quadrupolar', 'is_rare_earth_metal', 'is_actinoid'_ ) +### transform_one(structure: Structure) -#### transform_one(structure: Structure) * **Parameters** - - **structure** (*pymatgen Structure*) – pymatgen structure for descriptor computation. - +**structure** (*pymatgen Structure*) – pymatgen structure for descriptor computation. * **Returns** +pd.DataFrame that contains the distinct position labeled features - pd.DataFrame that contains the distinct position labeled features - +## *class* maml.describers.ElementProperty(\*args, \*\*kwargs) - -### _class_ maml.describers.ElementProperty(\*args, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Class to calculate elemental property attributes. @@ -280,83 +270,74 @@ MatscholarElementData, etc.). * **Parameters** + * **data_source** (*AbstractData*\* or \**str*) – source from which to retrieve +element property data (or use str for preset: “pymatgen”, +“magpie”, or “deml”) - * **data_source** (*AbstractData** or **str*) – source from which to retrieve - element property data (or use str for preset: “pymatgen”, - “magpie”, or “deml”) - - - * **features** (*list** of **strings*) – List of elemental properties to use - (these must be supported by data_source) + * **features** (*list*\* of \**strings*) – List of elemental properties to use +(these must be supported by data_source) - * **stats** (*list** of **strings*) – a list of weighted statistics to compute to for each - property (see PropertyStats for available stats) + * **stats** (*list*\* of \**strings*) – a list of weighted statistics to compute to for each +property (see PropertyStats for available stats) +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *classmethod* _get_param_names() -#### _classmethod_ _get_param_names() Get parameter names for the estimator +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘composition_ ) -#### describer_type(_ = 'composition_ ) +### *classmethod* from_preset(name: str, \*\*kwargs) -#### _classmethod_ from_preset(name: str, \*\*kwargs) Wrap matminer_wrapper’s from_preset function. +### get_params(deep=False) -#### get_params(deep=False) Get parameters for this estimator. * **Parameters** - - **deep** (*bool**, **default=True*) – If True, will return the parameters for this estimator and - contained subobjects that are estimators. - +**deep** (*bool*\*, \**default=True*) – If True, will return the parameters for this estimator and +contained subobjects that are estimators. * **Returns** - - **params** – Parameter names mapped to their values. - +**params** – Parameter names mapped to their values. * **Return type** +dict - dict - - +### transform_one(obj: Any) -#### transform_one(obj: Any) Featurize to transform_one. +## *class* maml.describers.ElementStats(element_properties: dict, stats: list[str] | None = None, property_names: list[str] | None = None, feature_batch: str = ‘pandas_concat’, \*\*kwargs) -### _class_ maml.describers.ElementStats(element_properties: dict, stats: list[str] | None = None, property_names: list[str] | None = None, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Element statistics. The allowed stats are accessed via ALLOWED_STATS class attributes. If the stats have multiple parameters, the positional arguments are separated by ::, e.g., moment::1::None. +### ALLOWED_STATS(_ = [‘max’, ‘min’, ‘range’, ‘mode’, ‘mean_absolute_deviation’, ‘mean_absolute_error’, ‘moment’, ‘mean’, ‘inverse_mean’, ‘average’, ‘std’, ‘skewness’, ‘kurtosis’, ‘geometric_mean’, ‘power_mean’, ‘shifted_geometric_mean’, ‘harmonic_mean’_ ) -#### ALLOWED_STATS(_ = ['max', 'min', 'range', 'mode', 'mean_absolute_deviation', 'mean_absolute_error', 'moment', 'mean', 'inverse_mean', 'average', 'std', 'skewness', 'kurtosis', 'geometric_mean', 'power_mean', 'shifted_geometric_mean', 'harmonic_mean'_ ) +### AVAILABLE_DATA(_ = [‘megnet_1’, ‘megnet_3’, ‘megnet_l2’, ‘megnet_ion_l2’, ‘megnet_l3’, ‘megnet_ion_l3’, ‘megnet_l4’, ‘megnet_ion_l4’, ‘megnet_l8’, ‘megnet_ion_l8’, ‘megnet_l16’, ‘megnet_ion_l16’, ‘megnet_l32’, ‘megnet_ion_l32’_ ) -#### AVAILABLE_DATA(_ = ['megnet_1', 'megnet_3', 'megnet_l2', 'megnet_ion_l2', 'megnet_l3', 'megnet_ion_l3', 'megnet_l4', 'megnet_ion_l4', 'megnet_l8', 'megnet_ion_l8', 'megnet_l16', 'megnet_ion_l16', 'megnet_l32', 'megnet_ion_l32'_ ) +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *static* _reduce_dimension(element_properties, property_names, num_dim: int | None = None, reduction_algo: str | None = ‘pca’, reduction_params: dict | None = None) -#### _static_ _reduce_dimension(element_properties, property_names, num_dim: int | None = None, reduction_algo: str | None = 'pca', reduction_params: dict | None = None) Reduce the feature dimension by reduction_algo. * **Parameters** - * **element_properties** (*dict*) – dictionary of elemental/specie propeprties @@ -367,41 +348,38 @@ Reduce the feature dimension by reduction_algo. * **reduction_algo** (*str*) – algorithm for dimensional reduction, currently support - pca, kpca +pca, kpca * **reduction_params** (*dict*) – kwargs for reduction algorithm - Returns: new element_properties and property_names +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘composition_ ) -#### describer_type(_ = 'composition_ ) +### *classmethod* from_data(data_name: list[str] | str, stats: list[str] | None = None, \*\*kwargs) -#### _classmethod_ from_data(data_name: list[str] | str, stats: list[str] | None = None, \*\*kwargs) ElementalStats from existing data file. * **Parameters** - - * **data_name** (*str** of **list** of **str*) – data name. Current supported data are - available from ElementStats.AVAILABLE_DATA + * **data_name** (*str*\* of **list** of \**str*) – data name. Current supported data are +available from ElementStats.AVAILABLE_DATA * **stats** (*list*) – list of stats, use ElementStats.ALLOWED_STATS to - check available stats +check available stats * **\*\*kwargs** – Passthrough to class init. - Returns: ElementStats instance +### *classmethod* from_file(filename: str, stats: list[str] | None = None, \*\*kwargs) -#### _classmethod_ from_file(filename: str, stats: list[str] | None = None, \*\*kwargs) ElementStats from a json file of element property dictionary. The keys required are: @@ -412,53 +390,49 @@ The keys required are: * **Parameters** - * **filename** (*str*) – filename * **stats** (*list*) – list of stats, check ElementStats.ALLOWED_STATS - for supported stats. The stats that support additional - Keyword args, use ‘:’ to separate the args. For example, - ‘moment:0:None’ will calculate moment stats with order=0, - and max_order=None. +for supported stats. The stats that support additional +Keyword args, use ‘:’ to separate the args. For example, +‘moment:0:None’ will calculate moment stats with order=0, +and max_order=None. * **\*\*kwargs** – Passthrough to class init. - Returns: ElementStats class +### transform_one(obj: Structure | str | Composition) -#### transform_one(obj: Structure | str | Composition) Transform one object, the object can be string, Compostion or Structure. * **Parameters** - - **obj** (*str/Composition/Structure*) – object to transform - +**obj** (*str/Composition/Structure*) – object to transform Returns: pd.DataFrame with property names as column names +## *class* maml.describers.M3GNetStructure(model_path: str | None = None, \*\*kwargs) -### _class_ maml.describers.M3GNetStructure(model_path: str | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### transform_one(structure: Structure | Molecule) -#### transform_one(structure: Structure | Molecule) Transform structure/molecule objects into features :param structure: target object structure or molecule :type structure: Structure/Molecule Returns: np.array features. +## *class* maml.describers.MEGNetSite(name: str | object | None = None, level: int | None = None, \*\*kwargs) -### _class_ maml.describers.MEGNetSite(name: str | object | None = None, level: int | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Use megnet pre-trained models as featurizer to get atomic features. @@ -469,32 +443,32 @@ Reference: > author={Chen, Chi and Ye, Weike and Zuo, Yunxing and -> Zheng, Chen and Ong, Shyue Ping}, +> ```none +> Zheng, Chen and Ong, Shyue Ping}, +> ``` > journal={Chemistry of Materials}, volume={31}, number={9}, > pages={3564–3572}, year={2019},publisher={ACS Publications}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘site_ ) -#### describer_type(_ = 'site_ ) +### transform_one(obj: Structure | Molecule) -#### transform_one(obj: Structure | Molecule) Get megnet site features from structure object. * **Parameters** - - **obj** (*structure** or **molecule*) – pymatgen structure or molecules - +**obj** (*structure*\* or \**molecule*) – pymatgen structure or molecules Returns: +## *class* maml.describers.MEGNetStructure(name: str | object | None = None, mode: str = ‘site_stats’, level: int | None = None, stats: list | None = None, \*\*kwargs) -### _class_ maml.describers.MEGNetStructure(name: str | object | None = None, mode: str = 'site_stats', level: int | None = None, stats: list | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Use megnet pre-trained models as featurizer to get structural features. There are two methods to get structural descriptors from @@ -502,12 +476,14 @@ megnet models. mode: - ‘site_stats’: Calculate the site features, and then use maml.utils.stats to compute the feature-wise +```none +‘site_stats’: Calculate the site features, and then use maml.utils.stats to compute the feature-wise - statistics. This requires the specification of level + statistics. This requires the specification of level - ‘site_readout’: Use the atomic features at the readout stage - ‘final’: Use the concatenated atom, bond and global features +‘site_readout’: Use the atomic features at the readout stage +‘final’: Use the concatenated atom, bond and global features +``` Reference: @article{chen2019graph,title={Graph networks as a universal machine @@ -516,62 +492,59 @@ Reference: > author={Chen, Chi and Ye, Weike and Zuo, Yunxing and -> Zheng, Chen and Ong, Shyue Ping}, +> ```none +> Zheng, Chen and Ong, Shyue Ping}, +> ``` > journal={Chemistry of Materials}, volume={31}, number={9}, > pages={3564–3572}, year={2019},publisher={ACS Publications}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘structure_ ) -#### describer_type(_ = 'structure_ ) +### transform_one(obj: Structure | Molecule) -#### transform_one(obj: Structure | Molecule) Transform structure/molecule objects into features :param obj: target object structure or molecule. :type obj: Structure/Molecule Returns: pd.DataFrame features +## *class* maml.describers.RadialDistributionFunction(r_min: float = 0.0, r_max: float = 10.0, n_grid: int = 101, sigma: float = 0.0) -### _class_ maml.describers.RadialDistributionFunction(r_min: float = 0.0, r_max: float = 10.0, n_grid: int = 101, sigma: float = 0.0) Bases: `object` Calculator for radial distribution function. +### *static* _get_specie_density(structure: Structure) -#### _static_ _get_specie_density(structure: Structure) +### get_site_coordination(structure: Structure) -#### get_site_coordination(structure: Structure) Get site wise coordination :param structure: pymatgen Structure. :type structure: Structure Returns: r, cns where cns is a list of dictionary with specie_pair: pair_cn key:value pairs +### get_site_rdf(structure: Structure) -#### get_site_rdf(structure: Structure) * **Parameters** - - **structure** (*Structure*) – pymatgen structure - +**structure** (*Structure*) – pymatgen structure * **Returns** +r, rdfs, r is the radial points, and rdfs are a list of rdf dicts +rdfs[0] is the rdfs of the first site. It is a dictionary of {atom_pair: pair_rdf} +e.g., - r, rdfs, r is the radial points, and rdfs are a list of rdf dicts - rdfs[0] is the rdfs of the first site. It is a dictionary of {atom_pair: pair_rdf} - e.g., - - > {“Sr:O”: [0, 0, 0.1, 0.2, ..]}. - +> {“Sr:O”: [0, 0, 0.1, 0.2, ..]}. +### get_species_coordination(structure: Structure, ref_species: list | None = None, species: list | None = None) - -#### get_species_coordination(structure: Structure, ref_species: list | None = None, species: list | None = None) Get specie-wise coordination number :param structure: target structure :type structure: Structure @@ -581,15 +554,13 @@ Get specie-wise coordination number * **Parameters** - - **species** (*list** of **species** or **just single specie str*) – the species that we are interested in. - The rdfs are calculated on these species. - +**species** (*list*\* of **species** or \**just single specie str*) – the species that we are interested in. +The rdfs are calculated on these species. Returns: +### get_species_rdf(structure: Structure, ref_species: list | None = None, species: list | None = None) -#### get_species_rdf(structure: Structure, ref_species: list | None = None, species: list | None = None) Get specie-wise rdf :param structure: target structure :type structure: Structure @@ -599,15 +570,13 @@ Get specie-wise rdf * **Parameters** - - **species** (*list** of **species** or **just single specie str*) – the species that we are interested in. - The rdfs are calculated on these species. - +**species** (*list*\* of **species** or \**just single specie str*) – the species that we are interested in. +The rdfs are calculated on these species. Returns: +## *class* maml.describers.RandomizedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) -### _class_ maml.describers.RandomizedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) Bases: `CoulombMatrix` Randomized CoulombMatrix. @@ -617,26 +586,30 @@ Reference: > title={Machine learning of molecular electronic properties -> in chemical compound space}, +> ```none +> in chemical compound space}, +> ``` -> author={Montavon, Gr{'e}goire and Rupp, Matthias and Gobre, +> author={Montavon, Gr{‘e}goire and Rupp, Matthias and Gobre, -> Vivekanand and Vazquez-Mayagoitia, Alvaro and Hansen, Katja -> and Tkatchenko, Alexandre and M{"u}ller, Klaus-Robert and -> Von Lilienfeld, O Anatole}, +> ```none +> Vivekanand and Vazquez-Mayagoitia, Alvaro and Hansen, Katja +> and Tkatchenko, Alexandre and M{"u}ller, Klaus-Robert and +> Von Lilienfeld, O Anatole}, +> ``` > journal={New Journal of Physics}, > volume={15}, number={9},pages={095003}, > year={2013},publisher={IOP Publishing}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘structure_ ) -#### describer_type(_ = 'structure_ ) +### get_randomized_coulomb_mat(s: Molecule | Structure) -#### get_randomized_coulomb_mat(s: Molecule | Structure) Returns the randomized matrix (i) take an arbitrary valid Coulomb matrix C (ii) compute the norm of each row of this Coulomb matrix: row_norms @@ -651,19 +624,15 @@ Returns the randomized matrix * **Parameters** - - **s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not - advised since the features will depend on supercell size - +**s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not +advised since the features will depend on supercell size * **Returns** +pd.DataFrame randomized Coulomb matrix - pd.DataFrame randomized Coulomb matrix +### transform_one(s: Molecule | Structure) - - -#### transform_one(s: Molecule | Structure) Transform one structure to descriptors :param s: pymatgen Molecule or Structure, Structure is not @@ -671,44 +640,40 @@ Transform one structure to descriptors Returns: pandas dataframe descriptors +## *class* maml.describers.SiteElementProperty(feature_dict: dict | None = None, output_weights: bool = False, \*\*kwargs) -### _class_ maml.describers.SiteElementProperty(feature_dict: dict | None = None, output_weights: bool = False, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Site specie property describers. For a structure or composition, return an unordered set of site specie properties. +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *static* _get_keys(c: Composition) -#### _static_ _get_keys(c: Composition) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘site_ ) -#### describer_type(_ = 'site_ ) +### *property* feature_dim() -#### _property_ feature_dim() Feature dimension. +### transform_one(obj: str | Composition | Structure | Molecule) -#### transform_one(obj: str | Composition | Structure | Molecule) Transform one object to features. * **Parameters** - - **obj** (*str/Composition/Structure/Molecule*) – object to transform - +**obj** (*str/Composition/Structure/Molecule*) – object to transform * **Returns** +features array - features array +## *class* maml.describers.SmoothOverlapAtomicPosition(cutoff: float, l_max: int = 8, n_max: int = 8, atom_sigma: float = 0.5, feature_batch: str = ‘pandas_concat’, \*\*kwargs) - - -### _class_ maml.describers.SmoothOverlapAtomicPosition(cutoff: float, l_max: int = 8, n_max: int = 8, atom_sigma: float = 0.5, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Smooth overlap of atomic positions (SOAP) to describe the local environment of each atom. @@ -717,26 +682,24 @@ Reference: @article{bartok2013representing, > title={On representing chemical environments}, -> author={Bart{'o}k, Albert P and Kondor, Risi and Cs{'a}nyi, G{'a}bor}, +> author={Bart{‘o}k, Albert P and Kondor, Risi and Cs{‘a}nyi, G{‘a}bor}, > journal={Physical Review B}, > volume={87}, number={18}, pages={184115}, year={2013}, publisher={APS}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘site_ ) -#### describer_type(_ = 'site_ ) +### transform_one(structure: Structure) -#### transform_one(structure: Structure) * **Parameters** +**structure** (*Structure*) – Pymatgen Structure object. - **structure** (*Structure*) – Pymatgen Structure object. +## *class* maml.describers.SortedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) - - -### _class_ maml.describers.SortedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) Bases: `CoulombMatrix` Sorted CoulombMatrix. @@ -746,42 +709,42 @@ Reference: > title={Learning invariant representations -> of molecules for atomization energy prediction}, +> ```none +> of molecules for atomization energy prediction}, +> ``` -> author={Montavon, Gr{'e}goire and Hansen, Katja +> author={Montavon, Gr{‘e}goire and Hansen, Katja -> and Fazli, Siamac and Rupp, Matthias and Biegler, -> Franziska and Ziehe, Andreas and Tkatchenko, Alexandre -> and Lilienfeld, Anatole V and M{"u}ller, Klaus-Robert}, +> ```none +> and Fazli, Siamac and Rupp, Matthias and Biegler, +> Franziska and Ziehe, Andreas and Tkatchenko, Alexandre +> and Lilienfeld, Anatole V and M{"u}ller, Klaus-Robert}, +> ``` > booktitle={Advances in neural information processing systems}, > pages={440–448}, year={2012}} +### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +### describer_type(_ = ‘structure_ ) -#### describer_type(_ = 'structure_ ) +### get_sorted_coulomb_mat(s: Molecule | Structure) -#### get_sorted_coulomb_mat(s: Molecule | Structure) Returns the matrix sorted by the row norm. * **Parameters** - - **s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not - advised since the features will depend on supercell size - +**s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not +advised since the features will depend on supercell size * **Returns** +pd.DataFrame, sorted Coulomb matrix - pd.DataFrame, sorted Coulomb matrix - - +### transform_one(s: Molecule | Structure) -#### transform_one(s: Molecule | Structure) Transform one structure into descriptor :param s: pymatgen Molecule or Structure, Structure is not @@ -789,14 +752,13 @@ Transform one structure into descriptor Returns: pd.DataFrame descriptors +## maml.describers.wrap_matminer_describer(cls_name: str, wrapped_class: Any, obj_conversion: Callable, describer_type: Any | None = None) -### maml.describers.wrap_matminer_describer(cls_name: str, wrapped_class: Any, obj_conversion: Callable, describer_type: Any | None = None) Wrapper of matminer_wrapper describers. * **Parameters** - * **cls_name** (*str*) – new class name @@ -804,41 +766,38 @@ Wrapper of matminer_wrapper describers. * **obj_conversion** (*callable*) – function to convert objects into desired - object type within transform_one +object type within transform_one * **describer_type** (*object*) – object type. - Returns: maml describers class - ## maml.describers._composition module Compositional describers. +### *class* maml.describers._composition.ElementStats(element_properties: dict, stats: list[str] | None = None, property_names: list[str] | None = None, feature_batch: str = ‘pandas_concat’, \*\*kwargs) -### _class_ maml.describers._composition.ElementStats(element_properties: dict, stats: list[str] | None = None, property_names: list[str] | None = None, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Element statistics. The allowed stats are accessed via ALLOWED_STATS class attributes. If the stats have multiple parameters, the positional arguments are separated by ::, e.g., moment::1::None. +#### ALLOWED_STATS(_ = [‘max’, ‘min’, ‘range’, ‘mode’, ‘mean_absolute_deviation’, ‘mean_absolute_error’, ‘moment’, ‘mean’, ‘inverse_mean’, ‘average’, ‘std’, ‘skewness’, ‘kurtosis’, ‘geometric_mean’, ‘power_mean’, ‘shifted_geometric_mean’, ‘harmonic_mean’_ ) -#### ALLOWED_STATS(_ = ['max', 'min', 'range', 'mode', 'mean_absolute_deviation', 'mean_absolute_error', 'moment', 'mean', 'inverse_mean', 'average', 'std', 'skewness', 'kurtosis', 'geometric_mean', 'power_mean', 'shifted_geometric_mean', 'harmonic_mean'_ ) +#### AVAILABLE_DATA(_ = [‘megnet_1’, ‘megnet_3’, ‘megnet_l2’, ‘megnet_ion_l2’, ‘megnet_l3’, ‘megnet_ion_l3’, ‘megnet_l4’, ‘megnet_ion_l4’, ‘megnet_l8’, ‘megnet_ion_l8’, ‘megnet_l16’, ‘megnet_ion_l16’, ‘megnet_l32’, ‘megnet_ion_l32’_ ) -#### AVAILABLE_DATA(_ = ['megnet_1', 'megnet_3', 'megnet_l2', 'megnet_ion_l2', 'megnet_l3', 'megnet_ion_l3', 'megnet_l4', 'megnet_ion_l4', 'megnet_l8', 'megnet_ion_l8', 'megnet_l16', 'megnet_ion_l16', 'megnet_l32', 'megnet_ion_l32'_ ) +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *static* _reduce_dimension(element_properties, property_names, num_dim: int | None = None, reduction_algo: str | None = ‘pca’, reduction_params: dict | None = None) -#### _static_ _reduce_dimension(element_properties, property_names, num_dim: int | None = None, reduction_algo: str | None = 'pca', reduction_params: dict | None = None) Reduce the feature dimension by reduction_algo. * **Parameters** - * **element_properties** (*dict*) – dictionary of elemental/specie propeprties @@ -849,41 +808,38 @@ Reduce the feature dimension by reduction_algo. * **reduction_algo** (*str*) – algorithm for dimensional reduction, currently support - pca, kpca +pca, kpca * **reduction_params** (*dict*) – kwargs for reduction algorithm - Returns: new element_properties and property_names +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### describer_type(_ = ‘composition_ ) -#### describer_type(_ = 'composition_ ) +#### *classmethod* from_data(data_name: list[str] | str, stats: list[str] | None = None, \*\*kwargs) -#### _classmethod_ from_data(data_name: list[str] | str, stats: list[str] | None = None, \*\*kwargs) ElementalStats from existing data file. * **Parameters** - - * **data_name** (*str** of **list** of **str*) – data name. Current supported data are - available from ElementStats.AVAILABLE_DATA + * **data_name** (*str*\* of **list** of \**str*) – data name. Current supported data are +available from ElementStats.AVAILABLE_DATA * **stats** (*list*) – list of stats, use ElementStats.ALLOWED_STATS to - check available stats +check available stats * **\*\*kwargs** – Passthrough to class init. - Returns: ElementStats instance +#### *classmethod* from_file(filename: str, stats: list[str] | None = None, \*\*kwargs) -#### _classmethod_ from_file(filename: str, stats: list[str] | None = None, \*\*kwargs) ElementStats from a json file of element property dictionary. The keys required are: @@ -894,50 +850,46 @@ The keys required are: * **Parameters** - * **filename** (*str*) – filename * **stats** (*list*) – list of stats, check ElementStats.ALLOWED_STATS - for supported stats. The stats that support additional - Keyword args, use ‘:’ to separate the args. For example, - ‘moment:0:None’ will calculate moment stats with order=0, - and max_order=None. +for supported stats. The stats that support additional +Keyword args, use ‘:’ to separate the args. For example, +‘moment:0:None’ will calculate moment stats with order=0, +and max_order=None. * **\*\*kwargs** – Passthrough to class init. - Returns: ElementStats class - #### transform_one(obj: Structure | str | Composition) + Transform one object, the object can be string, Compostion or Structure. * **Parameters** - - **obj** (*str/Composition/Structure*) – object to transform - +**obj** (*str/Composition/Structure*) – object to transform Returns: pd.DataFrame with property names as column names - ### maml.describers._composition._is_element_or_specie(s: str) ### maml.describers._composition._keys_are_elements(dic: dict) -## maml.describers._m3gnet module +## maml.describers._m3gnet module -### _class_ maml.describers._m3gnet.M3GNetStructure(model_path: str | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +### *class* maml.describers._m3gnet.M3GNetStructure(model_path: str | None = None, \*\*kwargs) +Bases: `BaseDescriber` -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) #### transform_one(structure: Structure | Molecule) + Transform structure/molecule objects into features :param structure: target object structure or molecule :type structure: Structure/Molecule @@ -948,14 +900,13 @@ Returns: np.array features. Wrapper for matminer_wrapper featurizers. - ### maml.describers._matminer.wrap_matminer_describer(cls_name: str, wrapped_class: Any, obj_conversion: Callable, describer_type: Any | None = None) + Wrapper of matminer_wrapper describers. * **Parameters** - * **cls_name** (*str*) – new class name @@ -963,27 +914,26 @@ Wrapper of matminer_wrapper describers. * **obj_conversion** (*callable*) – function to convert objects into desired - object type within transform_one +object type within transform_one * **describer_type** (*object*) – object type. - Returns: maml describers class ## maml.describers._megnet module MEGNet-based describers. +### *exception* maml.describers._megnet.MEGNetNotFound() -### _exception_ maml.describers._megnet.MEGNetNotFound() Bases: `Exception` MEGNet not found exception. +### *class* maml.describers._megnet.MEGNetSite(name: str | object | None = None, level: int | None = None, \*\*kwargs) -### _class_ maml.describers._megnet.MEGNetSite(name: str | object | None = None, level: int | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Use megnet pre-trained models as featurizer to get atomic features. @@ -994,32 +944,32 @@ Reference: > author={Chen, Chi and Ye, Weike and Zuo, Yunxing and -> Zheng, Chen and Ong, Shyue Ping}, +> ```none +> Zheng, Chen and Ong, Shyue Ping}, +> ``` > journal={Chemistry of Materials}, volume={31}, number={9}, > pages={3564–3572}, year={2019},publisher={ACS Publications}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### describer_type(_ = 'site_ ) +#### describer_type(_ = ‘site_ ) #### transform_one(obj: Structure | Molecule) + Get megnet site features from structure object. * **Parameters** - - **obj** (*structure** or **molecule*) – pymatgen structure or molecules - +**obj** (*structure*\* or \**molecule*) – pymatgen structure or molecules Returns: +### *class* maml.describers._megnet.MEGNetStructure(name: str | object | None = None, mode: str = ‘site_stats’, level: int | None = None, stats: list | None = None, \*\*kwargs) -### _class_ maml.describers._megnet.MEGNetStructure(name: str | object | None = None, mode: str = 'site_stats', level: int | None = None, stats: list | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Use megnet pre-trained models as featurizer to get structural features. There are two methods to get structural descriptors from @@ -1027,12 +977,14 @@ megnet models. mode: - ‘site_stats’: Calculate the site features, and then use maml.utils.stats to compute the feature-wise +```none +‘site_stats’: Calculate the site features, and then use maml.utils.stats to compute the feature-wise - statistics. This requires the specification of level + statistics. This requires the specification of level - ‘site_readout’: Use the atomic features at the readout stage - ‘final’: Use the concatenated atom, bond and global features +‘site_readout’: Use the atomic features at the readout stage +‘final’: Use the concatenated atom, bond and global features +``` Reference: @article{chen2019graph,title={Graph networks as a universal machine @@ -1041,69 +993,66 @@ Reference: > author={Chen, Chi and Ye, Weike and Zuo, Yunxing and -> Zheng, Chen and Ong, Shyue Ping}, +> ```none +> Zheng, Chen and Ong, Shyue Ping}, +> ``` > journal={Chemistry of Materials}, volume={31}, number={9}, > pages={3564–3572}, year={2019},publisher={ACS Publications}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) - -#### describer_type(_ = 'structure_ ) +#### describer_type(_ = ‘structure_ ) #### transform_one(obj: Structure | Molecule) + Transform structure/molecule objects into features :param obj: target object structure or molecule. :type obj: Structure/Molecule Returns: pd.DataFrame features - ### maml.describers._megnet._load_model(name: str | object | None = None) + ## maml.describers._rdf module Radial distribution functions for site features. This was originally written in pymatgen-diffusion. +### *class* maml.describers._rdf.RadialDistributionFunction(r_min: float = 0.0, r_max: float = 10.0, n_grid: int = 101, sigma: float = 0.0) -### _class_ maml.describers._rdf.RadialDistributionFunction(r_min: float = 0.0, r_max: float = 10.0, n_grid: int = 101, sigma: float = 0.0) Bases: `object` Calculator for radial distribution function. - -#### _static_ _get_specie_density(structure: Structure) +#### *static* _get_specie_density(structure: Structure) #### get_site_coordination(structure: Structure) + Get site wise coordination :param structure: pymatgen Structure. :type structure: Structure Returns: r, cns where cns is a list of dictionary with specie_pair: pair_cn key:value pairs - #### get_site_rdf(structure: Structure) -* **Parameters** - - **structure** (*Structure*) – pymatgen structure +* **Parameters** +**structure** (*Structure*) – pymatgen structure * **Returns** +r, rdfs, r is the radial points, and rdfs are a list of rdf dicts +rdfs[0] is the rdfs of the first site. It is a dictionary of {atom_pair: pair_rdf} +e.g., - r, rdfs, r is the radial points, and rdfs are a list of rdf dicts - rdfs[0] is the rdfs of the first site. It is a dictionary of {atom_pair: pair_rdf} - e.g., - - > {“Sr:O”: [0, 0, 0.1, 0.2, ..]}. - - - +> {“Sr:O”: [0, 0, 0.1, 0.2, ..]}. #### get_species_coordination(structure: Structure, ref_species: list | None = None, species: list | None = None) + Get specie-wise coordination number :param structure: target structure :type structure: Structure @@ -1113,15 +1062,13 @@ Get specie-wise coordination number * **Parameters** - - **species** (*list** of **species** or **just single specie str*) – the species that we are interested in. - The rdfs are calculated on these species. - +**species** (*list*\* of **species** or \**just single specie str*) – the species that we are interested in. +The rdfs are calculated on these species. Returns: - #### get_species_rdf(structure: Structure, ref_species: list | None = None, species: list | None = None) + Get specie-wise rdf :param structure: target structure :type structure: Structure @@ -1131,15 +1078,13 @@ Get specie-wise rdf * **Parameters** - - **species** (*list** of **species** or **just single specie str*) – the species that we are interested in. - The rdfs are calculated on these species. - +**species** (*list*\* of **species** or \**just single specie str*) – the species that we are interested in. +The rdfs are calculated on these species. Returns: - ### maml.describers._rdf._dist_to_counts(d: ndarray, r_min: float = 0.0, r_max: float = 8.0, n_grid: int = 100) + Convert a distance array for counts in the bin :param d: distance array :type d: 1D np.ndarray @@ -1150,12 +1095,10 @@ Convert a distance array for counts in the bin * **Returns** - - 1D array of counts in the bins centered on grid. - - +1D array of counts in the bins centered on grid. ### maml.describers._rdf.get_pair_distances(structure: Structure, r_max: float = 8.0) + Get pair distances from structure. The output will be a list of of dictionary, for example [{“specie”: “Mo”, @@ -1168,22 +1111,20 @@ from here. * **Parameters** - * **structure** (*Structure*) – pymatgen Structure * **r_max** (*float*) – maximum radius to consider - Returns: ## maml.describers._site module This module provides local environment describers. +### *class* maml.describers._site.BPSymmetryFunctions(cutoff: float, r_etas: ndarray, r_shift: ndarray, a_etas: ndarray, zetas: ndarray, lambdas: ndarray, feature_batch: str = ‘pandas_concat’, \*\*kwargs) -### _class_ maml.describers._site.BPSymmetryFunctions(cutoff: float, r_etas: ndarray, r_shift: ndarray, a_etas: ndarray, zetas: ndarray, lambdas: ndarray, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Behler-Parrinello symmetry function to describe the local environment of each atom. @@ -1193,9 +1134,11 @@ Reference: > title={Generalized neural-network representation of -> high-dimensional potential-energy surfaces}, +> ```none +> high-dimensional potential-energy surfaces}, +> ``` -> author={Behler, J{"o}rg and Parrinello, Michele}, +> author={Behler, J{“o}rg and Parrinello, Michele}, > journal={Physical review letters}, > volume={98}, > number={14}, @@ -1203,33 +1146,29 @@ Reference: > year={2007}, > publisher={APS}} - -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *abc_impl(* = <_abc.*abc_data object* ) #### _fc(r: float) + Cutoff function to decay the symmetry functions at vicinity of radial cutoff. * **Parameters** +**r** (*float*) – The pair distance. - **r** (*float*) – The pair distance. - +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) - -#### describer_type(_ = 'site_ ) +#### describer_type(_ = ‘site_ ) #### transform_one(structure: Structure) -* **Parameters** - - **structure** (*Structure*) – Pymatgen Structure object. +* **Parameters** +**structure** (*Structure*) – Pymatgen Structure object. +### *class* maml.describers._site.BispectrumCoefficients(rcutfac: float, twojmax: int, element_profile: dict, quadratic: bool = False, pot_fit: bool = False, include_stress: bool = False, feature_batch: str = ‘pandas_concat’, \*\*kwargs) -### _class_ maml.describers._site.BispectrumCoefficients(rcutfac: float, twojmax: int, element_profile: dict, quadratic: bool = False, pot_fit: bool = False, include_stress: bool = False, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Bispectrum coefficients to describe the local environment of each atom. Lammps is required to perform this computation. @@ -1239,41 +1178,43 @@ Reference: > title={Gaussian approximation potentials: The -> accuracy of quantum mechanics, without the electrons}, +> ```none +> accuracy of quantum mechanics, without the electrons}, +> ``` -> author={Bart{'o}k, Albert P and Payne, Mike C +> author={Bart{‘o}k, Albert P and Payne, Mike C -> and Kondor, Risi and Cs{'a}nyi, G{'a}bor}, +> ```none +> and Kondor, Risi and Cs{'a}nyi, G{'a}bor}, +> ``` > journal={Physical review letters}, > volume={104}, number={13}, pages={136403}, year={2010}, publisher={APS}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### describer_type(_ = ‘site_ ) -#### describer_type(_ = 'site_ ) +#### *property* feature_dim(*: int | Non* ) -#### _property_ feature_dim(_: int | Non_ ) Bispectrum feature dimension. +#### *property* subscripts(*: lis* ) -#### _property_ subscripts(_: lis_ ) The subscripts (2j1, 2j2, 2j) of all bispectrum components involved. - #### transform_one(structure: Structure) -* **Parameters** - - **structure** (*Structure*) – Pymatgen Structure object. +* **Parameters** +**structure** (*Structure*) – Pymatgen Structure object. +### *class* maml.describers._site.MEGNetSite(name: str | object | None = None, level: int | None = None, \*\*kwargs) -### _class_ maml.describers._site.MEGNetSite(name: str | object | None = None, level: int | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Use megnet pre-trained models as featurizer to get atomic features. @@ -1284,67 +1225,63 @@ Reference: > author={Chen, Chi and Ye, Weike and Zuo, Yunxing and -> Zheng, Chen and Ong, Shyue Ping}, +> ```none +> Zheng, Chen and Ong, Shyue Ping}, +> ``` > journal={Chemistry of Materials}, volume={31}, number={9}, > pages={3564–3572}, year={2019},publisher={ACS Publications}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### describer_type(_ = 'site_ ) +#### describer_type(_ = ‘site_ ) #### transform_one(obj: Structure | Molecule) + Get megnet site features from structure object. * **Parameters** - - **obj** (*structure** or **molecule*) – pymatgen structure or molecules - +**obj** (*structure*\* or \**molecule*) – pymatgen structure or molecules Returns: +### *class* maml.describers._site.SiteElementProperty(feature_dict: dict | None = None, output_weights: bool = False, \*\*kwargs) -### _class_ maml.describers._site.SiteElementProperty(feature_dict: dict | None = None, output_weights: bool = False, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Site specie property describers. For a structure or composition, return an unordered set of site specie properties. +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *static* _get_keys(c: Composition) -#### _static_ _get_keys(c: Composition) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### describer_type(_ = ‘site_ ) -#### describer_type(_ = 'site_ ) +#### *property* feature_dim() -#### _property_ feature_dim() Feature dimension. - #### transform_one(obj: str | Composition | Structure | Molecule) + Transform one object to features. * **Parameters** - - **obj** (*str/Composition/Structure/Molecule*) – object to transform - +**obj** (*str/Composition/Structure/Molecule*) – object to transform * **Returns** +features array - features array +### *class* maml.describers._site.SmoothOverlapAtomicPosition(cutoff: float, l_max: int = 8, n_max: int = 8, atom_sigma: float = 0.5, feature_batch: str = ‘pandas_concat’, \*\*kwargs) - - -### _class_ maml.describers._site.SmoothOverlapAtomicPosition(cutoff: float, l_max: int = 8, n_max: int = 8, atom_sigma: float = 0.5, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Smooth overlap of atomic positions (SOAP) to describe the local environment of each atom. @@ -1353,23 +1290,21 @@ Reference: @article{bartok2013representing, > title={On representing chemical environments}, -> author={Bart{'o}k, Albert P and Kondor, Risi and Cs{'a}nyi, G{'a}bor}, +> author={Bart{‘o}k, Albert P and Kondor, Risi and Cs{‘a}nyi, G{‘a}bor}, > journal={Physical Review B}, > volume={87}, number={18}, pages={184115}, year={2013}, publisher={APS}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### describer_type(_ = 'site_ ) +#### describer_type(_ = ‘site_ ) #### transform_one(structure: Structure) -* **Parameters** - - **structure** (*Structure*) – Pymatgen Structure object. +* **Parameters** +**structure** (*Structure*) – Pymatgen Structure object. ## maml.describers._spectrum module @@ -1379,9 +1314,9 @@ Spectrum describers. Structure-wise describers. These describers include structural information. +### *class* maml.describers._structure.CoulombEigenSpectrum(max_atoms: int | None = None, \*\*kwargs) -### _class_ maml.describers._structure.CoulombEigenSpectrum(max_atoms: int | None = None, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Get the Coulomb Eigen Spectrum describers. @@ -1390,35 +1325,37 @@ Reference: > title={Fast and accurate modeling of molecular -> atomization energies with machine learning}, +> ```none +> atomization energies with machine learning}, +> ``` -> author={Rupp, Matthias and Tkatchenko, Alexandre and M{"u}ller, +> author={Rupp, Matthias and Tkatchenko, Alexandre and M{“u}ller, -> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ```none +> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ``` > journal={Physical review letters}, volume={108}, > number={5}, pages={058301}, > year={2012}, publisher={APS}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) - -#### describer_type(_ = 'structure_ ) +#### describer_type(_ = ‘structure_ ) #### transform_one(mol: Molecule) -* **Parameters** - - **mol** (*Molecule*) – pymatgen molecule. +* **Parameters** +**mol** (*Molecule*) – pymatgen molecule. Returns: np.ndarray the eigen value vectors of Coulob matrix +### *class* maml.describers._structure.CoulombMatrix(random_seed: int | None = None, max_atoms: int | None = None, is_ravel: bool = True, \*\*kwargs) -### _class_ maml.describers._structure.CoulombMatrix(random_seed: int | None = None, max_atoms: int | None = None, is_ravel: bool = True, \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Coulomb Matrix to describe structure. @@ -1427,72 +1364,64 @@ Reference: > title={Fast and accurate modeling of molecular -> atomization energies with machine learning}, +> ```none +> atomization energies with machine learning}, +> ``` -> author={Rupp, Matthias and Tkatchenko, Alexandre and M{"u}ller, +> author={Rupp, Matthias and Tkatchenko, Alexandre and M{“u}ller, -> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ```none +> Klaus-Robert and Von Lilienfeld, O Anatole}, +> ``` > journal={Physical review letters}, volume={108}, > number={5}, pages={058301}, > year={2012}, publisher={APS}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *static* _get_columb_mat(s: Molecule | Structure) -#### _static_ _get_columb_mat(s: Molecule | Structure) * **Parameters** - - **s** (*Molecule/Structure*) – input Molecule or Structure. Structure - is not advised since the feature will depend on the supercell size. - +**s** (*Molecule/Structure*) – input Molecule or Structure. Structure +is not advised since the feature will depend on the supercell size. * **Returns** +Coulomb matrix of the structure - Coulomb matrix of the structure - +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) - -#### describer_type(_ = 'structure_ ) +#### describer_type(_ = ‘structure_ ) #### get_coulomb_mat(s: Molecule | Structure) -* **Parameters** - - **s** (*Molecule/Structure*) – input Molecule or Structure. Structure - is not advised since the feature will depend on the supercell size +* **Parameters** +**s** (*Molecule/Structure*) – input Molecule or Structure. Structure +is not advised since the feature will depend on the supercell size * **Returns** - - Coulomb matrix of the structure. - - +Coulomb matrix of the structure. #### transform_one(s: Molecule | Structure) -* **Parameters** - - **s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not - advised since the features will depend on supercell size. +* **Parameters** +**s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not +advised since the features will depend on supercell size. * **Returns** +pandas.DataFrame. +The column is index of the structure, which is 0 for single input +df[0] returns the serials of coulomb_mat raval - pandas.DataFrame. - The column is index of the structure, which is 0 for single input - df[0] returns the serials of coulomb_mat raval - - +### *class* maml.describers._structure.DistinctSiteProperty(properties: list[str], symprec: float = 0.1, wyckoffs: list[str] | None = None, feature_batch: str = ‘pandas_concat’, \*\*kwargs) -### _class_ maml.describers._structure.DistinctSiteProperty(properties: list[str], symprec: float = 0.1, wyckoffs: list[str] | None = None, feature_batch: str = 'pandas_concat', \*\*kwargs) -Bases: [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) +Bases: `BaseDescriber` Constructs a describers based on properties of distinct sites in a structure. For now, this assumes that there is only one type of species in @@ -1513,30 +1442,26 @@ Reference: > year={2018}, > publisher={Nature Publishing Group}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### describer_type(_ = ‘structure_ ) -#### describer_type(_ = 'structure_ ) - -#### supported_properties(_ = ['mendeleev_no', 'electrical_resistivity', 'velocity_of_sound', 'reflectivity', 'refractive_index', 'poissons_ratio', 'molar_volume', 'thermal_conductivity', 'boiling_point', 'melting_point', 'critical_temperature', 'superconduction_temperature', 'liquid_range', 'bulk_modulus', 'youngs_modulus', 'brinell_hardness', 'rigidity_modulus', 'mineral_hardness', 'vickers_hardness', 'density_of_solid', 'atomic_radius_calculated', 'van_der_waals_radius', 'coefficient_of_linear_thermal_expansion', 'ground_state_term_symbol', 'valence', 'Z', 'X', 'atomic_mass', 'block', 'row', 'group', 'atomic_radius', 'average_ionic_radius', 'average_cationic_radius', 'average_anionic_radius', 'metallic_radius', 'ionic_radii', 'oxi_state', 'max_oxidation_state', 'min_oxidation_state', 'is_transition_metal', 'is_alkali', 'is_alkaline', 'is_chalcogen', 'is_halogen', 'is_lanthanoid', 'is_metal', 'is_metalloid', 'is_noble_gas', 'is_post_transition_metal', 'is_quadrupolar', 'is_rare_earth_metal', 'is_actinoid'_ ) +#### supported_properties(_ = [‘mendeleev_no’, ‘electrical_resistivity’, ‘velocity_of_sound’, ‘reflectivity’, ‘refractive_index’, ‘poissons_ratio’, ‘molar_volume’, ‘thermal_conductivity’, ‘boiling_point’, ‘melting_point’, ‘critical_temperature’, ‘superconduction_temperature’, ‘liquid_range’, ‘bulk_modulus’, ‘youngs_modulus’, ‘brinell_hardness’, ‘rigidity_modulus’, ‘mineral_hardness’, ‘vickers_hardness’, ‘density_of_solid’, ‘atomic_radius_calculated’, ‘van_der_waals_radius’, ‘coefficient_of_linear_thermal_expansion’, ‘ground_state_term_symbol’, ‘valence’, ‘Z’, ‘X’, ‘atomic_mass’, ‘block’, ‘row’, ‘group’, ‘atomic_radius’, ‘average_ionic_radius’, ‘average_cationic_radius’, ‘average_anionic_radius’, ‘metallic_radius’, ‘ionic_radii’, ‘oxi_state’, ‘max_oxidation_state’, ‘min_oxidation_state’, ‘is_transition_metal’, ‘is_alkali’, ‘is_alkaline’, ‘is_chalcogen’, ‘is_halogen’, ‘is_lanthanoid’, ‘is_metal’, ‘is_metalloid’, ‘is_noble_gas’, ‘is_post_transition_metal’, ‘is_quadrupolar’, ‘is_rare_earth_metal’, ‘is_actinoid’_ ) #### transform_one(structure: Structure) -* **Parameters** - - **structure** (*pymatgen Structure*) – pymatgen structure for descriptor computation. +* **Parameters** +**structure** (*pymatgen Structure*) – pymatgen structure for descriptor computation. * **Returns** +pd.DataFrame that contains the distinct position labeled features - pd.DataFrame that contains the distinct position labeled features - - +### *class* maml.describers._structure.RandomizedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) -### _class_ maml.describers._structure.RandomizedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) Bases: `CoulombMatrix` Randomized CoulombMatrix. @@ -1546,26 +1471,30 @@ Reference: > title={Machine learning of molecular electronic properties -> in chemical compound space}, +> ```none +> in chemical compound space}, +> ``` -> author={Montavon, Gr{'e}goire and Rupp, Matthias and Gobre, +> author={Montavon, Gr{‘e}goire and Rupp, Matthias and Gobre, -> Vivekanand and Vazquez-Mayagoitia, Alvaro and Hansen, Katja -> and Tkatchenko, Alexandre and M{"u}ller, Klaus-Robert and -> Von Lilienfeld, O Anatole}, +> ```none +> Vivekanand and Vazquez-Mayagoitia, Alvaro and Hansen, Katja +> and Tkatchenko, Alexandre and M{"u}ller, Klaus-Robert and +> Von Lilienfeld, O Anatole}, +> ``` > journal={New Journal of Physics}, > volume={15}, number={9},pages={095003}, > year={2013},publisher={IOP Publishing}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) - -#### describer_type(_ = 'structure_ ) +#### describer_type(_ = ‘structure_ ) #### get_randomized_coulomb_mat(s: Molecule | Structure) + Returns the randomized matrix (i) take an arbitrary valid Coulomb matrix C (ii) compute the norm of each row of this Coulomb matrix: row_norms @@ -1580,19 +1509,15 @@ Returns the randomized matrix * **Parameters** - - **s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not - advised since the features will depend on supercell size - +**s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not +advised since the features will depend on supercell size * **Returns** - - pd.DataFrame randomized Coulomb matrix - - +pd.DataFrame randomized Coulomb matrix #### transform_one(s: Molecule | Structure) + Transform one structure to descriptors :param s: pymatgen Molecule or Structure, Structure is not @@ -1600,8 +1525,8 @@ Transform one structure to descriptors Returns: pandas dataframe descriptors +### *class* maml.describers._structure.SortedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) -### _class_ maml.describers._structure.SortedCoulombMatrix(random_seed: int | None = None, is_ravel: bool = True, \*\*kwargs) Bases: `CoulombMatrix` Sorted CoulombMatrix. @@ -1611,42 +1536,42 @@ Reference: > title={Learning invariant representations -> of molecules for atomization energy prediction}, +> ```none +> of molecules for atomization energy prediction}, +> ``` -> author={Montavon, Gr{'e}goire and Hansen, Katja +> author={Montavon, Gr{‘e}goire and Hansen, Katja -> and Fazli, Siamac and Rupp, Matthias and Biegler, -> Franziska and Ziehe, Andreas and Tkatchenko, Alexandre -> and Lilienfeld, Anatole V and M{"u}ller, Klaus-Robert}, +> ```none +> and Fazli, Siamac and Rupp, Matthias and Biegler, +> Franziska and Ziehe, Andreas and Tkatchenko, Alexandre +> and Lilienfeld, Anatole V and M{"u}ller, Klaus-Robert}, +> ``` > booktitle={Advances in neural information processing systems}, > pages={440–448}, year={2012}} +#### *abc_impl(* = <_abc.*abc_data object* ) -#### _abc_impl(_ = <_abc._abc_data object_ ) - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) -#### describer_type(_ = 'structure_ ) +#### describer_type(_ = ‘structure_ ) #### get_sorted_coulomb_mat(s: Molecule | Structure) + Returns the matrix sorted by the row norm. * **Parameters** - - **s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not - advised since the features will depend on supercell size - +**s** (*Molecule/Structure*) – pymatgen Molecule or Structure, Structure is not +advised since the features will depend on supercell size * **Returns** - - pd.DataFrame, sorted Coulomb matrix - - +pd.DataFrame, sorted Coulomb matrix #### transform_one(s: Molecule | Structure) + Transform one structure into descriptor :param s: pymatgen Molecule or Structure, Structure is not diff --git a/docs/maml.md b/docs/maml.md index fde10dda..2d20b086 100644 --- a/docs/maml.md +++ b/docs/maml.md @@ -12,3029 +12,3007 @@ nav_order: 5 * [maml.apps package](maml.apps.md) - * [Subpackages](maml.apps.md#subpackages) + * Subpackages * [maml.apps.bowsr package](maml.apps.bowsr.md) - * [Subpackages](maml.apps.bowsr.md#subpackages) + * Subpackages * [maml.apps.bowsr.model package](maml.apps.bowsr.model.md) - * [`EnergyModel`](maml.apps.bowsr.model.md#maml.apps.bowsr.model.EnergyModel) + * `EnergyModel` + * maml.apps.bowsr.model.base module - * [maml.apps.bowsr.model.base module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.base) + * maml.apps.bowsr.model.cgcnn module - * [maml.apps.bowsr.model.cgcnn module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.cgcnn) + * maml.apps.bowsr.model.dft module - * [maml.apps.bowsr.model.dft module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.dft) + * maml.apps.bowsr.model.megnet module - * [maml.apps.bowsr.model.megnet module](maml.apps.bowsr.model.md#module-maml.apps.bowsr.model.megnet) + * maml.apps.bowsr.acquisition module + * `AcquisitionFunction` - * [maml.apps.bowsr.acquisition module](maml.apps.bowsr.md#module-maml.apps.bowsr.acquisition) + * `AcquisitionFunction._ei()` - * [`AcquisitionFunction`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction) + * `AcquisitionFunction._gpucb()` - * [`AcquisitionFunction._ei()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._ei) + * `AcquisitionFunction._poi()` - * [`AcquisitionFunction._gpucb()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._gpucb) + * `AcquisitionFunction._ucb()` - * [`AcquisitionFunction._poi()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._poi) + * `AcquisitionFunction.calculate()` - * [`AcquisitionFunction._ucb()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction._ucb) + * `_trunc()` - * [`AcquisitionFunction.calculate()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.AcquisitionFunction.calculate) + * `ensure_rng()` - * [`_trunc()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition._trunc) + * `lhs_sample()` - * [`ensure_rng()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.ensure_rng) + * `predict_mean_std()` - * [`lhs_sample()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.lhs_sample) + * `propose_query_point()` - * [`predict_mean_std()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.predict_mean_std) + * maml.apps.bowsr.optimizer module - * [`propose_query_point()`](maml.apps.bowsr.md#maml.apps.bowsr.acquisition.propose_query_point) + * `BayesianOptimizer` - * [maml.apps.bowsr.optimizer module](maml.apps.bowsr.md#module-maml.apps.bowsr.optimizer) + * `BayesianOptimizer.add_query()` - * [`BayesianOptimizer`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer) + * `BayesianOptimizer.as_dict()` - * [`BayesianOptimizer.add_query()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.add_query) + * `BayesianOptimizer.from_dict()` - * [`BayesianOptimizer.as_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.as_dict) + * `BayesianOptimizer.get_derived_structure()` - * [`BayesianOptimizer.from_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.from_dict) + * `BayesianOptimizer.get_formation_energy()` - * [`BayesianOptimizer.get_derived_structure()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.get_derived_structure) + * `BayesianOptimizer.get_optimized_structure_and_energy()` - * [`BayesianOptimizer.get_formation_energy()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.get_formation_energy) + * `BayesianOptimizer.gpr` - * [`BayesianOptimizer.get_optimized_structure_and_energy()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.get_optimized_structure_and_energy) + * `BayesianOptimizer.optimize()` - * [`BayesianOptimizer.gpr`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.gpr) + * `BayesianOptimizer.propose()` - * [`BayesianOptimizer.optimize()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.optimize) + * `BayesianOptimizer.set_bounds()` - * [`BayesianOptimizer.propose()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.propose) + * `BayesianOptimizer.set_gpr_params()` - * [`BayesianOptimizer.set_bounds()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.set_bounds) + * `BayesianOptimizer.set_space_empty()` - * [`BayesianOptimizer.set_gpr_params()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.set_gpr_params) + * `BayesianOptimizer.space` - * [`BayesianOptimizer.set_space_empty()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.set_space_empty) + * `atoms_crowded()` - * [`BayesianOptimizer.space`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.BayesianOptimizer.space) + * `struct2perturbation()` - * [`atoms_crowded()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.atoms_crowded) + * maml.apps.bowsr.perturbation module - * [`struct2perturbation()`](maml.apps.bowsr.md#maml.apps.bowsr.optimizer.struct2perturbation) + * `LatticePerturbation` - * [maml.apps.bowsr.perturbation module](maml.apps.bowsr.md#module-maml.apps.bowsr.perturbation) + * `LatticePerturbation.abc` - * [`LatticePerturbation`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation) + * `LatticePerturbation.fit_lattice` - * [`LatticePerturbation.abc`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.abc) + * `LatticePerturbation.lattice` - * [`LatticePerturbation.fit_lattice`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.fit_lattice) + * `LatticePerturbation.sanity_check()` - * [`LatticePerturbation.lattice`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.lattice) + * `WyckoffPerturbation` - * [`LatticePerturbation.sanity_check()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.LatticePerturbation.sanity_check) + * `WyckoffPerturbation.fit_site` - * [`WyckoffPerturbation`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation) + * `WyckoffPerturbation.get_orbit()` - * [`WyckoffPerturbation.fit_site`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.fit_site) + * `WyckoffPerturbation.sanity_check()` - * [`WyckoffPerturbation.get_orbit()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.get_orbit) + * `WyckoffPerturbation.site` - * [`WyckoffPerturbation.sanity_check()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.sanity_check) + * `WyckoffPerturbation.standardize()` - * [`WyckoffPerturbation.site`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.site) + * `crystal_system()` - * [`WyckoffPerturbation.standardize()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.WyckoffPerturbation.standardize) + * `get_standardized_structure()` - * [`crystal_system()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.crystal_system) + * `perturbation_mapping()` - * [`get_standardized_structure()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.get_standardized_structure) + * maml.apps.bowsr.preprocessing module - * [`perturbation_mapping()`](maml.apps.bowsr.md#maml.apps.bowsr.perturbation.perturbation_mapping) + * `DummyScaler` - * [maml.apps.bowsr.preprocessing module](maml.apps.bowsr.md#module-maml.apps.bowsr.preprocessing) + * `DummyScaler.as_dict()` - * [`DummyScaler`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler) + * `DummyScaler.fit()` - * [`DummyScaler.as_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.as_dict) + * `DummyScaler.from_dict()` - * [`DummyScaler.fit()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.fit) + * `DummyScaler.inverse_transform()` - * [`DummyScaler.from_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.from_dict) + * `DummyScaler.transform()` - * [`DummyScaler.inverse_transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.inverse_transform) + * `StandardScaler` - * [`DummyScaler.transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.DummyScaler.transform) + * `StandardScaler.as_dict()` - * [`StandardScaler`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler) + * `StandardScaler.fit()` - * [`StandardScaler.as_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.as_dict) + * `StandardScaler.from_dict()` - * [`StandardScaler.fit()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.fit) + * `StandardScaler.inverse_transform()` - * [`StandardScaler.from_dict()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.from_dict) + * `StandardScaler.transform()` - * [`StandardScaler.inverse_transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.inverse_transform) + * maml.apps.bowsr.target_space module - * [`StandardScaler.transform()`](maml.apps.bowsr.md#maml.apps.bowsr.preprocessing.StandardScaler.transform) + * `TargetSpace` - * [maml.apps.bowsr.target_space module](maml.apps.bowsr.md#module-maml.apps.bowsr.target_space) + * `TargetSpace.bounds` - * [`TargetSpace`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace) + * `TargetSpace.lhs_sample()` - * [`TargetSpace.bounds`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.bounds) + * `TargetSpace.params` - * [`TargetSpace.lhs_sample()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.lhs_sample) + * `TargetSpace.probe()` - * [`TargetSpace.params`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.params) + * `TargetSpace.register()` - * [`TargetSpace.probe()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.probe) + * `TargetSpace.set_bounds()` - * [`TargetSpace.register()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.register) + * `TargetSpace.set_empty()` - * [`TargetSpace.set_bounds()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.set_bounds) + * `TargetSpace.target` - * [`TargetSpace.set_empty()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.set_empty) + * `TargetSpace.uniform_sample()` - * [`TargetSpace.target`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.target) - - - * [`TargetSpace.uniform_sample()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space.TargetSpace.uniform_sample) - - - * [`_hashable()`](maml.apps.bowsr.md#maml.apps.bowsr.target_space._hashable) + * `_hashable()` * [maml.apps.gbe package](maml.apps.gbe.md) + * maml.apps.gbe.describer module - * [maml.apps.gbe.describer module](maml.apps.gbe.md#module-maml.apps.gbe.describer) - - - * [`GBBond`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond) + * `GBBond` - * [`GBBond.NNDict`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.NNDict) + * `GBBond.NNDict` - * [`GBBond._get_bond_mat()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond._get_bond_mat) + * `GBBond._get_bond_mat()` - * [`GBBond.as_dict()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.as_dict) + * `GBBond.as_dict()` - * [`GBBond.bond_matrix`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.bond_matrix) + * `GBBond.bond_matrix` - * [`GBBond.from_dict()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.from_dict) + * `GBBond.from_dict()` - * [`GBBond.get_breakbond_ratio()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.get_breakbond_ratio) + * `GBBond.get_breakbond_ratio()` - * [`GBBond.get_mean_bl_chg()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.get_mean_bl_chg) + * `GBBond.get_mean_bl_chg()` - * [`GBBond.max_bl`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.max_bl) + * `GBBond.max_bl` - * [`GBBond.min_bl`](maml.apps.gbe.md#maml.apps.gbe.describer.GBBond.min_bl) + * `GBBond.min_bl` - * [`GBDescriber`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber) + * `GBDescriber` - * [`GBDescriber._abc_impl`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber._abc_impl) + * `GBDescriber._abc_impl` - * [`GBDescriber._sklearn_auto_wrap_output_keys`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber._sklearn_auto_wrap_output_keys) + * `GBDescriber._sklearn_auto_wrap_output_keys` - * [`GBDescriber.generate_bulk_ref()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber.generate_bulk_ref) + * `GBDescriber.generate_bulk_ref()` - * [`GBDescriber.transform_one()`](maml.apps.gbe.md#maml.apps.gbe.describer.GBDescriber.transform_one) + * `GBDescriber.transform_one()` - * [`convert_hcp_direction()`](maml.apps.gbe.md#maml.apps.gbe.describer.convert_hcp_direction) + * `convert_hcp_direction()` - * [`convert_hcp_plane()`](maml.apps.gbe.md#maml.apps.gbe.describer.convert_hcp_plane) + * `convert_hcp_plane()` - * [`get_elemental_feature()`](maml.apps.gbe.md#maml.apps.gbe.describer.get_elemental_feature) + * `get_elemental_feature()` - * [`get_structural_feature()`](maml.apps.gbe.md#maml.apps.gbe.describer.get_structural_feature) + * `get_structural_feature()` - * [maml.apps.gbe.presetfeatures module](maml.apps.gbe.md#module-maml.apps.gbe.presetfeatures) + * maml.apps.gbe.presetfeatures module - * [`my_quant`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant) + * `my_quant` - * [`my_quant.latex`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant.latex) + * `my_quant.latex` - * [`my_quant.name`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant.name) + * `my_quant.name` - * [`my_quant.unit`](maml.apps.gbe.md#maml.apps.gbe.presetfeatures.my_quant.unit) + * `my_quant.unit` - * [maml.apps.gbe.utils module](maml.apps.gbe.md#module-maml.apps.gbe.utils) + * maml.apps.gbe.utils module - * [`load_b0_dict()`](maml.apps.gbe.md#maml.apps.gbe.utils.load_b0_dict) + * `load_b0_dict()` - * [`load_data()`](maml.apps.gbe.md#maml.apps.gbe.utils.load_data) + * `load_data()` - * [`load_mean_delta_bl_dict()`](maml.apps.gbe.md#maml.apps.gbe.utils.load_mean_delta_bl_dict) + * `load_mean_delta_bl_dict()` - * [`update_b0_dict()`](maml.apps.gbe.md#maml.apps.gbe.utils.update_b0_dict) + * `update_b0_dict()` * [maml.apps.pes package](maml.apps.pes.md) - * [`DefectFormation`](maml.apps.pes.md#maml.apps.pes.DefectFormation) + * `DefectFormation` - * [`DefectFormation._parse()`](maml.apps.pes.md#maml.apps.pes.DefectFormation._parse) + * `DefectFormation._parse()` - * [`DefectFormation._sanity_check()`](maml.apps.pes.md#maml.apps.pes.DefectFormation._sanity_check) + * `DefectFormation._sanity_check()` - * [`DefectFormation._setup()`](maml.apps.pes.md#maml.apps.pes.DefectFormation._setup) + * `DefectFormation._setup()` - * [`DefectFormation.calculate()`](maml.apps.pes.md#maml.apps.pes.DefectFormation.calculate) + * `DefectFormation.calculate()` - * [`DefectFormation.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes.DefectFormation.get_unit_cell) + * `DefectFormation.get_unit_cell()` - * [`ElasticConstant`](maml.apps.pes.md#maml.apps.pes.ElasticConstant) + * `ElasticConstant` - * [`ElasticConstant._RESTART_CONFIG`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._RESTART_CONFIG) + * `ElasticConstant._RESTART_CONFIG` - * [`ElasticConstant._parse()`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._parse) + * `ElasticConstant._parse()` - * [`ElasticConstant._sanity_check()`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._sanity_check) + * `ElasticConstant._sanity_check()` - * [`ElasticConstant._setup()`](maml.apps.pes.md#maml.apps.pes.ElasticConstant._setup) + * `ElasticConstant._setup()` - * [`EnergyForceStress`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress) + * `EnergyForceStress` - * [`EnergyForceStress._parse()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._parse) + * `EnergyForceStress._parse()` - * [`EnergyForceStress._rotate_force_stress()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._rotate_force_stress) + * `EnergyForceStress._rotate_force_stress()` - * [`EnergyForceStress._sanity_check()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._sanity_check) + * `EnergyForceStress._sanity_check()` - * [`EnergyForceStress._setup()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress._setup) + * `EnergyForceStress._setup()` - * [`EnergyForceStress.calculate()`](maml.apps.pes.md#maml.apps.pes.EnergyForceStress.calculate) + * `EnergyForceStress.calculate()` - * [`GAPotential`](maml.apps.pes.md#maml.apps.pes.GAPotential) + * `GAPotential` - * [`GAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.GAPotential._abc_impl) + * `GAPotential._abc_impl` - * [`GAPotential._line_up()`](maml.apps.pes.md#maml.apps.pes.GAPotential._line_up) + * `GAPotential._line_up()` - * [`GAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.GAPotential.evaluate) + * `GAPotential.evaluate()` - * [`GAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.GAPotential.from_config) + * `GAPotential.from_config()` - * [`GAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.GAPotential.pair_coeff) + * `GAPotential.pair_coeff` - * [`GAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.GAPotential.pair_style) + * `GAPotential.pair_style` - * [`GAPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes.GAPotential.read_cfgs) + * `GAPotential.read_cfgs()` - * [`GAPotential.save()`](maml.apps.pes.md#maml.apps.pes.GAPotential.save) + * `GAPotential.save()` - * [`GAPotential.train()`](maml.apps.pes.md#maml.apps.pes.GAPotential.train) + * `GAPotential.train()` - * [`GAPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes.GAPotential.write_cfgs) + * `GAPotential.write_cfgs()` - * [`GAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.GAPotential.write_param) + * `GAPotential.write_param()` - * [`LMPStaticCalculator`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator) + * `LMPStaticCalculator` - * [`LMPStaticCalculator._COMMON_CMDS`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._COMMON_CMDS) + * `LMPStaticCalculator._COMMON_CMDS` - * [`LMPStaticCalculator._parse()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._parse) + * `LMPStaticCalculator._parse()` - * [`LMPStaticCalculator._sanity_check()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._sanity_check) + * `LMPStaticCalculator._sanity_check()` - * [`LMPStaticCalculator._setup()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator._setup) + * `LMPStaticCalculator._setup()` - * [`LMPStaticCalculator.allowed_kwargs`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator.allowed_kwargs) + * `LMPStaticCalculator.allowed_kwargs` - * [`LMPStaticCalculator.calculate()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator.calculate) + * `LMPStaticCalculator.calculate()` - * [`LMPStaticCalculator.set_lmp_exe()`](maml.apps.pes.md#maml.apps.pes.LMPStaticCalculator.set_lmp_exe) + * `LMPStaticCalculator.set_lmp_exe()` - * [`LatticeConstant`](maml.apps.pes.md#maml.apps.pes.LatticeConstant) + * `LatticeConstant` - * [`LatticeConstant.calculate()`](maml.apps.pes.md#maml.apps.pes.LatticeConstant.calculate) + * `LatticeConstant.calculate()` - * [`MTPotential`](maml.apps.pes.md#maml.apps.pes.MTPotential) + * `MTPotential` - * [`MTPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.MTPotential._abc_impl) + * `MTPotential._abc_impl` - * [`MTPotential._line_up()`](maml.apps.pes.md#maml.apps.pes.MTPotential._line_up) + * `MTPotential._line_up()` - * [`MTPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.MTPotential.evaluate) + * `MTPotential.evaluate()` - * [`MTPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.MTPotential.from_config) + * `MTPotential.from_config()` - * [`MTPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.MTPotential.pair_coeff) + * `MTPotential.pair_coeff` - * [`MTPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.MTPotential.pair_style) + * `MTPotential.pair_style` - * [`MTPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes.MTPotential.read_cfgs) + * `MTPotential.read_cfgs()` - * [`MTPotential.train()`](maml.apps.pes.md#maml.apps.pes.MTPotential.train) + * `MTPotential.train()` - * [`MTPotential.write_cfg()`](maml.apps.pes.md#maml.apps.pes.MTPotential.write_cfg) + * `MTPotential.write_cfg()` - * [`MTPotential.write_ini()`](maml.apps.pes.md#maml.apps.pes.MTPotential.write_ini) + * `MTPotential.write_ini()` - * [`MTPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.MTPotential.write_param) + * `MTPotential.write_param()` - * [`NNPotential`](maml.apps.pes.md#maml.apps.pes.NNPotential) + * `NNPotential` - * [`NNPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.NNPotential._abc_impl) + * `NNPotential._abc_impl` - * [`NNPotential._line_up()`](maml.apps.pes.md#maml.apps.pes.NNPotential._line_up) + * `NNPotential._line_up()` - * [`NNPotential.bohr_to_angstrom`](maml.apps.pes.md#maml.apps.pes.NNPotential.bohr_to_angstrom) + * `NNPotential.bohr_to_angstrom` - * [`NNPotential.eV_to_Ha`](maml.apps.pes.md#maml.apps.pes.NNPotential.eV_to_Ha) + * `NNPotential.eV_to_Ha` - * [`NNPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.NNPotential.evaluate) + * `NNPotential.evaluate()` - * [`NNPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.NNPotential.from_config) + * `NNPotential.from_config()` - * [`NNPotential.load_input()`](maml.apps.pes.md#maml.apps.pes.NNPotential.load_input) + * `NNPotential.load_input()` - * [`NNPotential.load_scaler()`](maml.apps.pes.md#maml.apps.pes.NNPotential.load_scaler) + * `NNPotential.load_scaler()` - * [`NNPotential.load_weights()`](maml.apps.pes.md#maml.apps.pes.NNPotential.load_weights) + * `NNPotential.load_weights()` - * [`NNPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.NNPotential.pair_coeff) + * `NNPotential.pair_coeff` - * [`NNPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.NNPotential.pair_style) + * `NNPotential.pair_style` - * [`NNPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes.NNPotential.read_cfgs) + * `NNPotential.read_cfgs()` - * [`NNPotential.train()`](maml.apps.pes.md#maml.apps.pes.NNPotential.train) + * `NNPotential.train()` - * [`NNPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes.NNPotential.write_cfgs) + * `NNPotential.write_cfgs()` - * [`NNPotential.write_input()`](maml.apps.pes.md#maml.apps.pes.NNPotential.write_input) + * `NNPotential.write_input()` - * [`NNPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.NNPotential.write_param) + * `NNPotential.write_param()` - * [`NudgedElasticBand`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand) + * `NudgedElasticBand` - * [`NudgedElasticBand._parse()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand._parse) + * `NudgedElasticBand._parse()` - * [`NudgedElasticBand._sanity_check()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand._sanity_check) + * `NudgedElasticBand._sanity_check()` - * [`NudgedElasticBand._setup()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand._setup) + * `NudgedElasticBand._setup()` - * [`NudgedElasticBand.calculate()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand.calculate) + * `NudgedElasticBand.calculate()` - * [`NudgedElasticBand.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes.NudgedElasticBand.get_unit_cell) + * `NudgedElasticBand.get_unit_cell()` - * [`Potential`](maml.apps.pes.md#maml.apps.pes.Potential) + * `Potential` - * [`SNAPotential`](maml.apps.pes.md#maml.apps.pes.SNAPotential) + * `SNAPotential` - * [`SNAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes.SNAPotential._abc_impl) + * `SNAPotential._abc_impl` - * [`SNAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.evaluate) + * `SNAPotential.evaluate()` - * [`SNAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.from_config) + * `SNAPotential.from_config()` - * [`SNAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes.SNAPotential.pair_coeff) + * `SNAPotential.pair_coeff` - * [`SNAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes.SNAPotential.pair_style) + * `SNAPotential.pair_style` - * [`SNAPotential.train()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.train) + * `SNAPotential.train()` - * [`SNAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes.SNAPotential.write_param) + * `SNAPotential.write_param()` - * [`SpectralNeighborAnalysis`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis) + * `SpectralNeighborAnalysis` - * [`SpectralNeighborAnalysis._CMDS`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._CMDS) + * `SpectralNeighborAnalysis._CMDS` - * [`SpectralNeighborAnalysis._parse()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._parse) + * `SpectralNeighborAnalysis._parse()` - * [`SpectralNeighborAnalysis._sanity_check()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._sanity_check) + * `SpectralNeighborAnalysis._sanity_check()` - * [`SpectralNeighborAnalysis._setup()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis._setup) + * `SpectralNeighborAnalysis._setup()` - * [`SpectralNeighborAnalysis.get_bs_subscripts()`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis.get_bs_subscripts) + * `SpectralNeighborAnalysis.get_bs_subscripts()` - * [`SpectralNeighborAnalysis.n_bs`](maml.apps.pes.md#maml.apps.pes.SpectralNeighborAnalysis.n_bs) + * `SpectralNeighborAnalysis.n_bs` - * [`get_default_lmp_exe()`](maml.apps.pes.md#maml.apps.pes.get_default_lmp_exe) + * `get_default_lmp_exe()` + * maml.apps.pes._base module - * [maml.apps.pes._base module](maml.apps.pes.md#module-maml.apps.pes._base) + * `Potential` - * [`Potential`](maml.apps.pes.md#maml.apps.pes._base.Potential) + * `PotentialMixin` - * [`PotentialMixin`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin) + * `PotentialMixin.evaluate()` - * [`PotentialMixin.evaluate()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.evaluate) + * `PotentialMixin.from_config()` - * [`PotentialMixin.from_config()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.from_config) + * `PotentialMixin.predict_efs()` - * [`PotentialMixin.predict_efs()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.predict_efs) + * `PotentialMixin.train()` - * [`PotentialMixin.train()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.train) + * `PotentialMixin.write_param()` - * [`PotentialMixin.write_param()`](maml.apps.pes.md#maml.apps.pes._base.PotentialMixin.write_param) + * maml.apps.pes._gap module - * [maml.apps.pes._gap module](maml.apps.pes.md#module-maml.apps.pes._gap) + * `GAPotential` - * [`GAPotential`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential) + * `GAPotential._abc_impl` - * [`GAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential._abc_impl) + * `GAPotential._line_up()` - * [`GAPotential._line_up()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential._line_up) + * `GAPotential.evaluate()` - * [`GAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.evaluate) + * `GAPotential.from_config()` - * [`GAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.from_config) + * `GAPotential.pair_coeff` - * [`GAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.pair_coeff) + * `GAPotential.pair_style` - * [`GAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.pair_style) + * `GAPotential.read_cfgs()` - * [`GAPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.read_cfgs) + * `GAPotential.save()` - * [`GAPotential.save()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.save) + * `GAPotential.train()` - * [`GAPotential.train()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.train) + * `GAPotential.write_cfgs()` - * [`GAPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.write_cfgs) + * `GAPotential.write_param()` - * [`GAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._gap.GAPotential.write_param) + * maml.apps.pes._lammps module - * [maml.apps.pes._lammps module](maml.apps.pes.md#module-maml.apps.pes._lammps) + * `DefectFormation` - * [`DefectFormation`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation) + * `DefectFormation._parse()` - * [`DefectFormation._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation._parse) + * `DefectFormation._sanity_check()` - * [`DefectFormation._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation._sanity_check) + * `DefectFormation._setup()` - * [`DefectFormation._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation._setup) + * `DefectFormation.calculate()` - * [`DefectFormation.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation.calculate) + * `DefectFormation.get_unit_cell()` - * [`DefectFormation.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes._lammps.DefectFormation.get_unit_cell) + * `ElasticConstant` - * [`ElasticConstant`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant) + * `ElasticConstant._RESTART_CONFIG` - * [`ElasticConstant._RESTART_CONFIG`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._RESTART_CONFIG) + * `ElasticConstant._parse()` - * [`ElasticConstant._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._parse) + * `ElasticConstant._sanity_check()` - * [`ElasticConstant._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._sanity_check) + * `ElasticConstant._setup()` - * [`ElasticConstant._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.ElasticConstant._setup) + * `EnergyForceStress` - * [`EnergyForceStress`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress) + * `EnergyForceStress._parse()` - * [`EnergyForceStress._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._parse) + * `EnergyForceStress._rotate_force_stress()` - * [`EnergyForceStress._rotate_force_stress()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._rotate_force_stress) + * `EnergyForceStress._sanity_check()` - * [`EnergyForceStress._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._sanity_check) + * `EnergyForceStress._setup()` - * [`EnergyForceStress._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress._setup) + * `EnergyForceStress.calculate()` - * [`EnergyForceStress.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.EnergyForceStress.calculate) + * `LMPRelaxationCalculator` - * [`LMPRelaxationCalculator`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator) + * `LMPRelaxationCalculator._parse()` - * [`LMPRelaxationCalculator._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator._parse) + * `LMPRelaxationCalculator._sanity_check()` - * [`LMPRelaxationCalculator._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator._sanity_check) + * `LMPRelaxationCalculator._setup()` - * [`LMPRelaxationCalculator._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPRelaxationCalculator._setup) + * `LMPStaticCalculator` - * [`LMPStaticCalculator`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator) + * `LMPStaticCalculator._COMMON_CMDS` - * [`LMPStaticCalculator._COMMON_CMDS`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._COMMON_CMDS) + * `LMPStaticCalculator._parse()` - * [`LMPStaticCalculator._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._parse) + * `LMPStaticCalculator._sanity_check()` - * [`LMPStaticCalculator._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._sanity_check) + * `LMPStaticCalculator._setup()` - * [`LMPStaticCalculator._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator._setup) + * `LMPStaticCalculator.allowed_kwargs` - * [`LMPStaticCalculator.allowed_kwargs`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator.allowed_kwargs) + * `LMPStaticCalculator.calculate()` - * [`LMPStaticCalculator.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator.calculate) + * `LMPStaticCalculator.set_lmp_exe()` - * [`LMPStaticCalculator.set_lmp_exe()`](maml.apps.pes.md#maml.apps.pes._lammps.LMPStaticCalculator.set_lmp_exe) + * `LammpsPotential` - * [`LammpsPotential`](maml.apps.pes.md#maml.apps.pes._lammps.LammpsPotential) + * `LammpsPotential._abc_impl` - * [`LammpsPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._lammps.LammpsPotential._abc_impl) + * `LammpsPotential.predict_efs()` - * [`LammpsPotential.predict_efs()`](maml.apps.pes.md#maml.apps.pes._lammps.LammpsPotential.predict_efs) + * `LatticeConstant` - * [`LatticeConstant`](maml.apps.pes.md#maml.apps.pes._lammps.LatticeConstant) + * `LatticeConstant.calculate()` - * [`LatticeConstant.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.LatticeConstant.calculate) + * `NudgedElasticBand` - * [`NudgedElasticBand`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand) + * `NudgedElasticBand._parse()` - * [`NudgedElasticBand._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand._parse) + * `NudgedElasticBand._sanity_check()` - * [`NudgedElasticBand._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand._sanity_check) + * `NudgedElasticBand._setup()` - * [`NudgedElasticBand._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand._setup) + * `NudgedElasticBand.calculate()` - * [`NudgedElasticBand.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand.calculate) + * `NudgedElasticBand.get_unit_cell()` - * [`NudgedElasticBand.get_unit_cell()`](maml.apps.pes.md#maml.apps.pes._lammps.NudgedElasticBand.get_unit_cell) + * `SpectralNeighborAnalysis` - * [`SpectralNeighborAnalysis`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis) + * `SpectralNeighborAnalysis._CMDS` - * [`SpectralNeighborAnalysis._CMDS`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._CMDS) + * `SpectralNeighborAnalysis._parse()` - * [`SpectralNeighborAnalysis._parse()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._parse) + * `SpectralNeighborAnalysis._sanity_check()` - * [`SpectralNeighborAnalysis._sanity_check()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._sanity_check) + * `SpectralNeighborAnalysis._setup()` - * [`SpectralNeighborAnalysis._setup()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis._setup) + * `SpectralNeighborAnalysis.get_bs_subscripts()` - * [`SpectralNeighborAnalysis.get_bs_subscripts()`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis.get_bs_subscripts) + * `SpectralNeighborAnalysis.n_bs` - * [`SpectralNeighborAnalysis.n_bs`](maml.apps.pes.md#maml.apps.pes._lammps.SpectralNeighborAnalysis.n_bs) + * `SurfaceEnergy` - * [`SurfaceEnergy`](maml.apps.pes.md#maml.apps.pes._lammps.SurfaceEnergy) + * `SurfaceEnergy.calculate()` - * [`SurfaceEnergy.calculate()`](maml.apps.pes.md#maml.apps.pes._lammps.SurfaceEnergy.calculate) + * `_pretty_input()` - * [`_pretty_input()`](maml.apps.pes.md#maml.apps.pes._lammps._pretty_input) + * `_read_dump()` - * [`_read_dump()`](maml.apps.pes.md#maml.apps.pes._lammps._read_dump) + * `get_default_lmp_exe()` - * [`get_default_lmp_exe()`](maml.apps.pes.md#maml.apps.pes._lammps.get_default_lmp_exe) + * maml.apps.pes._mtp module - * [maml.apps.pes._mtp module](maml.apps.pes.md#module-maml.apps.pes._mtp) + * `MTPotential` - * [`MTPotential`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential) + * `MTPotential._abc_impl` - * [`MTPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential._abc_impl) + * `MTPotential._line_up()` - * [`MTPotential._line_up()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential._line_up) + * `MTPotential.evaluate()` - * [`MTPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.evaluate) + * `MTPotential.from_config()` - * [`MTPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.from_config) + * `MTPotential.pair_coeff` - * [`MTPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.pair_coeff) + * `MTPotential.pair_style` - * [`MTPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.pair_style) + * `MTPotential.read_cfgs()` - * [`MTPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.read_cfgs) + * `MTPotential.train()` - * [`MTPotential.train()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.train) + * `MTPotential.write_cfg()` - * [`MTPotential.write_cfg()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.write_cfg) + * `MTPotential.write_ini()` - * [`MTPotential.write_ini()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.write_ini) + * `MTPotential.write_param()` - * [`MTPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._mtp.MTPotential.write_param) + * `feed()` - * [`feed()`](maml.apps.pes.md#maml.apps.pes._mtp.feed) + * maml.apps.pes._nnp module - * [maml.apps.pes._nnp module](maml.apps.pes.md#module-maml.apps.pes._nnp) + * `NNPotential` - * [`NNPotential`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential) + * `NNPotential._abc_impl` - * [`NNPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential._abc_impl) + * `NNPotential._line_up()` - * [`NNPotential._line_up()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential._line_up) + * `NNPotential.bohr_to_angstrom` - * [`NNPotential.bohr_to_angstrom`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.bohr_to_angstrom) + * `NNPotential.eV_to_Ha` - * [`NNPotential.eV_to_Ha`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.eV_to_Ha) + * `NNPotential.evaluate()` - * [`NNPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.evaluate) + * `NNPotential.from_config()` - * [`NNPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.from_config) + * `NNPotential.load_input()` - * [`NNPotential.load_input()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.load_input) + * `NNPotential.load_scaler()` - * [`NNPotential.load_scaler()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.load_scaler) + * `NNPotential.load_weights()` - * [`NNPotential.load_weights()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.load_weights) + * `NNPotential.pair_coeff` - * [`NNPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.pair_coeff) + * `NNPotential.pair_style` - * [`NNPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.pair_style) + * `NNPotential.read_cfgs()` - * [`NNPotential.read_cfgs()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.read_cfgs) + * `NNPotential.train()` - * [`NNPotential.train()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.train) + * `NNPotential.write_cfgs()` - * [`NNPotential.write_cfgs()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.write_cfgs) + * `NNPotential.write_input()` - * [`NNPotential.write_input()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.write_input) + * `NNPotential.write_param()` - * [`NNPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._nnp.NNPotential.write_param) + * maml.apps.pes._snap module - * [maml.apps.pes._snap module](maml.apps.pes.md#module-maml.apps.pes._snap) + * `SNAPotential` - * [`SNAPotential`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential) + * `SNAPotential._abc_impl` - * [`SNAPotential._abc_impl`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential._abc_impl) + * `SNAPotential.evaluate()` - * [`SNAPotential.evaluate()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.evaluate) + * `SNAPotential.from_config()` - * [`SNAPotential.from_config()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.from_config) + * `SNAPotential.pair_coeff` - * [`SNAPotential.pair_coeff`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.pair_coeff) + * `SNAPotential.pair_style` - * [`SNAPotential.pair_style`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.pair_style) + * `SNAPotential.train()` - * [`SNAPotential.train()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.train) - - - * [`SNAPotential.write_param()`](maml.apps.pes.md#maml.apps.pes._snap.SNAPotential.write_param) + * `SNAPotential.write_param()` * [maml.apps.symbolic package](maml.apps.symbolic.md) - * [`AdaptiveLasso`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso) - + * `AdaptiveLasso` - * [`AdaptiveLasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso._penalty_jac) + * `AdaptiveLasso._penalty_jac()` - * [`AdaptiveLasso.get_w()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso.get_w) + * `AdaptiveLasso.get_w()` - * [`AdaptiveLasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso.penalty) + * `AdaptiveLasso.penalty()` - * [`AdaptiveLasso.select()`](maml.apps.symbolic.md#maml.apps.symbolic.AdaptiveLasso.select) + * `AdaptiveLasso.select()` - * [`DantzigSelector`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector) + * `DantzigSelector` - * [`DantzigSelector.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector.construct_constraints) + * `DantzigSelector.construct_constraints()` - * [`DantzigSelector.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector.construct_jac) + * `DantzigSelector.construct_jac()` - * [`DantzigSelector.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic.DantzigSelector.construct_loss) + * `DantzigSelector.construct_loss()` - * [`FeatureGenerator`](maml.apps.symbolic.md#maml.apps.symbolic.FeatureGenerator) + * `FeatureGenerator` - * [`FeatureGenerator.augment()`](maml.apps.symbolic.md#maml.apps.symbolic.FeatureGenerator.augment) + * `FeatureGenerator.augment()` - * [`ISIS`](maml.apps.symbolic.md#maml.apps.symbolic.ISIS) + * `ISIS` - * [`ISIS.evaluate()`](maml.apps.symbolic.md#maml.apps.symbolic.ISIS.evaluate) + * `ISIS.evaluate()` - * [`ISIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic.ISIS.run) + * `ISIS.run()` - * [`L0BrutalForce`](maml.apps.symbolic.md#maml.apps.symbolic.L0BrutalForce) + * `L0BrutalForce` - * [`L0BrutalForce.select()`](maml.apps.symbolic.md#maml.apps.symbolic.L0BrutalForce.select) + * `L0BrutalForce.select()` - * [`Lasso`](maml.apps.symbolic.md#maml.apps.symbolic.Lasso) + * `Lasso` - * [`Lasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.Lasso._penalty_jac) + * `Lasso._penalty_jac()` - * [`Lasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic.Lasso.penalty) + * `Lasso.penalty()` - * [`Operator`](maml.apps.symbolic.md#maml.apps.symbolic.Operator) + * `Operator` - * [`Operator.compute()`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.compute) + * `Operator.compute()` - * [`Operator.from_str()`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.from_str) + * `Operator.from_str()` - * [`Operator.gen_name()`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.gen_name) + * `Operator.gen_name()` - * [`Operator.is_binary`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.is_binary) + * `Operator.is_binary` - * [`Operator.is_commutative`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.is_commutative) + * `Operator.is_commutative` - * [`Operator.is_unary`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.is_unary) + * `Operator.is_unary` - * [`Operator.support_op_rep`](maml.apps.symbolic.md#maml.apps.symbolic.Operator.support_op_rep) + * `Operator.support_op_rep` - * [`SCAD`](maml.apps.symbolic.md#maml.apps.symbolic.SCAD) + * `SCAD` - * [`SCAD._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic.SCAD._penalty_jac) + * `SCAD._penalty_jac()` - * [`SCAD.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic.SCAD.penalty) + * `SCAD.penalty()` - * [`SIS`](maml.apps.symbolic.md#maml.apps.symbolic.SIS) + * `SIS` - * [`SIS.compute_residual()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.compute_residual) + * `SIS.compute_residual()` - * [`SIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.run) + * `SIS.run()` - * [`SIS.screen()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.screen) + * `SIS.screen()` - * [`SIS.select()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.select) + * `SIS.select()` - * [`SIS.set_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.set_gamma) + * `SIS.set_gamma()` - * [`SIS.set_selector()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.set_selector) + * `SIS.set_selector()` - * [`SIS.update_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic.SIS.update_gamma) + * `SIS.update_gamma()` + * maml.apps.symbolic._feature_generator module - * [maml.apps.symbolic._feature_generator module](maml.apps.symbolic.md#module-maml.apps.symbolic._feature_generator) + * `FeatureGenerator` - * [`FeatureGenerator`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.FeatureGenerator) + * `FeatureGenerator.augment()` - * [`FeatureGenerator.augment()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.FeatureGenerator.augment) + * `Operator` - * [`Operator`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator) + * `Operator.compute()` - * [`Operator.compute()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.compute) + * `Operator.from_str()` - * [`Operator.from_str()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.from_str) + * `Operator.gen_name()` - * [`Operator.gen_name()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.gen_name) + * `Operator.is_binary` - * [`Operator.is_binary`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.is_binary) + * `Operator.is_commutative` - * [`Operator.is_commutative`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.is_commutative) + * `Operator.is_unary` - * [`Operator.is_unary`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.is_unary) + * `Operator.support_op_rep` - * [`Operator.support_op_rep`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.Operator.support_op_rep) + * `_my_abs_diff()` - * [`_my_abs_diff()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_diff) + * `_my_abs_log10()` - * [`_my_abs_log10()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_log10) + * `_my_abs_sqrt()` - * [`_my_abs_sqrt()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_sqrt) + * `_my_abs_sum()` - * [`_my_abs_sum()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_abs_sum) + * `_my_diff()` - * [`_my_diff()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_diff) + * `_my_div()` - * [`_my_div()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_div) + * `_my_exp()` - * [`_my_exp()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_exp) + * `_my_exp_power_2()` - * [`_my_exp_power_2()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_exp_power_2) + * `_my_exp_power_3()` - * [`_my_exp_power_3()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_exp_power_3) + * `_my_mul()` - * [`_my_mul()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_mul) + * `_my_power()` - * [`_my_power()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_power) + * `_my_sum()` - * [`_my_sum()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum) + * `_my_sum_exp()` - * [`_my_sum_exp()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum_exp) + * `_my_sum_power_2()` - * [`_my_sum_power_2()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum_power_2) + * `_my_sum_power_3()` - * [`_my_sum_power_3()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._my_sum_power_3) + * `_update_df()` - * [`_update_df()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator._update_df) + * `generate_feature()` - * [`generate_feature()`](maml.apps.symbolic.md#maml.apps.symbolic._feature_generator.generate_feature) + * maml.apps.symbolic._selectors module - * [maml.apps.symbolic._selectors module](maml.apps.symbolic.md#module-maml.apps.symbolic._selectors) + * `AdaptiveLasso` - * [`AdaptiveLasso`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso) + * `AdaptiveLasso._penalty_jac()` - * [`AdaptiveLasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso._penalty_jac) + * `AdaptiveLasso.get_w()` - * [`AdaptiveLasso.get_w()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso.get_w) + * `AdaptiveLasso.penalty()` - * [`AdaptiveLasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso.penalty) + * `AdaptiveLasso.select()` - * [`AdaptiveLasso.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.AdaptiveLasso.select) + * `BaseSelector` - * [`BaseSelector`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector) + * `BaseSelector._get_param_names()` - * [`BaseSelector._get_param_names()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector._get_param_names) + * `BaseSelector.compute_residual()` - * [`BaseSelector.compute_residual()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.compute_residual) + * `BaseSelector.construct_constraints()` - * [`BaseSelector.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.construct_constraints) + * `BaseSelector.construct_jac()` - * [`BaseSelector.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.construct_jac) + * `BaseSelector.construct_loss()` - * [`BaseSelector.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.construct_loss) + * `BaseSelector.evaluate()` - * [`BaseSelector.evaluate()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.evaluate) + * `BaseSelector.get_coef()` - * [`BaseSelector.get_coef()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.get_coef) + * `BaseSelector.get_feature_indices()` - * [`BaseSelector.get_feature_indices()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.get_feature_indices) + * `BaseSelector.get_params()` - * [`BaseSelector.get_params()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.get_params) + * `BaseSelector.predict()` - * [`BaseSelector.predict()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.predict) + * `BaseSelector.select()` - * [`BaseSelector.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.select) + * `BaseSelector.set_params()` - * [`BaseSelector.set_params()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.BaseSelector.set_params) + * `DantzigSelector` - * [`DantzigSelector`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector) + * `DantzigSelector.construct_constraints()` - * [`DantzigSelector.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector.construct_constraints) + * `DantzigSelector.construct_jac()` - * [`DantzigSelector.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector.construct_jac) + * `DantzigSelector.construct_loss()` - * [`DantzigSelector.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.DantzigSelector.construct_loss) + * `L0BrutalForce` - * [`L0BrutalForce`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.L0BrutalForce) + * `L0BrutalForce.select()` - * [`L0BrutalForce.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.L0BrutalForce.select) + * `Lasso` - * [`Lasso`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.Lasso) + * `Lasso._penalty_jac()` - * [`Lasso._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.Lasso._penalty_jac) + * `Lasso.penalty()` - * [`Lasso.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.Lasso.penalty) + * `PenalizedLeastSquares` - * [`PenalizedLeastSquares`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares) + * `PenalizedLeastSquares._penalty_jac()` - * [`PenalizedLeastSquares._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares._penalty_jac) + * `PenalizedLeastSquares._sse_jac()` - * [`PenalizedLeastSquares._sse_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares._sse_jac) + * `PenalizedLeastSquares.construct_constraints()` - * [`PenalizedLeastSquares.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.construct_constraints) + * `PenalizedLeastSquares.construct_jac()` - * [`PenalizedLeastSquares.construct_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.construct_jac) + * `PenalizedLeastSquares.construct_loss()` - * [`PenalizedLeastSquares.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.construct_loss) + * `PenalizedLeastSquares.penalty()` - * [`PenalizedLeastSquares.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.PenalizedLeastSquares.penalty) + * `SCAD` - * [`SCAD`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.SCAD) + * `SCAD._penalty_jac()` - * [`SCAD._penalty_jac()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.SCAD._penalty_jac) + * `SCAD.penalty()` - * [`SCAD.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors.SCAD.penalty) + * maml.apps.symbolic._selectors_cvxpy module - * [maml.apps.symbolic._selectors_cvxpy module](maml.apps.symbolic.md#module-maml.apps.symbolic._selectors_cvxpy) + * `AdaptiveLassoCP` - * [`AdaptiveLassoCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP) + * `AdaptiveLassoCP.get_w()` - * [`AdaptiveLassoCP.get_w()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP.get_w) + * `AdaptiveLassoCP.penalty()` - * [`AdaptiveLassoCP.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP.penalty) + * `AdaptiveLassoCP.select()` - * [`AdaptiveLassoCP.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.AdaptiveLassoCP.select) + * `BaseSelectorCP` - * [`BaseSelectorCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP) + * `BaseSelectorCP.construct_constraints()` - * [`BaseSelectorCP.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP.construct_constraints) + * `BaseSelectorCP.construct_loss()` - * [`BaseSelectorCP.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP.construct_loss) + * `BaseSelectorCP.select()` - * [`BaseSelectorCP.select()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.BaseSelectorCP.select) + * `DantzigSelectorCP` - * [`DantzigSelectorCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP) + * `DantzigSelectorCP.construct_constraints()` - * [`DantzigSelectorCP.construct_constraints()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP.construct_constraints) + * `DantzigSelectorCP.construct_loss()` - * [`DantzigSelectorCP.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.DantzigSelectorCP.construct_loss) + * `LassoCP` - * [`LassoCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.LassoCP) + * `LassoCP.penalty()` - * [`LassoCP.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.LassoCP.penalty) + * `PenalizedLeastSquaresCP` - * [`PenalizedLeastSquaresCP`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP) + * `PenalizedLeastSquaresCP.construct_loss()` - * [`PenalizedLeastSquaresCP.construct_loss()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP.construct_loss) + * `PenalizedLeastSquaresCP.penalty()` - * [`PenalizedLeastSquaresCP.penalty()`](maml.apps.symbolic.md#maml.apps.symbolic._selectors_cvxpy.PenalizedLeastSquaresCP.penalty) + * maml.apps.symbolic._sis module - * [maml.apps.symbolic._sis module](maml.apps.symbolic.md#module-maml.apps.symbolic._sis) + * `ISIS` - * [`ISIS`](maml.apps.symbolic.md#maml.apps.symbolic._sis.ISIS) + * `ISIS.evaluate()` - * [`ISIS.evaluate()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.ISIS.evaluate) + * `ISIS.run()` - * [`ISIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.ISIS.run) + * `SIS` - * [`SIS`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS) + * `SIS.compute_residual()` - * [`SIS.compute_residual()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.compute_residual) + * `SIS.run()` - * [`SIS.run()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.run) + * `SIS.screen()` - * [`SIS.screen()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.screen) + * `SIS.select()` - * [`SIS.select()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.select) + * `SIS.set_gamma()` - * [`SIS.set_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.set_gamma) + * `SIS.set_selector()` - * [`SIS.set_selector()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.set_selector) + * `SIS.update_gamma()` - * [`SIS.update_gamma()`](maml.apps.symbolic.md#maml.apps.symbolic._sis.SIS.update_gamma) + * `_best_combination()` - * [`_best_combination()`](maml.apps.symbolic.md#maml.apps.symbolic._sis._best_combination) + * `_eval()` - * [`_eval()`](maml.apps.symbolic.md#maml.apps.symbolic._sis._eval) - - * [`_get_coeff()`](maml.apps.symbolic.md#maml.apps.symbolic._sis._get_coeff) + * `_get_coeff()` * [maml.base package](maml.base.md) - * [`BaseDataSource`](maml.base.md#maml.base.BaseDataSource) - + * `BaseDataSource` - * [`BaseDataSource.get()`](maml.base.md#maml.base.BaseDataSource.get) + * `BaseDataSource.get()` - * [`BaseDescriber`](maml.base.md#maml.base.BaseDescriber) + * `BaseDescriber` - * [`BaseDescriber._abc_impl`](maml.base.md#maml.base.BaseDescriber._abc_impl) + * `BaseDescriber._abc_impl` - * [`BaseDescriber._is_multi_output()`](maml.base.md#maml.base.BaseDescriber._is_multi_output) + * `BaseDescriber._is_multi_output()` - * [`BaseDescriber._sklearn_auto_wrap_output_keys`](maml.base.md#maml.base.BaseDescriber._sklearn_auto_wrap_output_keys) + * `BaseDescriber._sklearn_auto_wrap_output_keys` - * [`BaseDescriber.clear_cache()`](maml.base.md#maml.base.BaseDescriber.clear_cache) + * `BaseDescriber.clear_cache()` - * [`BaseDescriber.feature_dim`](maml.base.md#maml.base.BaseDescriber.feature_dim) + * `BaseDescriber.feature_dim` - * [`BaseDescriber.fit()`](maml.base.md#maml.base.BaseDescriber.fit) + * `BaseDescriber.fit()` - * [`BaseDescriber.transform()`](maml.base.md#maml.base.BaseDescriber.transform) + * `BaseDescriber.transform()` - * [`BaseDescriber.transform_one()`](maml.base.md#maml.base.BaseDescriber.transform_one) + * `BaseDescriber.transform_one()` - * [`BaseModel`](maml.base.md#maml.base.BaseModel) + * `BaseModel` - * [`BaseModel._predict()`](maml.base.md#maml.base.BaseModel._predict) + * `BaseModel._predict()` - * [`BaseModel.fit()`](maml.base.md#maml.base.BaseModel.fit) + * `BaseModel.fit()` - * [`BaseModel.predict_objs()`](maml.base.md#maml.base.BaseModel.predict_objs) + * `BaseModel.predict_objs()` - * [`BaseModel.train()`](maml.base.md#maml.base.BaseModel.train) + * `BaseModel.train()` - * [`DummyDescriber`](maml.base.md#maml.base.DummyDescriber) + * `DummyDescriber` - * [`DummyDescriber._abc_impl`](maml.base.md#maml.base.DummyDescriber._abc_impl) + * `DummyDescriber._abc_impl` - * [`DummyDescriber._sklearn_auto_wrap_output_keys`](maml.base.md#maml.base.DummyDescriber._sklearn_auto_wrap_output_keys) + * `DummyDescriber._sklearn_auto_wrap_output_keys` - * [`DummyDescriber.transform_one()`](maml.base.md#maml.base.DummyDescriber.transform_one) + * `DummyDescriber.transform_one()` - * [`KerasModel`](maml.base.md#maml.base.KerasModel) + * `KerasModel` - * [`KerasModel._get_validation_data()`](maml.base.md#maml.base.KerasModel._get_validation_data) + * `KerasModel._get_validation_data()` - * [`KerasModel.fit()`](maml.base.md#maml.base.KerasModel.fit) + * `KerasModel.fit()` - * [`SKLModel`](maml.base.md#maml.base.SKLModel) + * `SKLModel` - * [`SequentialDescriber`](maml.base.md#maml.base.SequentialDescriber) + * `SequentialDescriber` - * [`SequentialDescriber._abc_impl`](maml.base.md#maml.base.SequentialDescriber._abc_impl) + * `SequentialDescriber._abc_impl` - * [`SequentialDescriber.steps`](maml.base.md#maml.base.SequentialDescriber.steps) + * `SequentialDescriber.steps` - * [`TargetScalerMixin`](maml.base.md#maml.base.TargetScalerMixin) + * `TargetScalerMixin` - * [`TargetScalerMixin.predict_objs()`](maml.base.md#maml.base.TargetScalerMixin.predict_objs) + * `TargetScalerMixin.predict_objs()` - * [`TargetScalerMixin.train()`](maml.base.md#maml.base.TargetScalerMixin.train) + * `TargetScalerMixin.train()` - * [`describer_type()`](maml.base.md#maml.base.describer_type) + * `describer_type()` - * [`get_feature_batch()`](maml.base.md#maml.base.get_feature_batch) + * `get_feature_batch()` - * [`is_keras_model()`](maml.base.md#maml.base.is_keras_model) + * `is_keras_model()` - * [`is_sklearn_model()`](maml.base.md#maml.base.is_sklearn_model) + * `is_sklearn_model()` + * maml.base._data module - * [maml.base._data module](maml.base.md#module-maml.base._data) + * `BaseDataSource` - * [`BaseDataSource`](maml.base.md#maml.base._data.BaseDataSource) + * `BaseDataSource.get()` - * [`BaseDataSource.get()`](maml.base.md#maml.base._data.BaseDataSource.get) + * maml.base._describer module - * [maml.base._describer module](maml.base.md#module-maml.base._describer) + * `BaseDescriber` - * [`BaseDescriber`](maml.base.md#maml.base._describer.BaseDescriber) + * `BaseDescriber._abc_impl` - * [`BaseDescriber._abc_impl`](maml.base.md#maml.base._describer.BaseDescriber._abc_impl) + * `BaseDescriber._is_multi_output()` - * [`BaseDescriber._is_multi_output()`](maml.base.md#maml.base._describer.BaseDescriber._is_multi_output) + * `BaseDescriber._sklearn_auto_wrap_output_keys` - * [`BaseDescriber._sklearn_auto_wrap_output_keys`](maml.base.md#maml.base._describer.BaseDescriber._sklearn_auto_wrap_output_keys) + * `BaseDescriber.clear_cache()` - * [`BaseDescriber.clear_cache()`](maml.base.md#maml.base._describer.BaseDescriber.clear_cache) + * `BaseDescriber.feature_dim` - * [`BaseDescriber.feature_dim`](maml.base.md#maml.base._describer.BaseDescriber.feature_dim) + * `BaseDescriber.fit()` - * [`BaseDescriber.fit()`](maml.base.md#maml.base._describer.BaseDescriber.fit) + * `BaseDescriber.transform()` - * [`BaseDescriber.transform()`](maml.base.md#maml.base._describer.BaseDescriber.transform) + * `BaseDescriber.transform_one()` - * [`BaseDescriber.transform_one()`](maml.base.md#maml.base._describer.BaseDescriber.transform_one) + * `DummyDescriber` - * [`DummyDescriber`](maml.base.md#maml.base._describer.DummyDescriber) + * `DummyDescriber._abc_impl` - * [`DummyDescriber._abc_impl`](maml.base.md#maml.base._describer.DummyDescriber._abc_impl) + * `DummyDescriber._sklearn_auto_wrap_output_keys` - * [`DummyDescriber._sklearn_auto_wrap_output_keys`](maml.base.md#maml.base._describer.DummyDescriber._sklearn_auto_wrap_output_keys) + * `DummyDescriber.transform_one()` - * [`DummyDescriber.transform_one()`](maml.base.md#maml.base._describer.DummyDescriber.transform_one) + * `SequentialDescriber` - * [`SequentialDescriber`](maml.base.md#maml.base._describer.SequentialDescriber) + * `SequentialDescriber._abc_impl` - * [`SequentialDescriber._abc_impl`](maml.base.md#maml.base._describer.SequentialDescriber._abc_impl) + * `SequentialDescriber.steps` - * [`SequentialDescriber.steps`](maml.base.md#maml.base._describer.SequentialDescriber.steps) + * `_transform_one()` - * [`_transform_one()`](maml.base.md#maml.base._describer._transform_one) + * `describer_type()` - * [`describer_type()`](maml.base.md#maml.base._describer.describer_type) + * maml.base._feature_batch module - * [maml.base._feature_batch module](maml.base.md#module-maml.base._feature_batch) + * `get_feature_batch()` - * [`get_feature_batch()`](maml.base.md#maml.base._feature_batch.get_feature_batch) + * `no_action()` - * [`no_action()`](maml.base.md#maml.base._feature_batch.no_action) + * `pandas_concat()` - * [`pandas_concat()`](maml.base.md#maml.base._feature_batch.pandas_concat) + * `stack_first_dim()` - * [`stack_first_dim()`](maml.base.md#maml.base._feature_batch.stack_first_dim) + * `stack_padded()` - * [`stack_padded()`](maml.base.md#maml.base._feature_batch.stack_padded) + * maml.base._mixin module - * [maml.base._mixin module](maml.base.md#module-maml.base._mixin) + * `TargetScalerMixin` - * [`TargetScalerMixin`](maml.base.md#maml.base._mixin.TargetScalerMixin) + * `TargetScalerMixin.predict_objs()` - * [`TargetScalerMixin.predict_objs()`](maml.base.md#maml.base._mixin.TargetScalerMixin.predict_objs) + * `TargetScalerMixin.train()` - * [`TargetScalerMixin.train()`](maml.base.md#maml.base._mixin.TargetScalerMixin.train) + * maml.base._model module - * [maml.base._model module](maml.base.md#module-maml.base._model) + * `BaseModel` - * [`BaseModel`](maml.base.md#maml.base._model.BaseModel) + * `BaseModel._predict()` - * [`BaseModel._predict()`](maml.base.md#maml.base._model.BaseModel._predict) + * `BaseModel.fit()` - * [`BaseModel.fit()`](maml.base.md#maml.base._model.BaseModel.fit) + * `BaseModel.predict_objs()` - * [`BaseModel.predict_objs()`](maml.base.md#maml.base._model.BaseModel.predict_objs) + * `BaseModel.train()` - * [`BaseModel.train()`](maml.base.md#maml.base._model.BaseModel.train) + * `KerasMixin` - * [`KerasMixin`](maml.base.md#maml.base._model.KerasMixin) + * `KerasMixin.evaluate()` - * [`KerasMixin.evaluate()`](maml.base.md#maml.base._model.KerasMixin.evaluate) + * `KerasMixin.from_file()` - * [`KerasMixin.from_file()`](maml.base.md#maml.base._model.KerasMixin.from_file) + * `KerasMixin.get_input_dim()` - * [`KerasMixin.get_input_dim()`](maml.base.md#maml.base._model.KerasMixin.get_input_dim) + * `KerasMixin.load()` - * [`KerasMixin.load()`](maml.base.md#maml.base._model.KerasMixin.load) + * `KerasMixin.save()` - * [`KerasMixin.save()`](maml.base.md#maml.base._model.KerasMixin.save) + * `KerasModel` - * [`KerasModel`](maml.base.md#maml.base._model.KerasModel) + * `KerasModel._get_validation_data()` - * [`KerasModel._get_validation_data()`](maml.base.md#maml.base._model.KerasModel._get_validation_data) + * `KerasModel.fit()` - * [`KerasModel.fit()`](maml.base.md#maml.base._model.KerasModel.fit) + * `SKLModel` - * [`SKLModel`](maml.base.md#maml.base._model.SKLModel) + * `SklearnMixin` - * [`SklearnMixin`](maml.base.md#maml.base._model.SklearnMixin) + * `SklearnMixin.evaluate()` - * [`SklearnMixin.evaluate()`](maml.base.md#maml.base._model.SklearnMixin.evaluate) + * `SklearnMixin.from_file()` - * [`SklearnMixin.from_file()`](maml.base.md#maml.base._model.SklearnMixin.from_file) + * `SklearnMixin.load()` - * [`SklearnMixin.load()`](maml.base.md#maml.base._model.SklearnMixin.load) + * `SklearnMixin.save()` - * [`SklearnMixin.save()`](maml.base.md#maml.base._model.SklearnMixin.save) + * `is_keras_model()` - * [`is_keras_model()`](maml.base.md#maml.base._model.is_keras_model) - - * [`is_sklearn_model()`](maml.base.md#maml.base._model.is_sklearn_model) + * `is_sklearn_model()` * [maml.data package](maml.data.md) - * [`MaterialsProject`](maml.data.md#maml.data.MaterialsProject) - - - * [`MaterialsProject.get()`](maml.data.md#maml.data.MaterialsProject.get) + * `MaterialsProject` - * [`URLSource`](maml.data.md#maml.data.URLSource) + * `MaterialsProject.get()` - * [`URLSource.get()`](maml.data.md#maml.data.URLSource.get) + * `URLSource` + * `URLSource.get()` - * [maml.data._mp module](maml.data.md#module-maml.data._mp) + * maml.data._mp module - * [`MaterialsProject`](maml.data.md#maml.data._mp.MaterialsProject) + * `MaterialsProject` - * [`MaterialsProject.get()`](maml.data.md#maml.data._mp.MaterialsProject.get) + * `MaterialsProject.get()` - * [maml.data._url module](maml.data.md#module-maml.data._url) + * maml.data._url module - * [`FigshareSource`](maml.data.md#maml.data._url.FigshareSource) + * `FigshareSource` - * [`FigshareSource.get()`](maml.data.md#maml.data._url.FigshareSource.get) + * `FigshareSource.get()` - * [`URLSource`](maml.data.md#maml.data._url.URLSource) + * `URLSource` - * [`URLSource.get()`](maml.data.md#maml.data._url.URLSource.get) + * `URLSource.get()` * [maml.describers package](maml.describers.md) - * [`BPSymmetryFunctions`](maml.describers.md#maml.describers.BPSymmetryFunctions) + * `BPSymmetryFunctions` - * [`BPSymmetryFunctions._abc_impl`](maml.describers.md#maml.describers.BPSymmetryFunctions._abc_impl) + * `BPSymmetryFunctions._abc_impl` - * [`BPSymmetryFunctions._fc()`](maml.describers.md#maml.describers.BPSymmetryFunctions._fc) + * `BPSymmetryFunctions._fc()` - * [`BPSymmetryFunctions._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.BPSymmetryFunctions._sklearn_auto_wrap_output_keys) + * `BPSymmetryFunctions._sklearn_auto_wrap_output_keys` - * [`BPSymmetryFunctions.describer_type`](maml.describers.md#maml.describers.BPSymmetryFunctions.describer_type) + * `BPSymmetryFunctions.describer_type` - * [`BPSymmetryFunctions.transform_one()`](maml.describers.md#maml.describers.BPSymmetryFunctions.transform_one) + * `BPSymmetryFunctions.transform_one()` - * [`BispectrumCoefficients`](maml.describers.md#maml.describers.BispectrumCoefficients) + * `BispectrumCoefficients` - * [`BispectrumCoefficients._abc_impl`](maml.describers.md#maml.describers.BispectrumCoefficients._abc_impl) + * `BispectrumCoefficients._abc_impl` - * [`BispectrumCoefficients._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.BispectrumCoefficients._sklearn_auto_wrap_output_keys) + * `BispectrumCoefficients._sklearn_auto_wrap_output_keys` - * [`BispectrumCoefficients.describer_type`](maml.describers.md#maml.describers.BispectrumCoefficients.describer_type) + * `BispectrumCoefficients.describer_type` - * [`BispectrumCoefficients.feature_dim`](maml.describers.md#maml.describers.BispectrumCoefficients.feature_dim) + * `BispectrumCoefficients.feature_dim` - * [`BispectrumCoefficients.subscripts`](maml.describers.md#maml.describers.BispectrumCoefficients.subscripts) + * `BispectrumCoefficients.subscripts` - * [`BispectrumCoefficients.transform_one()`](maml.describers.md#maml.describers.BispectrumCoefficients.transform_one) + * `BispectrumCoefficients.transform_one()` - * [`CoulombEigenSpectrum`](maml.describers.md#maml.describers.CoulombEigenSpectrum) + * `CoulombEigenSpectrum` - * [`CoulombEigenSpectrum._abc_impl`](maml.describers.md#maml.describers.CoulombEigenSpectrum._abc_impl) + * `CoulombEigenSpectrum._abc_impl` - * [`CoulombEigenSpectrum._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.CoulombEigenSpectrum._sklearn_auto_wrap_output_keys) + * `CoulombEigenSpectrum._sklearn_auto_wrap_output_keys` - * [`CoulombEigenSpectrum.describer_type`](maml.describers.md#maml.describers.CoulombEigenSpectrum.describer_type) + * `CoulombEigenSpectrum.describer_type` - * [`CoulombEigenSpectrum.transform_one()`](maml.describers.md#maml.describers.CoulombEigenSpectrum.transform_one) + * `CoulombEigenSpectrum.transform_one()` - * [`CoulombMatrix`](maml.describers.md#maml.describers.CoulombMatrix) + * `CoulombMatrix` - * [`CoulombMatrix._abc_impl`](maml.describers.md#maml.describers.CoulombMatrix._abc_impl) + * `CoulombMatrix._abc_impl` - * [`CoulombMatrix._get_columb_mat()`](maml.describers.md#maml.describers.CoulombMatrix._get_columb_mat) + * `CoulombMatrix._get_columb_mat()` - * [`CoulombMatrix._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.CoulombMatrix._sklearn_auto_wrap_output_keys) + * `CoulombMatrix._sklearn_auto_wrap_output_keys` - * [`CoulombMatrix.describer_type`](maml.describers.md#maml.describers.CoulombMatrix.describer_type) + * `CoulombMatrix.describer_type` - * [`CoulombMatrix.get_coulomb_mat()`](maml.describers.md#maml.describers.CoulombMatrix.get_coulomb_mat) + * `CoulombMatrix.get_coulomb_mat()` - * [`CoulombMatrix.transform_one()`](maml.describers.md#maml.describers.CoulombMatrix.transform_one) + * `CoulombMatrix.transform_one()` - * [`DistinctSiteProperty`](maml.describers.md#maml.describers.DistinctSiteProperty) + * `DistinctSiteProperty` - * [`DistinctSiteProperty._abc_impl`](maml.describers.md#maml.describers.DistinctSiteProperty._abc_impl) + * `DistinctSiteProperty._abc_impl` - * [`DistinctSiteProperty._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.DistinctSiteProperty._sklearn_auto_wrap_output_keys) + * `DistinctSiteProperty._sklearn_auto_wrap_output_keys` - * [`DistinctSiteProperty.describer_type`](maml.describers.md#maml.describers.DistinctSiteProperty.describer_type) + * `DistinctSiteProperty.describer_type` - * [`DistinctSiteProperty.supported_properties`](maml.describers.md#maml.describers.DistinctSiteProperty.supported_properties) + * `DistinctSiteProperty.supported_properties` - * [`DistinctSiteProperty.transform_one()`](maml.describers.md#maml.describers.DistinctSiteProperty.transform_one) + * `DistinctSiteProperty.transform_one()` - * [`ElementProperty`](maml.describers.md#maml.describers.ElementProperty) + * `ElementProperty` - * [`ElementProperty._abc_impl`](maml.describers.md#maml.describers.ElementProperty._abc_impl) + * `ElementProperty._abc_impl` - * [`ElementProperty._get_param_names()`](maml.describers.md#maml.describers.ElementProperty._get_param_names) + * `ElementProperty._get_param_names()` - * [`ElementProperty._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.ElementProperty._sklearn_auto_wrap_output_keys) + * `ElementProperty._sklearn_auto_wrap_output_keys` - * [`ElementProperty.describer_type`](maml.describers.md#maml.describers.ElementProperty.describer_type) + * `ElementProperty.describer_type` - * [`ElementProperty.from_preset()`](maml.describers.md#maml.describers.ElementProperty.from_preset) + * `ElementProperty.from_preset()` - * [`ElementProperty.get_params()`](maml.describers.md#maml.describers.ElementProperty.get_params) + * `ElementProperty.get_params()` - * [`ElementProperty.transform_one()`](maml.describers.md#maml.describers.ElementProperty.transform_one) + * `ElementProperty.transform_one()` - * [`ElementStats`](maml.describers.md#maml.describers.ElementStats) + * `ElementStats` - * [`ElementStats.ALLOWED_STATS`](maml.describers.md#maml.describers.ElementStats.ALLOWED_STATS) + * `ElementStats.ALLOWED_STATS` - * [`ElementStats.AVAILABLE_DATA`](maml.describers.md#maml.describers.ElementStats.AVAILABLE_DATA) + * `ElementStats.AVAILABLE_DATA` - * [`ElementStats._abc_impl`](maml.describers.md#maml.describers.ElementStats._abc_impl) + * `ElementStats._abc_impl` - * [`ElementStats._reduce_dimension()`](maml.describers.md#maml.describers.ElementStats._reduce_dimension) + * `ElementStats._reduce_dimension()` - * [`ElementStats._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.ElementStats._sklearn_auto_wrap_output_keys) + * `ElementStats._sklearn_auto_wrap_output_keys` - * [`ElementStats.describer_type`](maml.describers.md#maml.describers.ElementStats.describer_type) + * `ElementStats.describer_type` - * [`ElementStats.from_data()`](maml.describers.md#maml.describers.ElementStats.from_data) + * `ElementStats.from_data()` - * [`ElementStats.from_file()`](maml.describers.md#maml.describers.ElementStats.from_file) + * `ElementStats.from_file()` - * [`ElementStats.transform_one()`](maml.describers.md#maml.describers.ElementStats.transform_one) + * `ElementStats.transform_one()` - * [`M3GNetStructure`](maml.describers.md#maml.describers.M3GNetStructure) + * `M3GNetStructure` - * [`M3GNetStructure._abc_impl`](maml.describers.md#maml.describers.M3GNetStructure._abc_impl) + * `M3GNetStructure._abc_impl` - * [`M3GNetStructure._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.M3GNetStructure._sklearn_auto_wrap_output_keys) + * `M3GNetStructure._sklearn_auto_wrap_output_keys` - * [`M3GNetStructure.transform_one()`](maml.describers.md#maml.describers.M3GNetStructure.transform_one) + * `M3GNetStructure.transform_one()` - * [`MEGNetSite`](maml.describers.md#maml.describers.MEGNetSite) + * `MEGNetSite` - * [`MEGNetSite._abc_impl`](maml.describers.md#maml.describers.MEGNetSite._abc_impl) + * `MEGNetSite._abc_impl` - * [`MEGNetSite._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.MEGNetSite._sklearn_auto_wrap_output_keys) + * `MEGNetSite._sklearn_auto_wrap_output_keys` - * [`MEGNetSite.describer_type`](maml.describers.md#maml.describers.MEGNetSite.describer_type) + * `MEGNetSite.describer_type` - * [`MEGNetSite.transform_one()`](maml.describers.md#maml.describers.MEGNetSite.transform_one) + * `MEGNetSite.transform_one()` - * [`MEGNetStructure`](maml.describers.md#maml.describers.MEGNetStructure) + * `MEGNetStructure` - * [`MEGNetStructure._abc_impl`](maml.describers.md#maml.describers.MEGNetStructure._abc_impl) + * `MEGNetStructure._abc_impl` - * [`MEGNetStructure._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.MEGNetStructure._sklearn_auto_wrap_output_keys) + * `MEGNetStructure._sklearn_auto_wrap_output_keys` - * [`MEGNetStructure.describer_type`](maml.describers.md#maml.describers.MEGNetStructure.describer_type) + * `MEGNetStructure.describer_type` - * [`MEGNetStructure.transform_one()`](maml.describers.md#maml.describers.MEGNetStructure.transform_one) + * `MEGNetStructure.transform_one()` - * [`RadialDistributionFunction`](maml.describers.md#maml.describers.RadialDistributionFunction) + * `RadialDistributionFunction` - * [`RadialDistributionFunction._get_specie_density()`](maml.describers.md#maml.describers.RadialDistributionFunction._get_specie_density) + * `RadialDistributionFunction._get_specie_density()` - * [`RadialDistributionFunction.get_site_coordination()`](maml.describers.md#maml.describers.RadialDistributionFunction.get_site_coordination) + * `RadialDistributionFunction.get_site_coordination()` - * [`RadialDistributionFunction.get_site_rdf()`](maml.describers.md#maml.describers.RadialDistributionFunction.get_site_rdf) + * `RadialDistributionFunction.get_site_rdf()` - * [`RadialDistributionFunction.get_species_coordination()`](maml.describers.md#maml.describers.RadialDistributionFunction.get_species_coordination) + * `RadialDistributionFunction.get_species_coordination()` - * [`RadialDistributionFunction.get_species_rdf()`](maml.describers.md#maml.describers.RadialDistributionFunction.get_species_rdf) + * `RadialDistributionFunction.get_species_rdf()` - * [`RandomizedCoulombMatrix`](maml.describers.md#maml.describers.RandomizedCoulombMatrix) + * `RandomizedCoulombMatrix` - * [`RandomizedCoulombMatrix._abc_impl`](maml.describers.md#maml.describers.RandomizedCoulombMatrix._abc_impl) + * `RandomizedCoulombMatrix._abc_impl` - * [`RandomizedCoulombMatrix._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.RandomizedCoulombMatrix._sklearn_auto_wrap_output_keys) + * `RandomizedCoulombMatrix._sklearn_auto_wrap_output_keys` - * [`RandomizedCoulombMatrix.describer_type`](maml.describers.md#maml.describers.RandomizedCoulombMatrix.describer_type) + * `RandomizedCoulombMatrix.describer_type` - * [`RandomizedCoulombMatrix.get_randomized_coulomb_mat()`](maml.describers.md#maml.describers.RandomizedCoulombMatrix.get_randomized_coulomb_mat) + * `RandomizedCoulombMatrix.get_randomized_coulomb_mat()` - * [`RandomizedCoulombMatrix.transform_one()`](maml.describers.md#maml.describers.RandomizedCoulombMatrix.transform_one) + * `RandomizedCoulombMatrix.transform_one()` - * [`SiteElementProperty`](maml.describers.md#maml.describers.SiteElementProperty) + * `SiteElementProperty` - * [`SiteElementProperty._abc_impl`](maml.describers.md#maml.describers.SiteElementProperty._abc_impl) + * `SiteElementProperty._abc_impl` - * [`SiteElementProperty._get_keys()`](maml.describers.md#maml.describers.SiteElementProperty._get_keys) + * `SiteElementProperty._get_keys()` - * [`SiteElementProperty._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.SiteElementProperty._sklearn_auto_wrap_output_keys) + * `SiteElementProperty._sklearn_auto_wrap_output_keys` - * [`SiteElementProperty.describer_type`](maml.describers.md#maml.describers.SiteElementProperty.describer_type) + * `SiteElementProperty.describer_type` - * [`SiteElementProperty.feature_dim`](maml.describers.md#maml.describers.SiteElementProperty.feature_dim) + * `SiteElementProperty.feature_dim` - * [`SiteElementProperty.transform_one()`](maml.describers.md#maml.describers.SiteElementProperty.transform_one) + * `SiteElementProperty.transform_one()` - * [`SmoothOverlapAtomicPosition`](maml.describers.md#maml.describers.SmoothOverlapAtomicPosition) + * `SmoothOverlapAtomicPosition` - * [`SmoothOverlapAtomicPosition._abc_impl`](maml.describers.md#maml.describers.SmoothOverlapAtomicPosition._abc_impl) + * `SmoothOverlapAtomicPosition._abc_impl` - * [`SmoothOverlapAtomicPosition._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.SmoothOverlapAtomicPosition._sklearn_auto_wrap_output_keys) + * `SmoothOverlapAtomicPosition._sklearn_auto_wrap_output_keys` - * [`SmoothOverlapAtomicPosition.describer_type`](maml.describers.md#maml.describers.SmoothOverlapAtomicPosition.describer_type) + * `SmoothOverlapAtomicPosition.describer_type` - * [`SmoothOverlapAtomicPosition.transform_one()`](maml.describers.md#maml.describers.SmoothOverlapAtomicPosition.transform_one) + * `SmoothOverlapAtomicPosition.transform_one()` - * [`SortedCoulombMatrix`](maml.describers.md#maml.describers.SortedCoulombMatrix) + * `SortedCoulombMatrix` - * [`SortedCoulombMatrix._abc_impl`](maml.describers.md#maml.describers.SortedCoulombMatrix._abc_impl) + * `SortedCoulombMatrix._abc_impl` - * [`SortedCoulombMatrix._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers.SortedCoulombMatrix._sklearn_auto_wrap_output_keys) + * `SortedCoulombMatrix._sklearn_auto_wrap_output_keys` - * [`SortedCoulombMatrix.describer_type`](maml.describers.md#maml.describers.SortedCoulombMatrix.describer_type) + * `SortedCoulombMatrix.describer_type` - * [`SortedCoulombMatrix.get_sorted_coulomb_mat()`](maml.describers.md#maml.describers.SortedCoulombMatrix.get_sorted_coulomb_mat) + * `SortedCoulombMatrix.get_sorted_coulomb_mat()` - * [`SortedCoulombMatrix.transform_one()`](maml.describers.md#maml.describers.SortedCoulombMatrix.transform_one) + * `SortedCoulombMatrix.transform_one()` - * [`wrap_matminer_describer()`](maml.describers.md#maml.describers.wrap_matminer_describer) + * `wrap_matminer_describer()` + * maml.describers._composition module - * [maml.describers._composition module](maml.describers.md#module-maml.describers._composition) + * `ElementStats` - * [`ElementStats`](maml.describers.md#maml.describers._composition.ElementStats) + * `ElementStats.ALLOWED_STATS` - * [`ElementStats.ALLOWED_STATS`](maml.describers.md#maml.describers._composition.ElementStats.ALLOWED_STATS) + * `ElementStats.AVAILABLE_DATA` - * [`ElementStats.AVAILABLE_DATA`](maml.describers.md#maml.describers._composition.ElementStats.AVAILABLE_DATA) + * `ElementStats._abc_impl` - * [`ElementStats._abc_impl`](maml.describers.md#maml.describers._composition.ElementStats._abc_impl) + * `ElementStats._reduce_dimension()` - * [`ElementStats._reduce_dimension()`](maml.describers.md#maml.describers._composition.ElementStats._reduce_dimension) + * `ElementStats._sklearn_auto_wrap_output_keys` - * [`ElementStats._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._composition.ElementStats._sklearn_auto_wrap_output_keys) + * `ElementStats.describer_type` - * [`ElementStats.describer_type`](maml.describers.md#maml.describers._composition.ElementStats.describer_type) + * `ElementStats.from_data()` - * [`ElementStats.from_data()`](maml.describers.md#maml.describers._composition.ElementStats.from_data) + * `ElementStats.from_file()` - * [`ElementStats.from_file()`](maml.describers.md#maml.describers._composition.ElementStats.from_file) + * `ElementStats.transform_one()` - * [`ElementStats.transform_one()`](maml.describers.md#maml.describers._composition.ElementStats.transform_one) + * `_is_element_or_specie()` - * [`_is_element_or_specie()`](maml.describers.md#maml.describers._composition._is_element_or_specie) + * `_keys_are_elements()` - * [`_keys_are_elements()`](maml.describers.md#maml.describers._composition._keys_are_elements) + * maml.describers._m3gnet module - * [maml.describers._m3gnet module](maml.describers.md#module-maml.describers._m3gnet) + * `M3GNetStructure` - * [`M3GNetStructure`](maml.describers.md#maml.describers._m3gnet.M3GNetStructure) + * `M3GNetStructure._abc_impl` - * [`M3GNetStructure._abc_impl`](maml.describers.md#maml.describers._m3gnet.M3GNetStructure._abc_impl) + * `M3GNetStructure._sklearn_auto_wrap_output_keys` - * [`M3GNetStructure._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._m3gnet.M3GNetStructure._sklearn_auto_wrap_output_keys) + * `M3GNetStructure.transform_one()` - * [`M3GNetStructure.transform_one()`](maml.describers.md#maml.describers._m3gnet.M3GNetStructure.transform_one) + * maml.describers._matminer module - * [maml.describers._matminer module](maml.describers.md#module-maml.describers._matminer) + * `wrap_matminer_describer()` - * [`wrap_matminer_describer()`](maml.describers.md#maml.describers._matminer.wrap_matminer_describer) + * maml.describers._megnet module - * [maml.describers._megnet module](maml.describers.md#module-maml.describers._megnet) + * `MEGNetNotFound` - * [`MEGNetNotFound`](maml.describers.md#maml.describers._megnet.MEGNetNotFound) + * `MEGNetSite` - * [`MEGNetSite`](maml.describers.md#maml.describers._megnet.MEGNetSite) + * `MEGNetSite._abc_impl` - * [`MEGNetSite._abc_impl`](maml.describers.md#maml.describers._megnet.MEGNetSite._abc_impl) + * `MEGNetSite._sklearn_auto_wrap_output_keys` - * [`MEGNetSite._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._megnet.MEGNetSite._sklearn_auto_wrap_output_keys) + * `MEGNetSite.describer_type` - * [`MEGNetSite.describer_type`](maml.describers.md#maml.describers._megnet.MEGNetSite.describer_type) + * `MEGNetSite.transform_one()` - * [`MEGNetSite.transform_one()`](maml.describers.md#maml.describers._megnet.MEGNetSite.transform_one) + * `MEGNetStructure` - * [`MEGNetStructure`](maml.describers.md#maml.describers._megnet.MEGNetStructure) + * `MEGNetStructure._abc_impl` - * [`MEGNetStructure._abc_impl`](maml.describers.md#maml.describers._megnet.MEGNetStructure._abc_impl) + * `MEGNetStructure._sklearn_auto_wrap_output_keys` - * [`MEGNetStructure._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._megnet.MEGNetStructure._sklearn_auto_wrap_output_keys) + * `MEGNetStructure.describer_type` - * [`MEGNetStructure.describer_type`](maml.describers.md#maml.describers._megnet.MEGNetStructure.describer_type) + * `MEGNetStructure.transform_one()` - * [`MEGNetStructure.transform_one()`](maml.describers.md#maml.describers._megnet.MEGNetStructure.transform_one) + * `_load_model()` - * [`_load_model()`](maml.describers.md#maml.describers._megnet._load_model) + * maml.describers._rdf module - * [maml.describers._rdf module](maml.describers.md#module-maml.describers._rdf) + * `RadialDistributionFunction` - * [`RadialDistributionFunction`](maml.describers.md#maml.describers._rdf.RadialDistributionFunction) + * `RadialDistributionFunction._get_specie_density()` - * [`RadialDistributionFunction._get_specie_density()`](maml.describers.md#maml.describers._rdf.RadialDistributionFunction._get_specie_density) + * `RadialDistributionFunction.get_site_coordination()` - * [`RadialDistributionFunction.get_site_coordination()`](maml.describers.md#maml.describers._rdf.RadialDistributionFunction.get_site_coordination) + * `RadialDistributionFunction.get_site_rdf()` - * [`RadialDistributionFunction.get_site_rdf()`](maml.describers.md#maml.describers._rdf.RadialDistributionFunction.get_site_rdf) + * `RadialDistributionFunction.get_species_coordination()` - * [`RadialDistributionFunction.get_species_coordination()`](maml.describers.md#maml.describers._rdf.RadialDistributionFunction.get_species_coordination) + * `RadialDistributionFunction.get_species_rdf()` - * [`RadialDistributionFunction.get_species_rdf()`](maml.describers.md#maml.describers._rdf.RadialDistributionFunction.get_species_rdf) + * `_dist_to_counts()` - * [`_dist_to_counts()`](maml.describers.md#maml.describers._rdf._dist_to_counts) + * `get_pair_distances()` - * [`get_pair_distances()`](maml.describers.md#maml.describers._rdf.get_pair_distances) + * maml.describers._site module - * [maml.describers._site module](maml.describers.md#module-maml.describers._site) + * `BPSymmetryFunctions` - * [`BPSymmetryFunctions`](maml.describers.md#maml.describers._site.BPSymmetryFunctions) + * `BPSymmetryFunctions._abc_impl` - * [`BPSymmetryFunctions._abc_impl`](maml.describers.md#maml.describers._site.BPSymmetryFunctions._abc_impl) + * `BPSymmetryFunctions._fc()` - * [`BPSymmetryFunctions._fc()`](maml.describers.md#maml.describers._site.BPSymmetryFunctions._fc) + * `BPSymmetryFunctions._sklearn_auto_wrap_output_keys` - * [`BPSymmetryFunctions._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._site.BPSymmetryFunctions._sklearn_auto_wrap_output_keys) + * `BPSymmetryFunctions.describer_type` - * [`BPSymmetryFunctions.describer_type`](maml.describers.md#maml.describers._site.BPSymmetryFunctions.describer_type) + * `BPSymmetryFunctions.transform_one()` - * [`BPSymmetryFunctions.transform_one()`](maml.describers.md#maml.describers._site.BPSymmetryFunctions.transform_one) + * `BispectrumCoefficients` - * [`BispectrumCoefficients`](maml.describers.md#maml.describers._site.BispectrumCoefficients) + * `BispectrumCoefficients._abc_impl` - * [`BispectrumCoefficients._abc_impl`](maml.describers.md#maml.describers._site.BispectrumCoefficients._abc_impl) + * `BispectrumCoefficients._sklearn_auto_wrap_output_keys` - * [`BispectrumCoefficients._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._site.BispectrumCoefficients._sklearn_auto_wrap_output_keys) + * `BispectrumCoefficients.describer_type` - * [`BispectrumCoefficients.describer_type`](maml.describers.md#maml.describers._site.BispectrumCoefficients.describer_type) + * `BispectrumCoefficients.feature_dim` - * [`BispectrumCoefficients.feature_dim`](maml.describers.md#maml.describers._site.BispectrumCoefficients.feature_dim) + * `BispectrumCoefficients.subscripts` - * [`BispectrumCoefficients.subscripts`](maml.describers.md#maml.describers._site.BispectrumCoefficients.subscripts) + * `BispectrumCoefficients.transform_one()` - * [`BispectrumCoefficients.transform_one()`](maml.describers.md#maml.describers._site.BispectrumCoefficients.transform_one) + * `MEGNetSite` - * [`MEGNetSite`](maml.describers.md#maml.describers._site.MEGNetSite) + * `MEGNetSite._abc_impl` - * [`MEGNetSite._abc_impl`](maml.describers.md#maml.describers._site.MEGNetSite._abc_impl) + * `MEGNetSite._sklearn_auto_wrap_output_keys` - * [`MEGNetSite._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._site.MEGNetSite._sklearn_auto_wrap_output_keys) + * `MEGNetSite.describer_type` - * [`MEGNetSite.describer_type`](maml.describers.md#maml.describers._site.MEGNetSite.describer_type) + * `MEGNetSite.transform_one()` - * [`MEGNetSite.transform_one()`](maml.describers.md#maml.describers._site.MEGNetSite.transform_one) + * `SiteElementProperty` - * [`SiteElementProperty`](maml.describers.md#maml.describers._site.SiteElementProperty) + * `SiteElementProperty._abc_impl` - * [`SiteElementProperty._abc_impl`](maml.describers.md#maml.describers._site.SiteElementProperty._abc_impl) + * `SiteElementProperty._get_keys()` - * [`SiteElementProperty._get_keys()`](maml.describers.md#maml.describers._site.SiteElementProperty._get_keys) + * `SiteElementProperty._sklearn_auto_wrap_output_keys` - * [`SiteElementProperty._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._site.SiteElementProperty._sklearn_auto_wrap_output_keys) + * `SiteElementProperty.describer_type` - * [`SiteElementProperty.describer_type`](maml.describers.md#maml.describers._site.SiteElementProperty.describer_type) + * `SiteElementProperty.feature_dim` - * [`SiteElementProperty.feature_dim`](maml.describers.md#maml.describers._site.SiteElementProperty.feature_dim) + * `SiteElementProperty.transform_one()` - * [`SiteElementProperty.transform_one()`](maml.describers.md#maml.describers._site.SiteElementProperty.transform_one) + * `SmoothOverlapAtomicPosition` - * [`SmoothOverlapAtomicPosition`](maml.describers.md#maml.describers._site.SmoothOverlapAtomicPosition) + * `SmoothOverlapAtomicPosition._abc_impl` - * [`SmoothOverlapAtomicPosition._abc_impl`](maml.describers.md#maml.describers._site.SmoothOverlapAtomicPosition._abc_impl) + * `SmoothOverlapAtomicPosition._sklearn_auto_wrap_output_keys` - * [`SmoothOverlapAtomicPosition._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._site.SmoothOverlapAtomicPosition._sklearn_auto_wrap_output_keys) + * `SmoothOverlapAtomicPosition.describer_type` - * [`SmoothOverlapAtomicPosition.describer_type`](maml.describers.md#maml.describers._site.SmoothOverlapAtomicPosition.describer_type) + * `SmoothOverlapAtomicPosition.transform_one()` - * [`SmoothOverlapAtomicPosition.transform_one()`](maml.describers.md#maml.describers._site.SmoothOverlapAtomicPosition.transform_one) + * maml.describers._spectrum module - * [maml.describers._spectrum module](maml.describers.md#module-maml.describers._spectrum) + * maml.describers._structure module - * [maml.describers._structure module](maml.describers.md#module-maml.describers._structure) + * `CoulombEigenSpectrum` - * [`CoulombEigenSpectrum`](maml.describers.md#maml.describers._structure.CoulombEigenSpectrum) + * `CoulombEigenSpectrum._abc_impl` - * [`CoulombEigenSpectrum._abc_impl`](maml.describers.md#maml.describers._structure.CoulombEigenSpectrum._abc_impl) + * `CoulombEigenSpectrum._sklearn_auto_wrap_output_keys` - * [`CoulombEigenSpectrum._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._structure.CoulombEigenSpectrum._sklearn_auto_wrap_output_keys) + * `CoulombEigenSpectrum.describer_type` - * [`CoulombEigenSpectrum.describer_type`](maml.describers.md#maml.describers._structure.CoulombEigenSpectrum.describer_type) + * `CoulombEigenSpectrum.transform_one()` - * [`CoulombEigenSpectrum.transform_one()`](maml.describers.md#maml.describers._structure.CoulombEigenSpectrum.transform_one) + * `CoulombMatrix` - * [`CoulombMatrix`](maml.describers.md#maml.describers._structure.CoulombMatrix) + * `CoulombMatrix._abc_impl` - * [`CoulombMatrix._abc_impl`](maml.describers.md#maml.describers._structure.CoulombMatrix._abc_impl) + * `CoulombMatrix._get_columb_mat()` - * [`CoulombMatrix._get_columb_mat()`](maml.describers.md#maml.describers._structure.CoulombMatrix._get_columb_mat) + * `CoulombMatrix._sklearn_auto_wrap_output_keys` - * [`CoulombMatrix._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._structure.CoulombMatrix._sklearn_auto_wrap_output_keys) + * `CoulombMatrix.describer_type` - * [`CoulombMatrix.describer_type`](maml.describers.md#maml.describers._structure.CoulombMatrix.describer_type) + * `CoulombMatrix.get_coulomb_mat()` - * [`CoulombMatrix.get_coulomb_mat()`](maml.describers.md#maml.describers._structure.CoulombMatrix.get_coulomb_mat) + * `CoulombMatrix.transform_one()` - * [`CoulombMatrix.transform_one()`](maml.describers.md#maml.describers._structure.CoulombMatrix.transform_one) + * `DistinctSiteProperty` - * [`DistinctSiteProperty`](maml.describers.md#maml.describers._structure.DistinctSiteProperty) + * `DistinctSiteProperty._abc_impl` - * [`DistinctSiteProperty._abc_impl`](maml.describers.md#maml.describers._structure.DistinctSiteProperty._abc_impl) + * `DistinctSiteProperty._sklearn_auto_wrap_output_keys` - * [`DistinctSiteProperty._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._structure.DistinctSiteProperty._sklearn_auto_wrap_output_keys) + * `DistinctSiteProperty.describer_type` - * [`DistinctSiteProperty.describer_type`](maml.describers.md#maml.describers._structure.DistinctSiteProperty.describer_type) + * `DistinctSiteProperty.supported_properties` - * [`DistinctSiteProperty.supported_properties`](maml.describers.md#maml.describers._structure.DistinctSiteProperty.supported_properties) + * `DistinctSiteProperty.transform_one()` - * [`DistinctSiteProperty.transform_one()`](maml.describers.md#maml.describers._structure.DistinctSiteProperty.transform_one) + * `RandomizedCoulombMatrix` - * [`RandomizedCoulombMatrix`](maml.describers.md#maml.describers._structure.RandomizedCoulombMatrix) + * `RandomizedCoulombMatrix._abc_impl` - * [`RandomizedCoulombMatrix._abc_impl`](maml.describers.md#maml.describers._structure.RandomizedCoulombMatrix._abc_impl) + * `RandomizedCoulombMatrix._sklearn_auto_wrap_output_keys` - * [`RandomizedCoulombMatrix._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._structure.RandomizedCoulombMatrix._sklearn_auto_wrap_output_keys) + * `RandomizedCoulombMatrix.describer_type` - * [`RandomizedCoulombMatrix.describer_type`](maml.describers.md#maml.describers._structure.RandomizedCoulombMatrix.describer_type) + * `RandomizedCoulombMatrix.get_randomized_coulomb_mat()` - * [`RandomizedCoulombMatrix.get_randomized_coulomb_mat()`](maml.describers.md#maml.describers._structure.RandomizedCoulombMatrix.get_randomized_coulomb_mat) + * `RandomizedCoulombMatrix.transform_one()` - * [`RandomizedCoulombMatrix.transform_one()`](maml.describers.md#maml.describers._structure.RandomizedCoulombMatrix.transform_one) + * `SortedCoulombMatrix` - * [`SortedCoulombMatrix`](maml.describers.md#maml.describers._structure.SortedCoulombMatrix) + * `SortedCoulombMatrix._abc_impl` - * [`SortedCoulombMatrix._abc_impl`](maml.describers.md#maml.describers._structure.SortedCoulombMatrix._abc_impl) + * `SortedCoulombMatrix._sklearn_auto_wrap_output_keys` - * [`SortedCoulombMatrix._sklearn_auto_wrap_output_keys`](maml.describers.md#maml.describers._structure.SortedCoulombMatrix._sklearn_auto_wrap_output_keys) + * `SortedCoulombMatrix.describer_type` - * [`SortedCoulombMatrix.describer_type`](maml.describers.md#maml.describers._structure.SortedCoulombMatrix.describer_type) + * `SortedCoulombMatrix.get_sorted_coulomb_mat()` - * [`SortedCoulombMatrix.get_sorted_coulomb_mat()`](maml.describers.md#maml.describers._structure.SortedCoulombMatrix.get_sorted_coulomb_mat) - - - * [`SortedCoulombMatrix.transform_one()`](maml.describers.md#maml.describers._structure.SortedCoulombMatrix.transform_one) + * `SortedCoulombMatrix.transform_one()` * [maml.models package](maml.models.md) - * [`AtomSets`](maml.models.md#maml.models.AtomSets) + * `AtomSets` - * [`AtomSets._get_data_generator()`](maml.models.md#maml.models.AtomSets._get_data_generator) + * `AtomSets._get_data_generator()` - * [`AtomSets._predict()`](maml.models.md#maml.models.AtomSets._predict) + * `AtomSets._predict()` - * [`AtomSets.evaluate()`](maml.models.md#maml.models.AtomSets.evaluate) + * `AtomSets.evaluate()` - * [`AtomSets.fit()`](maml.models.md#maml.models.AtomSets.fit) + * `AtomSets.fit()` - * [`AtomSets.from_dir()`](maml.models.md#maml.models.AtomSets.from_dir) + * `AtomSets.from_dir()` - * [`AtomSets.save()`](maml.models.md#maml.models.AtomSets.save) + * `AtomSets.save()` - * [`KerasModel`](maml.models.md#maml.models.KerasModel) + * `KerasModel` - * [`KerasModel._get_validation_data()`](maml.models.md#maml.models.KerasModel._get_validation_data) + * `KerasModel._get_validation_data()` - * [`KerasModel.fit()`](maml.models.md#maml.models.KerasModel.fit) + * `KerasModel.fit()` - * [`MLP`](maml.models.md#maml.models.MLP) + * `MLP` - * [`SKLModel`](maml.models.md#maml.models.SKLModel) + * `SKLModel` - * [`WeightedAverageLayer`](maml.models.md#maml.models.WeightedAverageLayer) + * `WeightedAverageLayer` - * [`WeightedAverageLayer.build()`](maml.models.md#maml.models.WeightedAverageLayer.build) + * `WeightedAverageLayer.build()` - * [`WeightedAverageLayer.call()`](maml.models.md#maml.models.WeightedAverageLayer.call) + * `WeightedAverageLayer.call()` - * [`WeightedAverageLayer.compute_output_shape()`](maml.models.md#maml.models.WeightedAverageLayer.compute_output_shape) + * `WeightedAverageLayer.compute_output_shape()` - * [`WeightedAverageLayer.get_config()`](maml.models.md#maml.models.WeightedAverageLayer.get_config) + * `WeightedAverageLayer.get_config()` - * [`WeightedAverageLayer.reduce_sum()`](maml.models.md#maml.models.WeightedAverageLayer.reduce_sum) + * `WeightedAverageLayer.reduce_sum()` - * [`WeightedSet2Set`](maml.models.md#maml.models.WeightedSet2Set) + * `WeightedSet2Set` - * [`WeightedSet2Set._lstm()`](maml.models.md#maml.models.WeightedSet2Set._lstm) + * `WeightedSet2Set._lstm()` - * [`WeightedSet2Set.build()`](maml.models.md#maml.models.WeightedSet2Set.build) + * `WeightedSet2Set.build()` - * [`WeightedSet2Set.call()`](maml.models.md#maml.models.WeightedSet2Set.call) + * `WeightedSet2Set.call()` - * [`WeightedSet2Set.compute_output_shape()`](maml.models.md#maml.models.WeightedSet2Set.compute_output_shape) + * `WeightedSet2Set.compute_output_shape()` - * [`WeightedSet2Set.get_config()`](maml.models.md#maml.models.WeightedSet2Set.get_config) + * `WeightedSet2Set.get_config()` - * [Subpackages](maml.models.md#subpackages) + * Subpackages * [maml.models.dl package](maml.models.dl.md) - * [`AtomSets`](maml.models.dl.md#maml.models.dl.AtomSets) - + * `AtomSets` - * [`AtomSets._get_data_generator()`](maml.models.dl.md#maml.models.dl.AtomSets._get_data_generator) + * `AtomSets._get_data_generator()` - * [`AtomSets._predict()`](maml.models.dl.md#maml.models.dl.AtomSets._predict) + * `AtomSets._predict()` - * [`AtomSets.evaluate()`](maml.models.dl.md#maml.models.dl.AtomSets.evaluate) + * `AtomSets.evaluate()` - * [`AtomSets.fit()`](maml.models.dl.md#maml.models.dl.AtomSets.fit) + * `AtomSets.fit()` - * [`AtomSets.from_dir()`](maml.models.dl.md#maml.models.dl.AtomSets.from_dir) + * `AtomSets.from_dir()` - * [`AtomSets.save()`](maml.models.dl.md#maml.models.dl.AtomSets.save) + * `AtomSets.save()` - * [`MLP`](maml.models.dl.md#maml.models.dl.MLP) + * `MLP` - * [`WeightedAverageLayer`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer) + * `WeightedAverageLayer` - * [`WeightedAverageLayer.build()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.build) + * `WeightedAverageLayer.build()` - * [`WeightedAverageLayer.call()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.call) + * `WeightedAverageLayer.call()` - * [`WeightedAverageLayer.compute_output_shape()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.compute_output_shape) + * `WeightedAverageLayer.compute_output_shape()` - * [`WeightedAverageLayer.get_config()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.get_config) + * `WeightedAverageLayer.get_config()` - * [`WeightedAverageLayer.reduce_sum()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.reduce_sum) + * `WeightedAverageLayer.reduce_sum()` - * [`WeightedSet2Set`](maml.models.dl.md#maml.models.dl.WeightedSet2Set) + * `WeightedSet2Set` - * [`WeightedSet2Set._lstm()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set._lstm) + * `WeightedSet2Set._lstm()` - * [`WeightedSet2Set.build()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.build) + * `WeightedSet2Set.build()` - * [`WeightedSet2Set.call()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.call) + * `WeightedSet2Set.call()` - * [`WeightedSet2Set.compute_output_shape()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.compute_output_shape) + * `WeightedSet2Set.compute_output_shape()` - * [`WeightedSet2Set.get_config()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.get_config) + * `WeightedSet2Set.get_config()` + * maml.models.dl._atomsets module - * [maml.models.dl._atomsets module](maml.models.dl.md#module-maml.models.dl._atomsets) + * `AtomSets` - * [`AtomSets`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets) + * `AtomSets._get_data_generator()` - * [`AtomSets._get_data_generator()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets._get_data_generator) + * `AtomSets._predict()` - * [`AtomSets._predict()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets._predict) + * `AtomSets.evaluate()` - * [`AtomSets.evaluate()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.evaluate) + * `AtomSets.fit()` - * [`AtomSets.fit()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.fit) + * `AtomSets.from_dir()` - * [`AtomSets.from_dir()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.from_dir) + * `AtomSets.save()` - * [`AtomSets.save()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.save) + * `construct_atom_sets()` - * [`construct_atom_sets()`](maml.models.dl.md#maml.models.dl._atomsets.construct_atom_sets) + * maml.models.dl._keras_utils module - * [maml.models.dl._keras_utils module](maml.models.dl.md#module-maml.models.dl._keras_utils) + * `deserialize_keras_activation()` - * [`deserialize_keras_activation()`](maml.models.dl.md#maml.models.dl._keras_utils.deserialize_keras_activation) + * `deserialize_keras_optimizer()` - * [`deserialize_keras_optimizer()`](maml.models.dl.md#maml.models.dl._keras_utils.deserialize_keras_optimizer) + * maml.models.dl._layers module - * [maml.models.dl._layers module](maml.models.dl.md#module-maml.models.dl._layers) + * `WeightedAverageLayer` - * [`WeightedAverageLayer`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer) + * `WeightedAverageLayer.build()` - * [`WeightedAverageLayer.build()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.build) + * `WeightedAverageLayer.call()` - * [`WeightedAverageLayer.call()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.call) + * `WeightedAverageLayer.compute_output_shape()` - * [`WeightedAverageLayer.compute_output_shape()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.compute_output_shape) + * `WeightedAverageLayer.get_config()` - * [`WeightedAverageLayer.get_config()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.get_config) + * `WeightedAverageLayer.reduce_sum()` - * [`WeightedAverageLayer.reduce_sum()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.reduce_sum) + * `WeightedSet2Set` - * [`WeightedSet2Set`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set) + * `WeightedSet2Set._lstm()` - * [`WeightedSet2Set._lstm()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set._lstm) + * `WeightedSet2Set.build()` - * [`WeightedSet2Set.build()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.build) + * `WeightedSet2Set.call()` - * [`WeightedSet2Set.call()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.call) + * `WeightedSet2Set.compute_output_shape()` - * [`WeightedSet2Set.compute_output_shape()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.compute_output_shape) + * `WeightedSet2Set.get_config()` - * [`WeightedSet2Set.get_config()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.get_config) + * maml.models.dl._mlp module - * [maml.models.dl._mlp module](maml.models.dl.md#module-maml.models.dl._mlp) + * `MLP` - * [`MLP`](maml.models.dl.md#maml.models.dl._mlp.MLP) - - * [`construct_mlp()`](maml.models.dl.md#maml.models.dl._mlp.construct_mlp) + * `construct_mlp()` * [maml.sampling package](maml.sampling.md) + * maml.sampling.clustering module - * [maml.sampling.clustering module](maml.sampling.md#module-maml.sampling.clustering) - - - * [`BirchClustering`](maml.sampling.md#maml.sampling.clustering.BirchClustering) + * `BirchClustering` - * [`BirchClustering._sklearn_auto_wrap_output_keys`](maml.sampling.md#maml.sampling.clustering.BirchClustering._sklearn_auto_wrap_output_keys) + * `BirchClustering._sklearn_auto_wrap_output_keys` - * [`BirchClustering.fit()`](maml.sampling.md#maml.sampling.clustering.BirchClustering.fit) + * `BirchClustering.fit()` - * [`BirchClustering.transform()`](maml.sampling.md#maml.sampling.clustering.BirchClustering.transform) + * `BirchClustering.transform()` - * [maml.sampling.direct module](maml.sampling.md#maml-sampling-direct-module) + * maml.sampling.direct module - * [maml.sampling.pca module](maml.sampling.md#module-maml.sampling.pca) + * maml.sampling.pca module - * [`PrincipalComponentAnalysis`](maml.sampling.md#maml.sampling.pca.PrincipalComponentAnalysis) + * `PrincipalComponentAnalysis` - * [`PrincipalComponentAnalysis._sklearn_auto_wrap_output_keys`](maml.sampling.md#maml.sampling.pca.PrincipalComponentAnalysis._sklearn_auto_wrap_output_keys) + * `PrincipalComponentAnalysis._sklearn_auto_wrap_output_keys` - * [`PrincipalComponentAnalysis.fit()`](maml.sampling.md#maml.sampling.pca.PrincipalComponentAnalysis.fit) + * `PrincipalComponentAnalysis.fit()` - * [`PrincipalComponentAnalysis.transform()`](maml.sampling.md#maml.sampling.pca.PrincipalComponentAnalysis.transform) + * `PrincipalComponentAnalysis.transform()` - * [maml.sampling.stratified_sampling module](maml.sampling.md#module-maml.sampling.stratified_sampling) + * maml.sampling.stratified_sampling module - * [`SelectKFromClusters`](maml.sampling.md#maml.sampling.stratified_sampling.SelectKFromClusters) + * `SelectKFromClusters` - * [`SelectKFromClusters._sklearn_auto_wrap_output_keys`](maml.sampling.md#maml.sampling.stratified_sampling.SelectKFromClusters._sklearn_auto_wrap_output_keys) + * `SelectKFromClusters._sklearn_auto_wrap_output_keys` - * [`SelectKFromClusters.fit()`](maml.sampling.md#maml.sampling.stratified_sampling.SelectKFromClusters.fit) + * `SelectKFromClusters.fit()` - * [`SelectKFromClusters.transform()`](maml.sampling.md#maml.sampling.stratified_sampling.SelectKFromClusters.transform) + * `SelectKFromClusters.transform()` * [maml.utils package](maml.utils.md) - * [`ConstantValue`](maml.utils.md#maml.utils.ConstantValue) - - - * [`ConstantValue.get_value()`](maml.utils.md#maml.utils.ConstantValue.get_value) + * `ConstantValue` - * [`DataSplitter`](maml.utils.md#maml.utils.DataSplitter) + * `ConstantValue.get_value()` - * [`DataSplitter.split()`](maml.utils.md#maml.utils.DataSplitter.split) + * `DataSplitter` - * [`DummyScaler`](maml.utils.md#maml.utils.DummyScaler) + * `DataSplitter.split()` - * [`DummyScaler.from_training_data()`](maml.utils.md#maml.utils.DummyScaler.from_training_data) + * `DummyScaler` - * [`DummyScaler.inverse_transform()`](maml.utils.md#maml.utils.DummyScaler.inverse_transform) + * `DummyScaler.from_training_data()` - * [`DummyScaler.transform()`](maml.utils.md#maml.utils.DummyScaler.transform) + * `DummyScaler.inverse_transform()` - * [`LinearProfile`](maml.utils.md#maml.utils.LinearProfile) + * `DummyScaler.transform()` - * [`LinearProfile.get_value()`](maml.utils.md#maml.utils.LinearProfile.get_value) + * `LinearProfile` - * [`MultiScratchDir`](maml.utils.md#maml.utils.MultiScratchDir) + * `LinearProfile.get_value()` - * [`MultiScratchDir.SCR_LINK`](maml.utils.md#maml.utils.MultiScratchDir.SCR_LINK) + * `MultiScratchDir` - * [`Scaler`](maml.utils.md#maml.utils.Scaler) + * `MultiScratchDir.SCR_LINK` - * [`Scaler.inverse_transform()`](maml.utils.md#maml.utils.Scaler.inverse_transform) + * `Scaler` - * [`Scaler.transform()`](maml.utils.md#maml.utils.Scaler.transform) + * `Scaler.inverse_transform()` - * [`ShuffleSplitter`](maml.utils.md#maml.utils.ShuffleSplitter) + * `Scaler.transform()` - * [`ShuffleSplitter.split()`](maml.utils.md#maml.utils.ShuffleSplitter.split) + * `ShuffleSplitter` - * [`StandardScaler`](maml.utils.md#maml.utils.StandardScaler) + * `ShuffleSplitter.split()` - * [`StandardScaler.from_training_data()`](maml.utils.md#maml.utils.StandardScaler.from_training_data) + * `StandardScaler` - * [`StandardScaler.inverse_transform()`](maml.utils.md#maml.utils.StandardScaler.inverse_transform) + * `StandardScaler.from_training_data()` - * [`StandardScaler.transform()`](maml.utils.md#maml.utils.StandardScaler.transform) + * `StandardScaler.inverse_transform()` - * [`Stats`](maml.utils.md#maml.utils.Stats) + * `StandardScaler.transform()` - * [`Stats.allowed_stats`](maml.utils.md#maml.utils.Stats.allowed_stats) + * `Stats` - * [`Stats.average()`](maml.utils.md#maml.utils.Stats.average) + * `Stats.allowed_stats` - * [`Stats.geometric_mean()`](maml.utils.md#maml.utils.Stats.geometric_mean) + * `Stats.average()` - * [`Stats.harmonic_mean()`](maml.utils.md#maml.utils.Stats.harmonic_mean) + * `Stats.geometric_mean()` - * [`Stats.inverse_mean()`](maml.utils.md#maml.utils.Stats.inverse_mean) + * `Stats.harmonic_mean()` - * [`Stats.kurtosis()`](maml.utils.md#maml.utils.Stats.kurtosis) + * `Stats.inverse_mean()` - * [`Stats.max()`](maml.utils.md#maml.utils.Stats.max) + * `Stats.kurtosis()` - * [`Stats.mean()`](maml.utils.md#maml.utils.Stats.mean) + * `Stats.max()` - * [`Stats.mean_absolute_deviation()`](maml.utils.md#maml.utils.Stats.mean_absolute_deviation) + * `Stats.mean()` - * [`Stats.mean_absolute_error()`](maml.utils.md#maml.utils.Stats.mean_absolute_error) + * `Stats.mean_absolute_deviation()` - * [`Stats.min()`](maml.utils.md#maml.utils.Stats.min) + * `Stats.mean_absolute_error()` - * [`Stats.mode()`](maml.utils.md#maml.utils.Stats.mode) + * `Stats.min()` - * [`Stats.moment()`](maml.utils.md#maml.utils.Stats.moment) + * `Stats.mode()` - * [`Stats.power_mean()`](maml.utils.md#maml.utils.Stats.power_mean) + * `Stats.moment()` - * [`Stats.range()`](maml.utils.md#maml.utils.Stats.range) + * `Stats.power_mean()` - * [`Stats.shifted_geometric_mean()`](maml.utils.md#maml.utils.Stats.shifted_geometric_mean) + * `Stats.range()` - * [`Stats.skewness()`](maml.utils.md#maml.utils.Stats.skewness) + * `Stats.shifted_geometric_mean()` - * [`Stats.std()`](maml.utils.md#maml.utils.Stats.std) + * `Stats.skewness()` - * [`ValueProfile`](maml.utils.md#maml.utils.ValueProfile) + * `Stats.std()` - * [`ValueProfile.get_value()`](maml.utils.md#maml.utils.ValueProfile.get_value) + * `ValueProfile` - * [`ValueProfile.get_value()`](maml.utils.md#id0) + * `ValueProfile.get_value()` - * [`ValueProfile.increment_step()`](maml.utils.md#maml.utils.ValueProfile.increment_step) + * `ValueProfile.get_value()` - * [`check_structures_forces_stresses()`](maml.utils.md#maml.utils.check_structures_forces_stresses) + * `ValueProfile.increment_step()` - * [`convert_docs()`](maml.utils.md#maml.utils.convert_docs) + * `check_structures_forces_stresses()` - * [`cwt()`](maml.utils.md#maml.utils.cwt) + * `convert_docs()` - * [`feature_dim_from_test_system()`](maml.utils.md#maml.utils.feature_dim_from_test_system) + * `cwt()` - * [`fft_magnitude()`](maml.utils.md#maml.utils.fft_magnitude) + * `feature_dim_from_test_system()` - * [`get_describer_dummy_obj()`](maml.utils.md#maml.utils.get_describer_dummy_obj) + * `fft_magnitude()` - * [`get_full_args()`](maml.utils.md#maml.utils.get_full_args) + * `get_describer_dummy_obj()` - * [`get_full_stats_and_funcs()`](maml.utils.md#maml.utils.get_full_stats_and_funcs) + * `get_full_args()` - * [`get_lammps_lattice_and_rotation()`](maml.utils.md#maml.utils.get_lammps_lattice_and_rotation) + * `get_full_stats_and_funcs()` - * [`get_sp_method()`](maml.utils.md#maml.utils.get_sp_method) + * `get_lammps_lattice_and_rotation()` - * [`njit()`](maml.utils.md#maml.utils.njit) + * `get_sp_method()` - * [`pool_from()`](maml.utils.md#maml.utils.pool_from) + * `njit()` - * [`spectrogram()`](maml.utils.md#maml.utils.spectrogram) + * `pool_from()` - * [`stats_list_conversion()`](maml.utils.md#maml.utils.stats_list_conversion) + * `spectrogram()` - * [`stress_format_change()`](maml.utils.md#maml.utils.stress_format_change) + * `stats_list_conversion()` - * [`stress_list_to_matrix()`](maml.utils.md#maml.utils.stress_list_to_matrix) + * `stress_format_change()` - * [`stress_matrix_to_list()`](maml.utils.md#maml.utils.stress_matrix_to_list) + * `stress_list_to_matrix()` - * [`to_array()`](maml.utils.md#maml.utils.to_array) + * `stress_matrix_to_list()` - * [`to_composition()`](maml.utils.md#maml.utils.to_composition) + * `to_array()` - * [`write_data_from_structure()`](maml.utils.md#maml.utils.write_data_from_structure) + * `to_composition()` - * [`wvd()`](maml.utils.md#maml.utils.wvd) + * `write_data_from_structure()` + * `wvd()` - * [maml.utils._data_conversion module](maml.utils.md#module-maml.utils._data_conversion) + * maml.utils._data_conversion module - * [`convert_docs()`](maml.utils.md#maml.utils._data_conversion.convert_docs) + * `convert_docs()` - * [`doc_from()`](maml.utils.md#maml.utils._data_conversion.doc_from) + * `doc_from()` - * [`pool_from()`](maml.utils.md#maml.utils._data_conversion.pool_from) + * `pool_from()` - * [`to_array()`](maml.utils.md#maml.utils._data_conversion.to_array) + * `to_array()` - * [maml.utils._data_split module](maml.utils.md#module-maml.utils._data_split) + * maml.utils._data_split module - * [`DataSplitter`](maml.utils.md#maml.utils._data_split.DataSplitter) + * `DataSplitter` - * [`DataSplitter.split()`](maml.utils.md#maml.utils._data_split.DataSplitter.split) + * `DataSplitter.split()` - * [`ShuffleSplitter`](maml.utils.md#maml.utils._data_split.ShuffleSplitter) + * `ShuffleSplitter` - * [`ShuffleSplitter.split()`](maml.utils.md#maml.utils._data_split.ShuffleSplitter.split) + * `ShuffleSplitter.split()` - * [maml.utils._dummy module](maml.utils.md#module-maml.utils._dummy) + * maml.utils._dummy module - * [`feature_dim_from_test_system()`](maml.utils.md#maml.utils._dummy.feature_dim_from_test_system) + * `feature_dim_from_test_system()` - * [`get_describer_dummy_obj()`](maml.utils.md#maml.utils._dummy.get_describer_dummy_obj) + * `get_describer_dummy_obj()` - * [maml.utils._inspect module](maml.utils.md#module-maml.utils._inspect) + * maml.utils._inspect module - * [`get_full_args()`](maml.utils.md#maml.utils._inspect.get_full_args) + * `get_full_args()` - * [`get_param_types()`](maml.utils.md#maml.utils._inspect.get_param_types) + * `get_param_types()` - * [maml.utils._jit module](maml.utils.md#module-maml.utils._jit) + * maml.utils._jit module - * [`njit()`](maml.utils.md#maml.utils._jit.njit) + * `njit()` - * [maml.utils._lammps module](maml.utils.md#module-maml.utils._lammps) + * maml.utils._lammps module - * [`_get_atomic_mass()`](maml.utils.md#maml.utils._lammps._get_atomic_mass) + * `_get_atomic_mass()` - * [`_get_charge()`](maml.utils.md#maml.utils._lammps._get_charge) + * `_get_charge()` - * [`check_structures_forces_stresses()`](maml.utils.md#maml.utils._lammps.check_structures_forces_stresses) + * `check_structures_forces_stresses()` - * [`get_lammps_lattice_and_rotation()`](maml.utils.md#maml.utils._lammps.get_lammps_lattice_and_rotation) + * `get_lammps_lattice_and_rotation()` - * [`stress_format_change()`](maml.utils.md#maml.utils._lammps.stress_format_change) + * `stress_format_change()` - * [`stress_list_to_matrix()`](maml.utils.md#maml.utils._lammps.stress_list_to_matrix) + * `stress_list_to_matrix()` - * [`stress_matrix_to_list()`](maml.utils.md#maml.utils._lammps.stress_matrix_to_list) + * `stress_matrix_to_list()` - * [`write_data_from_structure()`](maml.utils.md#maml.utils._lammps.write_data_from_structure) + * `write_data_from_structure()` - * [maml.utils._material module](maml.utils.md#module-maml.utils._material) + * maml.utils._material module - * [`to_composition()`](maml.utils.md#maml.utils._material.to_composition) + * `to_composition()` - * [maml.utils._preprocessing module](maml.utils.md#module-maml.utils._preprocessing) + * maml.utils._preprocessing module - * [`DummyScaler`](maml.utils.md#maml.utils._preprocessing.DummyScaler) + * `DummyScaler` - * [`DummyScaler.from_training_data()`](maml.utils.md#maml.utils._preprocessing.DummyScaler.from_training_data) + * `DummyScaler.from_training_data()` - * [`DummyScaler.inverse_transform()`](maml.utils.md#maml.utils._preprocessing.DummyScaler.inverse_transform) + * `DummyScaler.inverse_transform()` - * [`DummyScaler.transform()`](maml.utils.md#maml.utils._preprocessing.DummyScaler.transform) + * `DummyScaler.transform()` - * [`Scaler`](maml.utils.md#maml.utils._preprocessing.Scaler) + * `Scaler` - * [`Scaler.inverse_transform()`](maml.utils.md#maml.utils._preprocessing.Scaler.inverse_transform) + * `Scaler.inverse_transform()` - * [`Scaler.transform()`](maml.utils.md#maml.utils._preprocessing.Scaler.transform) + * `Scaler.transform()` - * [`StandardScaler`](maml.utils.md#maml.utils._preprocessing.StandardScaler) + * `StandardScaler` - * [`StandardScaler.from_training_data()`](maml.utils.md#maml.utils._preprocessing.StandardScaler.from_training_data) + * `StandardScaler.from_training_data()` - * [`StandardScaler.inverse_transform()`](maml.utils.md#maml.utils._preprocessing.StandardScaler.inverse_transform) + * `StandardScaler.inverse_transform()` - * [`StandardScaler.transform()`](maml.utils.md#maml.utils._preprocessing.StandardScaler.transform) + * `StandardScaler.transform()` - * [maml.utils._signal_processing module](maml.utils.md#module-maml.utils._signal_processing) + * maml.utils._signal_processing module - * [`cwt()`](maml.utils.md#maml.utils._signal_processing.cwt) + * `cwt()` - * [`fft_magnitude()`](maml.utils.md#maml.utils._signal_processing.fft_magnitude) + * `fft_magnitude()` - * [`get_sp_method()`](maml.utils.md#maml.utils._signal_processing.get_sp_method) + * `get_sp_method()` - * [`spectrogram()`](maml.utils.md#maml.utils._signal_processing.spectrogram) + * `spectrogram()` - * [`wvd()`](maml.utils.md#maml.utils._signal_processing.wvd) + * `wvd()` - * [maml.utils._stats module](maml.utils.md#module-maml.utils._stats) + * maml.utils._stats module - * [`Stats`](maml.utils.md#maml.utils._stats.Stats) + * `Stats` - * [`Stats.allowed_stats`](maml.utils.md#maml.utils._stats.Stats.allowed_stats) + * `Stats.allowed_stats` - * [`Stats.average()`](maml.utils.md#maml.utils._stats.Stats.average) + * `Stats.average()` - * [`Stats.geometric_mean()`](maml.utils.md#maml.utils._stats.Stats.geometric_mean) + * `Stats.geometric_mean()` - * [`Stats.harmonic_mean()`](maml.utils.md#maml.utils._stats.Stats.harmonic_mean) + * `Stats.harmonic_mean()` - * [`Stats.inverse_mean()`](maml.utils.md#maml.utils._stats.Stats.inverse_mean) + * `Stats.inverse_mean()` - * [`Stats.kurtosis()`](maml.utils.md#maml.utils._stats.Stats.kurtosis) + * `Stats.kurtosis()` - * [`Stats.max()`](maml.utils.md#maml.utils._stats.Stats.max) + * `Stats.max()` - * [`Stats.mean()`](maml.utils.md#maml.utils._stats.Stats.mean) + * `Stats.mean()` - * [`Stats.mean_absolute_deviation()`](maml.utils.md#maml.utils._stats.Stats.mean_absolute_deviation) + * `Stats.mean_absolute_deviation()` - * [`Stats.mean_absolute_error()`](maml.utils.md#maml.utils._stats.Stats.mean_absolute_error) + * `Stats.mean_absolute_error()` - * [`Stats.min()`](maml.utils.md#maml.utils._stats.Stats.min) + * `Stats.min()` - * [`Stats.mode()`](maml.utils.md#maml.utils._stats.Stats.mode) + * `Stats.mode()` - * [`Stats.moment()`](maml.utils.md#maml.utils._stats.Stats.moment) + * `Stats.moment()` - * [`Stats.power_mean()`](maml.utils.md#maml.utils._stats.Stats.power_mean) + * `Stats.power_mean()` - * [`Stats.range()`](maml.utils.md#maml.utils._stats.Stats.range) + * `Stats.range()` - * [`Stats.shifted_geometric_mean()`](maml.utils.md#maml.utils._stats.Stats.shifted_geometric_mean) + * `Stats.shifted_geometric_mean()` - * [`Stats.skewness()`](maml.utils.md#maml.utils._stats.Stats.skewness) + * `Stats.skewness()` - * [`Stats.std()`](maml.utils.md#maml.utils._stats.Stats.std) + * `Stats.std()` - * [`_add_allowed_stats()`](maml.utils.md#maml.utils._stats._add_allowed_stats) + * `_add_allowed_stats()` - * [`_convert_a_or_b()`](maml.utils.md#maml.utils._stats._convert_a_or_b) + * `_convert_a_or_b()` - * [`_moment_symbol_conversion()`](maml.utils.md#maml.utils._stats._moment_symbol_conversion) + * `_moment_symbol_conversion()` - * [`_root_moment()`](maml.utils.md#maml.utils._stats._root_moment) + * `_root_moment()` - * [`get_full_stats_and_funcs()`](maml.utils.md#maml.utils._stats.get_full_stats_and_funcs) + * `get_full_stats_and_funcs()` - * [`stats_list_conversion()`](maml.utils.md#maml.utils._stats.stats_list_conversion) + * `stats_list_conversion()` - * [maml.utils._tempfile module](maml.utils.md#module-maml.utils._tempfile) + * maml.utils._tempfile module - * [`MultiScratchDir`](maml.utils.md#maml.utils._tempfile.MultiScratchDir) + * `MultiScratchDir` - * [`MultiScratchDir.SCR_LINK`](maml.utils.md#maml.utils._tempfile.MultiScratchDir.SCR_LINK) + * `MultiScratchDir.SCR_LINK` - * [`MultiScratchDir.tempdirs`](maml.utils.md#maml.utils._tempfile.MultiScratchDir.tempdirs) + * `MultiScratchDir.tempdirs` - * [`_copy_r_with_suffix()`](maml.utils.md#maml.utils._tempfile._copy_r_with_suffix) + * `_copy_r_with_suffix()` - * [maml.utils._typing module](maml.utils.md#module-maml.utils._typing) + * maml.utils._typing module - * [maml.utils._value_profile module](maml.utils.md#module-maml.utils._value_profile) + * maml.utils._value_profile module - * [`ConstantValue`](maml.utils.md#maml.utils._value_profile.ConstantValue) + * `ConstantValue` - * [`ConstantValue.get_value()`](maml.utils.md#maml.utils._value_profile.ConstantValue.get_value) + * `ConstantValue.get_value()` - * [`LinearProfile`](maml.utils.md#maml.utils._value_profile.LinearProfile) + * `LinearProfile` - * [`LinearProfile.get_value()`](maml.utils.md#maml.utils._value_profile.LinearProfile.get_value) + * `LinearProfile.get_value()` - * [`ValueProfile`](maml.utils.md#maml.utils._value_profile.ValueProfile) + * `ValueProfile` - * [`ValueProfile.get_value()`](maml.utils.md#maml.utils._value_profile.ValueProfile.get_value) + * `ValueProfile.get_value()` - * [`ValueProfile.get_value()`](maml.utils.md#id1) + * `ValueProfile.get_value()` - * [`ValueProfile.increment_step()`](maml.utils.md#maml.utils._value_profile.ValueProfile.increment_step) \ No newline at end of file + * `ValueProfile.increment_step()` \ No newline at end of file diff --git a/docs/maml.models.dl.md b/docs/maml.models.dl.md index f8ce0dd9..17ebee44 100644 --- a/docs/maml.models.dl.md +++ b/docs/maml.models.dl.md @@ -8,38 +8,33 @@ nav_exclude: true Deep learning module. +## *class* maml.models.dl.AtomSets(describer: BaseDescriber | None = None, input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = ‘relu’, embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = ‘mean’, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) -### _class_ maml.models.dl.AtomSets(describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = 'relu', embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = 'mean', optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) -Bases: [`KerasModel`](maml.base.md#maml.base._model.KerasModel) +Bases: `KerasModel` This class implements the DeepSets models. +### _get_data_generator(features, targets, batch_size=128, is_shuffle=True) -#### _get_data_generator(features, targets, batch_size=128, is_shuffle=True) +### _predict(features: ndarray, \*\*kwargs) -#### _predict(features: ndarray, \*\*kwargs) Predict the values given a set of inputs based on fitted models. * **Parameters** - - **features** (*np.ndarray*) – array-like input features. - +**features** (*np.ndarray*) – array-like input features. * **Returns** +List of output objects. - List of output objects. - - +### evaluate(eval_objs, eval_targets, is_feature: bool = False, batch_size: int = 16) -#### evaluate(eval_objs, eval_targets, is_feature: bool = False, batch_size: int = 16) Evaluate objs, targets. * **Parameters** - * **eval_objs** (*list*) – objs for evaluation @@ -51,102 +46,92 @@ Evaluate objs, targets. * **batch_size** (*int*) – evaluation batch size +### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -#### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) - * **Parameters** - - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **val_features** (*list** or **np.ndarray*) – validation features + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_targets** (*list** or **np.ndarray*) – validation targets. + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. +### *classmethod* from_dir(dirname: str) - -#### _classmethod_ from_dir(dirname: str) Load the models from file :param dirname: directory name :type dirname: str Returns: object instance. +### save(dirname: str) -#### save(dirname: str) Save the models and describers. * **Parameters** +**dirname** (*str*) – dirname for save - **dirname** (*str*) – dirname for save - +## *class* maml.models.dl.MLP(input_dim: int | None = None, describer: BaseDescriber | None = None, n_neurons: tuple = (64, 64), activation: str = ‘relu’, n_targets: int = 1, is_classification: bool = False, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = (), \*\*kwargs) - -### _class_ maml.models.dl.MLP(input_dim: int | None = None, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, n_neurons: tuple = (64, 64), activation: str = 'relu', n_targets: int = 1, is_classification: bool = False, optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = (), \*\*kwargs) -Bases: [`KerasModel`](maml.base.md#maml.base._model.KerasModel) +Bases: `KerasModel` This class implements the multi-layer perceptron models. +## *class* maml.models.dl.WeightedAverageLayer(\*args, \*\*kwargs) -### _class_ maml.models.dl.WeightedAverageLayer(\*args, \*\*kwargs) Bases: `Layer` Weight average the features using weights. result= sum{w_i^a \* value_i} / sum{w_i^a} +### build(input_shape: Sequence) -#### build(input_shape: Sequence) Build the layer. * **Parameters** +**input_shape** (*tuple*) – input shape tuple - **input_shape** (*tuple*) – input shape tuple - +### call(inputs: Sequence, mask: tf.Tensor | None = None) - -#### call(inputs: Sequence, mask: tf.Tensor | None = None) Core logic of the layer. * **Parameters** - * **inputs** (*tuple*) – input tuple of length 3 * **mask** (*tf.Tensor*) – not used here +### *static* compute_output_shape(input_shape: Sequence) - -#### _static_ compute_output_shape(input_shape: Sequence) Compute output shape from input shape :param input_shape: input shape list. :type input_shape: tuple/list +### get_config() -#### get_config() Get layer configuration. +### *static* reduce_sum(prop: Tensor, index: Tensor, perm: Sequence) -#### _static_ reduce_sum(prop: Tensor, index: Tensor, perm: Sequence) Reduce sum the tensors using index. * **Parameters** - * **prop** (*tf.Tensor*) – tensor with shape [1, n, …] @@ -155,9 +140,8 @@ Reduce sum the tensors using index. * **perm** (*list*) – permutation for transpose. +## *class* maml.models.dl.WeightedSet2Set(\*args, \*\*kwargs) - -### _class_ maml.models.dl.WeightedSet2Set(\*args, \*\*kwargs) Bases: `Layer` This is a modified version from megnet.layers.readout.Set2Set. @@ -165,83 +149,73 @@ Here, in addition to taking features and indices as inputs, we also take a weight tensor. The input to the core logic is [features, weights, indices]. +### _lstm(h, c) -#### _lstm(h, c) +### build(input_shape: Sequence) -#### build(input_shape: Sequence) Build the output shape from input shapes :param input_shape: input shape list. :type input_shape: tuple/list +### call(inputs, mask=None) -#### call(inputs, mask=None) Core logic of the layer. * **Parameters** - * **inputs** (*tuple*) – input tuple of length 3 * **mask** (*tf.Tensor*) – not used here +### compute_output_shape(input_shape) - -#### compute_output_shape(input_shape) Compute output shapes from input shapes :param input_shape: input shapes. :type input_shape: sequence of tuple Returns: sequence of tuples output shapes +### get_config() -#### get_config() > Part of keras layer interface, where the signature is converted into a dict * **Returns** - - configurational dictionary. - - +configurational dictionary. ## maml.models.dl._atomsets module neural network models. +### *class* maml.models.dl._atomsets.AtomSets(describer: BaseDescriber | None = None, input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = ‘relu’, embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = ‘mean’, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) -### _class_ maml.models.dl._atomsets.AtomSets(describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = 'relu', embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = 'mean', optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) -Bases: [`KerasModel`](maml.base.md#maml.base._model.KerasModel) +Bases: `KerasModel` This class implements the DeepSets models. - #### _get_data_generator(features, targets, batch_size=128, is_shuffle=True) #### _predict(features: ndarray, \*\*kwargs) + Predict the values given a set of inputs based on fitted models. * **Parameters** - - **features** (*np.ndarray*) – array-like input features. - +**features** (*np.ndarray*) – array-like input features. * **Returns** - - List of output objects. - - +List of output objects. #### evaluate(eval_objs, eval_targets, is_feature: bool = False, batch_size: int = 16) + Evaluate objs, targets. * **Parameters** - * **eval_objs** (*list*) – objs for evaluation @@ -253,48 +227,43 @@ Evaluate objs, targets. * **batch_size** (*int*) – evaluation batch size - - #### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -* **Parameters** - - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. +* **Parameters** + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **val_features** (*list** or **np.ndarray*) – validation features + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_targets** (*list** or **np.ndarray*) – validation targets. + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. +#### *classmethod* from_dir(dirname: str) -#### _classmethod_ from_dir(dirname: str) Load the models from file :param dirname: directory name :type dirname: str Returns: object instance. - #### save(dirname: str) + Save the models and describers. * **Parameters** +**dirname** (*str*) – dirname for save - **dirname** (*str*) – dirname for save +### maml.models.dl._atomsets.construct_atom_sets(input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = ‘relu’, embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = ‘mean’, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) - - -### maml.models.dl._atomsets.construct_atom_sets(input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = 'relu', embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = 'mean', optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) f(X) = rho(sum_{x in X} phi(x)), where X is a set. phi is implemented as a neural network and rho is a symmetry function. @@ -303,7 +272,6 @@ todo: implement attention mechanism * **Parameters** - * **input_dim** (*int*) – input dimension, if None, then integer inputs + embedding are assumed. @@ -329,7 +297,7 @@ todo: implement attention mechanism * **symmetry_func** (*str*) – symmetry function, choose from [‘set2set’, ‘sum’, ‘mean’, - ‘max’, ‘min’, ‘prod’] +‘max’, ‘min’, ‘prod’] * **optimizer** (*str*) – optimizer for the models @@ -343,32 +311,27 @@ todo: implement attention mechanism * **symmetry_func_kwargs** (*dict*) – kwargs for symmetry function - ## maml.models.dl._keras_utils module Keras utils for deserialize activations and otpimizers. - ### maml.models.dl._keras_utils.deserialize_keras_activation(activation) + serialize keras activation. * **Parameters** - - **activation** (*str**, **dict**, or **Activation object*) – activation to serialize - +**activation** (*str*\*, **dict**, or \**Activation object*) – activation to serialize Returns: Activation object - ### maml.models.dl._keras_utils.deserialize_keras_optimizer(optimizer) + serialize keras activation. * **Parameters** - - **optimizer** (*str**, **dict**, or **optimizer object*) – optimizer to serialize - +**optimizer** (*str*\*, **dict**, or \**optimizer object*) – optimizer to serialize Returns: Activation object @@ -376,56 +339,51 @@ Returns: Activation object Deep learning layers. +### *class* maml.models.dl._layers.WeightedAverageLayer(\*args, \*\*kwargs) -### _class_ maml.models.dl._layers.WeightedAverageLayer(\*args, \*\*kwargs) Bases: `Layer` Weight average the features using weights. result= sum{w_i^a \* value_i} / sum{w_i^a} - #### build(input_shape: Sequence) + Build the layer. * **Parameters** - - **input_shape** (*tuple*) – input shape tuple - - +**input_shape** (*tuple*) – input shape tuple #### call(inputs: Sequence, mask: tf.Tensor | None = None) + Core logic of the layer. * **Parameters** - * **inputs** (*tuple*) – input tuple of length 3 * **mask** (*tf.Tensor*) – not used here +#### *static* compute_output_shape(input_shape: Sequence) - -#### _static_ compute_output_shape(input_shape: Sequence) Compute output shape from input shape :param input_shape: input shape list. :type input_shape: tuple/list - #### get_config() + Get layer configuration. +#### *static* reduce_sum(prop: Tensor, index: Tensor, perm: Sequence) -#### _static_ reduce_sum(prop: Tensor, index: Tensor, perm: Sequence) Reduce sum the tensors using index. * **Parameters** - * **prop** (*tf.Tensor*) – tensor with shape [1, n, …] @@ -434,9 +392,8 @@ Reduce sum the tensors using index. * **perm** (*list*) – permutation for transpose. +### *class* maml.models.dl._layers.WeightedSet2Set(\*args, \*\*kwargs) - -### _class_ maml.models.dl._layers.WeightedSet2Set(\*args, \*\*kwargs) Bases: `Layer` This is a modified version from megnet.layers.readout.Set2Set. @@ -444,64 +401,59 @@ Here, in addition to taking features and indices as inputs, we also take a weight tensor. The input to the core logic is [features, weights, indices]. - #### _lstm(h, c) #### build(input_shape: Sequence) + Build the output shape from input shapes :param input_shape: input shape list. :type input_shape: tuple/list - #### call(inputs, mask=None) + Core logic of the layer. * **Parameters** - * **inputs** (*tuple*) – input tuple of length 3 * **mask** (*tf.Tensor*) – not used here - - #### compute_output_shape(input_shape) + Compute output shapes from input shapes :param input_shape: input shapes. :type input_shape: sequence of tuple Returns: sequence of tuples output shapes - #### get_config() + > Part of keras layer interface, where the signature is converted into a dict * **Returns** - - configurational dictionary. - +configurational dictionary. ## maml.models.dl._mlp module Multi-layer perceptron models. +### *class* maml.models.dl._mlp.MLP(input_dim: int | None = None, describer: BaseDescriber | None = None, n_neurons: tuple = (64, 64), activation: str = ‘relu’, n_targets: int = 1, is_classification: bool = False, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = (), \*\*kwargs) -### _class_ maml.models.dl._mlp.MLP(input_dim: int | None = None, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, n_neurons: tuple = (64, 64), activation: str = 'relu', n_targets: int = 1, is_classification: bool = False, optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = (), \*\*kwargs) -Bases: [`KerasModel`](maml.base.md#maml.base._model.KerasModel) +Bases: `KerasModel` This class implements the multi-layer perceptron models. +### maml.models.dl._mlp.construct_mlp(input_dim: int, n_neurons: tuple = (64, 64), activation: str = ‘relu’, n_targets: int = 1, is_classification: bool = False, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = ()) -### maml.models.dl._mlp.construct_mlp(input_dim: int, n_neurons: tuple = (64, 64), activation: str = 'relu', n_targets: int = 1, is_classification: bool = False, optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = ()) Constructor for multi-layer perceptron models. * **Parameters** - * **input_dim** (*int*) – input dimension, i.e., feature dimension diff --git a/docs/maml.models.md b/docs/maml.models.md index 3394d4cb..d343a7a7 100644 --- a/docs/maml.models.md +++ b/docs/maml.models.md @@ -8,38 +8,33 @@ nav_exclude: true MAML models. +## *class* maml.models.AtomSets(describer: BaseDescriber | None = None, input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = ‘relu’, embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = ‘mean’, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) -### _class_ maml.models.AtomSets(describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, input_dim: int | None = None, is_embedding: bool = True, n_neurons: Sequence[int] = (64, 64), n_neurons_final: Sequence[int] = (64, 64), n_targets: int = 1, activation: str = 'relu', embedding_vcal: int = 95, embedding_dim: int = 32, symmetry_func: list[str] | str = 'mean', optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = (), is_classification: bool = False, \*\*symmetry_func_kwargs) -Bases: [`KerasModel`](maml.base.md#maml.base._model.KerasModel) +Bases: `KerasModel` This class implements the DeepSets models. +### _get_data_generator(features, targets, batch_size=128, is_shuffle=True) -#### _get_data_generator(features, targets, batch_size=128, is_shuffle=True) +### _predict(features: ndarray, \*\*kwargs) -#### _predict(features: ndarray, \*\*kwargs) Predict the values given a set of inputs based on fitted models. * **Parameters** - - **features** (*np.ndarray*) – array-like input features. - +**features** (*np.ndarray*) – array-like input features. * **Returns** +List of output objects. - List of output objects. - - +### evaluate(eval_objs, eval_targets, is_feature: bool = False, batch_size: int = 16) -#### evaluate(eval_objs, eval_targets, is_feature: bool = False, batch_size: int = 16) Evaluate objs, targets. * **Parameters** - * **eval_objs** (*list*) – objs for evaluation @@ -51,146 +46,132 @@ Evaluate objs, targets. * **batch_size** (*int*) – evaluation batch size +### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -#### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) - * **Parameters** - - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **val_features** (*list** or **np.ndarray*) – validation features + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_targets** (*list** or **np.ndarray*) – validation targets. + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. +### *classmethod* from_dir(dirname: str) - -#### _classmethod_ from_dir(dirname: str) Load the models from file :param dirname: directory name :type dirname: str Returns: object instance. +### save(dirname: str) -#### save(dirname: str) Save the models and describers. * **Parameters** +**dirname** (*str*) – dirname for save - **dirname** (*str*) – dirname for save - - +## *class* maml.models.KerasModel(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.models.KerasModel(model, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, \*\*kwargs) -Bases: [`BaseModel`](maml.base.md#maml.base._model.BaseModel), [`KerasMixin`](maml.base.md#maml.base._model.KerasMixin) +Bases: `BaseModel`, `KerasMixin` MAML models with keras models as estimators. +### *static* _get_validation_data(val_features, val_targets, \*\*val_kwargs) -#### _static_ _get_validation_data(val_features, val_targets, \*\*val_kwargs) construct validation data, the default is just returning a list of val_features and val_targets. +### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) -#### fit(features: list | np.ndarray, targets: list | np.ndarray | None = None, val_features: list | np.ndarray | None = None, val_targets: list | np.ndarray | None = None, \*\*kwargs) * **Parameters** + * **features** (*list*\* or \**np.ndarray*) – Numerical input feature list or +numpy array with dim (m, n) where m is the number of data and +n is the feature dimension. - * **features** (*list** or **np.ndarray*) – Numerical input feature list or - numpy array with dim (m, n) where m is the number of data and - n is the feature dimension. + * **targets** (*list*\* or \**np.ndarray*) – Numerical output target list, or +numpy array with dim (m, ). - * **targets** (*list** or **np.ndarray*) – Numerical output target list, or - numpy array with dim (m, ). + * **val_features** (*list*\* or \**np.ndarray*) – validation features - * **val_features** (*list** or **np.ndarray*) – validation features - - - * **val_targets** (*list** or **np.ndarray*) – validation targets. + * **val_targets** (*list*\* or \**np.ndarray*) – validation targets. * **Returns** +self - self - +## *class* maml.models.MLP(input_dim: int | None = None, describer: BaseDescriber | None = None, n_neurons: tuple = (64, 64), activation: str = ‘relu’, n_targets: int = 1, is_classification: bool = False, optimizer: str = ‘adam’, loss: str = ‘mse’, compile_metrics: tuple = (), \*\*kwargs) - -### _class_ maml.models.MLP(input_dim: int | None = None, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, n_neurons: tuple = (64, 64), activation: str = 'relu', n_targets: int = 1, is_classification: bool = False, optimizer: str = 'adam', loss: str = 'mse', compile_metrics: tuple = (), \*\*kwargs) -Bases: [`KerasModel`](maml.base.md#maml.base._model.KerasModel) +Bases: `KerasModel` This class implements the multi-layer perceptron models. +## *class* maml.models.SKLModel(model, describer: BaseDescriber | None = None, \*\*kwargs) -### _class_ maml.models.SKLModel(model, describer: [BaseDescriber](maml.base.md#maml.base.BaseDescriber) | None = None, \*\*kwargs) -Bases: [`BaseModel`](maml.base.md#maml.base._model.BaseModel), [`SklearnMixin`](maml.base.md#maml.base._model.SklearnMixin) +Bases: `BaseModel`, `SklearnMixin` MAML models with sklearn models as estimator. +## *class* maml.models.WeightedAverageLayer(\*args, \*\*kwargs) -### _class_ maml.models.WeightedAverageLayer(\*args, \*\*kwargs) Bases: `Layer` Weight average the features using weights. result= sum{w_i^a \* value_i} / sum{w_i^a} +### build(input_shape: Sequence) -#### build(input_shape: Sequence) Build the layer. * **Parameters** +**input_shape** (*tuple*) – input shape tuple - **input_shape** (*tuple*) – input shape tuple - +### call(inputs: Sequence, mask: tf.Tensor | None = None) - -#### call(inputs: Sequence, mask: tf.Tensor | None = None) Core logic of the layer. * **Parameters** - * **inputs** (*tuple*) – input tuple of length 3 * **mask** (*tf.Tensor*) – not used here +### *static* compute_output_shape(input_shape: Sequence) - -#### _static_ compute_output_shape(input_shape: Sequence) Compute output shape from input shape :param input_shape: input shape list. :type input_shape: tuple/list +### get_config() -#### get_config() Get layer configuration. +### *static* reduce_sum(prop: Tensor, index: Tensor, perm: Sequence) -#### _static_ reduce_sum(prop: Tensor, index: Tensor, perm: Sequence) Reduce sum the tensors using index. * **Parameters** - * **prop** (*tf.Tensor*) – tensor with shape [1, n, …] @@ -199,9 +180,8 @@ Reduce sum the tensors using index. * **perm** (*list*) – permutation for transpose. +## *class* maml.models.WeightedSet2Set(\*args, \*\*kwargs) - -### _class_ maml.models.WeightedSet2Set(\*args, \*\*kwargs) Bases: `Layer` This is a modified version from megnet.layers.readout.Set2Set. @@ -209,45 +189,41 @@ Here, in addition to taking features and indices as inputs, we also take a weight tensor. The input to the core logic is [features, weights, indices]. +### _lstm(h, c) -#### _lstm(h, c) +### build(input_shape: Sequence) -#### build(input_shape: Sequence) Build the output shape from input shapes :param input_shape: input shape list. :type input_shape: tuple/list +### call(inputs, mask=None) -#### call(inputs, mask=None) Core logic of the layer. * **Parameters** - * **inputs** (*tuple*) – input tuple of length 3 * **mask** (*tf.Tensor*) – not used here +### compute_output_shape(input_shape) - -#### compute_output_shape(input_shape) Compute output shapes from input shapes :param input_shape: input shapes. :type input_shape: sequence of tuple Returns: sequence of tuples output shapes +### get_config() -#### get_config() > Part of keras layer interface, where the signature is converted into a dict * **Returns** - - configurational dictionary. - +configurational dictionary. ## Subpackages @@ -255,147 +231,145 @@ Returns: sequence of tuples output shapes * [maml.models.dl package](maml.models.dl.md) - * [`AtomSets`](maml.models.dl.md#maml.models.dl.AtomSets) - - - * [`AtomSets._get_data_generator()`](maml.models.dl.md#maml.models.dl.AtomSets._get_data_generator) + * `AtomSets` - * [`AtomSets._predict()`](maml.models.dl.md#maml.models.dl.AtomSets._predict) + * `AtomSets._get_data_generator()` - * [`AtomSets.evaluate()`](maml.models.dl.md#maml.models.dl.AtomSets.evaluate) + * `AtomSets._predict()` - * [`AtomSets.fit()`](maml.models.dl.md#maml.models.dl.AtomSets.fit) + * `AtomSets.evaluate()` - * [`AtomSets.from_dir()`](maml.models.dl.md#maml.models.dl.AtomSets.from_dir) + * `AtomSets.fit()` - * [`AtomSets.save()`](maml.models.dl.md#maml.models.dl.AtomSets.save) + * `AtomSets.from_dir()` - * [`MLP`](maml.models.dl.md#maml.models.dl.MLP) + * `AtomSets.save()` - * [`WeightedAverageLayer`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer) + * `MLP` - * [`WeightedAverageLayer.build()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.build) + * `WeightedAverageLayer` - * [`WeightedAverageLayer.call()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.call) + * `WeightedAverageLayer.build()` - * [`WeightedAverageLayer.compute_output_shape()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.compute_output_shape) + * `WeightedAverageLayer.call()` - * [`WeightedAverageLayer.get_config()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.get_config) + * `WeightedAverageLayer.compute_output_shape()` - * [`WeightedAverageLayer.reduce_sum()`](maml.models.dl.md#maml.models.dl.WeightedAverageLayer.reduce_sum) + * `WeightedAverageLayer.get_config()` - * [`WeightedSet2Set`](maml.models.dl.md#maml.models.dl.WeightedSet2Set) + * `WeightedAverageLayer.reduce_sum()` - * [`WeightedSet2Set._lstm()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set._lstm) + * `WeightedSet2Set` - * [`WeightedSet2Set.build()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.build) + * `WeightedSet2Set._lstm()` - * [`WeightedSet2Set.call()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.call) + * `WeightedSet2Set.build()` - * [`WeightedSet2Set.compute_output_shape()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.compute_output_shape) + * `WeightedSet2Set.call()` - * [`WeightedSet2Set.get_config()`](maml.models.dl.md#maml.models.dl.WeightedSet2Set.get_config) + * `WeightedSet2Set.compute_output_shape()` + * `WeightedSet2Set.get_config()` - * [maml.models.dl._atomsets module](maml.models.dl.md#module-maml.models.dl._atomsets) + * maml.models.dl._atomsets module - * [`AtomSets`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets) + * `AtomSets` - * [`AtomSets._get_data_generator()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets._get_data_generator) + * `AtomSets._get_data_generator()` - * [`AtomSets._predict()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets._predict) + * `AtomSets._predict()` - * [`AtomSets.evaluate()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.evaluate) + * `AtomSets.evaluate()` - * [`AtomSets.fit()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.fit) + * `AtomSets.fit()` - * [`AtomSets.from_dir()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.from_dir) + * `AtomSets.from_dir()` - * [`AtomSets.save()`](maml.models.dl.md#maml.models.dl._atomsets.AtomSets.save) + * `AtomSets.save()` - * [`construct_atom_sets()`](maml.models.dl.md#maml.models.dl._atomsets.construct_atom_sets) + * `construct_atom_sets()` - * [maml.models.dl._keras_utils module](maml.models.dl.md#module-maml.models.dl._keras_utils) + * maml.models.dl._keras_utils module - * [`deserialize_keras_activation()`](maml.models.dl.md#maml.models.dl._keras_utils.deserialize_keras_activation) + * `deserialize_keras_activation()` - * [`deserialize_keras_optimizer()`](maml.models.dl.md#maml.models.dl._keras_utils.deserialize_keras_optimizer) + * `deserialize_keras_optimizer()` - * [maml.models.dl._layers module](maml.models.dl.md#module-maml.models.dl._layers) + * maml.models.dl._layers module - * [`WeightedAverageLayer`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer) + * `WeightedAverageLayer` - * [`WeightedAverageLayer.build()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.build) + * `WeightedAverageLayer.build()` - * [`WeightedAverageLayer.call()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.call) + * `WeightedAverageLayer.call()` - * [`WeightedAverageLayer.compute_output_shape()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.compute_output_shape) + * `WeightedAverageLayer.compute_output_shape()` - * [`WeightedAverageLayer.get_config()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.get_config) + * `WeightedAverageLayer.get_config()` - * [`WeightedAverageLayer.reduce_sum()`](maml.models.dl.md#maml.models.dl._layers.WeightedAverageLayer.reduce_sum) + * `WeightedAverageLayer.reduce_sum()` - * [`WeightedSet2Set`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set) + * `WeightedSet2Set` - * [`WeightedSet2Set._lstm()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set._lstm) + * `WeightedSet2Set._lstm()` - * [`WeightedSet2Set.build()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.build) + * `WeightedSet2Set.build()` - * [`WeightedSet2Set.call()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.call) + * `WeightedSet2Set.call()` - * [`WeightedSet2Set.compute_output_shape()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.compute_output_shape) + * `WeightedSet2Set.compute_output_shape()` - * [`WeightedSet2Set.get_config()`](maml.models.dl.md#maml.models.dl._layers.WeightedSet2Set.get_config) + * `WeightedSet2Set.get_config()` - * [maml.models.dl._mlp module](maml.models.dl.md#module-maml.models.dl._mlp) + * maml.models.dl._mlp module - * [`MLP`](maml.models.dl.md#maml.models.dl._mlp.MLP) + * `MLP` - * [`construct_mlp()`](maml.models.dl.md#maml.models.dl._mlp.construct_mlp) \ No newline at end of file + * `construct_mlp()` \ No newline at end of file diff --git a/docs/maml.sampling.md b/docs/maml.sampling.md index 8a829039..6ac40ef9 100644 --- a/docs/maml.sampling.md +++ b/docs/maml.sampling.md @@ -8,68 +8,64 @@ nav_exclude: true Package implementing sampling methods. - ## maml.sampling.clustering module Clustering methods. +### *class* maml.sampling.clustering.BirchClustering(n: int = 1, threshold_init=0.5, \*\*kwargs) -### _class_ maml.sampling.clustering.BirchClustering(n: int = 1, threshold_init=0.5, \*\*kwargs) Bases: `BaseEstimator`, `TransformerMixin` - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) #### fit(X, y=None) #### transform(PCAfeatures) + ## maml.sampling.direct module ## maml.sampling.pca module +### *class* maml.sampling.pca.PrincipalComponentAnalysis(weighting_PCs=True) -### _class_ maml.sampling.pca.PrincipalComponentAnalysis(weighting_PCs=True) Bases: `BaseEstimator`, `TransformerMixin` Wrap around PCA in scikit-learn to support weighting PCs. - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) #### fit(normalized_features) #### transform(normalized_features) + ## maml.sampling.stratified_sampling module Implementation of stratefied sampling approaches. +### *class* maml.sampling.stratified_sampling.SelectKFromClusters(k: int = 1, allow_duplicate=False) -### _class_ maml.sampling.stratified_sampling.SelectKFromClusters(k: int = 1, allow_duplicate=False) Bases: `BaseEstimator`, `TransformerMixin` Wrapper around selection of K data from each cluster. - -#### _sklearn_auto_wrap_output_keys(_ = {'transform'_ ) +#### *sklearn_auto_wrap_output_keys(* = {‘transform’_ ) #### fit(X, y=None) + Fit the model. * **Parameters** - * **X** – Input features * **y** – Target. - - #### transform(clustering_data: dict) + Perform clustering. * **Parameters** - - **clustering_data** – Data to cluster. \ No newline at end of file +**clustering_data** – Data to cluster. \ No newline at end of file diff --git a/docs/maml.utils.md b/docs/maml.utils.md index b1846feb..fd9ca6da 100644 --- a/docs/maml.utils.md +++ b/docs/maml.utils.md @@ -8,49 +8,48 @@ nav_exclude: true Utilities package. +## *class* maml.utils.ConstantValue(value: float, \*\*kwargs) -### _class_ maml.utils.ConstantValue(value: float, \*\*kwargs) Bases: `ValueProfile` Return constant value. +### get_value() -#### get_value() Return constant value. +## *class* maml.utils.DataSplitter() -### _class_ maml.utils.DataSplitter() Bases: `MSONable` Data splitter base class. +### split(mat_ids, \*\*kwargs) -#### split(mat_ids, \*\*kwargs) Split the mat_ids, optionally one can provide targets. This is useful in stratified split. * **Parameters** - - **mat_ids** (*list*) – list of material ids - +**mat_ids** (*list*) – list of material ids Returns: (train_ids, val_ids, test_ids) or - (train_ids, test_ids) +```none +(train_ids, test_ids) +``` +## *class* maml.utils.DummyScaler() -### _class_ maml.utils.DummyScaler() Bases: `MSONable` Dummy scaler does nothing. +### *classmethod* from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) -#### _classmethod_ from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) * **Parameters** - * **structures** (*list*) – list of structures/molecules @@ -59,11 +58,10 @@ Dummy scaler does nothing. * **is_intensive** (*bool*) – whether the target is intensive - Returns: DummyScaler. +### *static* inverse_transform(transformed_target: float, n: int = 1) -#### _static_ inverse_transform(transformed_target: float, n: int = 1) return as it is :param transformed_target: transformed target :type transformed_target: float @@ -72,43 +70,37 @@ return as it is * **Returns** +transformed_target. - transformed_target. - - +### *static* transform(target: float, n: int = 1) -#### _static_ transform(target: float, n: int = 1) * **Parameters** - * **target** (*float*) – target numerical value * **n** (*int*) – number of atoms - * **Returns** +target. - target. - - +## *class* maml.utils.LinearProfile(value_start: float, value_end: float = 0.0, max_steps: int = 100, \*\*kwargs) -### _class_ maml.utils.LinearProfile(value_start: float, value_end: float = 0.0, max_steps: int = 100, \*\*kwargs) Bases: `ValueProfile` LinearProfile by setting starting value and the rate of value change. The profile can be initialized either by [value_start, value_end, max_step] or [value_start, rate]. +### get_value() -#### get_value() Get LinearProfile value Returns: float. +## *class* maml.utils.MultiScratchDir(rootpath: str | Path, n_dirs: int = 1, create_symbolic_link: bool = False, copy_from_current_on_enter: bool = False, copy_to_current_on_exit: bool = False) -### _class_ maml.utils.MultiScratchDir(rootpath: str | Path, n_dirs: int = 1, create_symbolic_link: bool = False, copy_from_current_on_enter: bool = False, copy_to_current_on_exit: bool = False) Bases: `object` Creates a “with” context manager that automatically handles creation of @@ -136,10 +128,10 @@ The way it works is as follows: 6. Delete temp dir. +### SCR_LINK(_ = ‘scratch_link_ ) -#### SCR_LINK(_ = 'scratch_link_ ) +## *class* maml.utils.Scaler() -### _class_ maml.utils.Scaler() Bases: `MSONable` Base Scaler class. It implements transform and @@ -147,8 +139,8 @@ inverse_transform. Both methods will take number of atom as the second parameter in addition to the target property. +### inverse_transform(transformed_target: float, n: int = 1) -#### inverse_transform(transformed_target: float, n: int = 1) Inverse transform of the target :param transformed_target: transformed target :type transformed_target: float @@ -157,12 +149,10 @@ Inverse transform of the target * **Returns** +target. - target. - - +### transform(target: float, n: int = 1) -#### transform(target: float, n: int = 1) Transform the target values into new target values :param target: target numerical value :type target: float @@ -171,27 +161,25 @@ Transform the target values into new target values * **Returns** +scaled target. - scaled target. - +## *class* maml.utils.ShuffleSplitter(ratios: str = ‘80/10/10’, delim: str = ‘/’, random_seed: int | None = None) - -### _class_ maml.utils.ShuffleSplitter(ratios: str = '80/10/10', delim: str = '/', random_seed: int | None = None) Bases: `DataSplitter` Randomly shuffe the material ids and split the ids into given ratios. +### split(mat_ids, \*\*kwargs) -#### split(mat_ids, \*\*kwargs) Randomly split the mat_ids :param mat_ids: material ids :type mat_ids: list Returns: +## *class* maml.utils.StandardScaler(mean: float = 0.0, std: float = 1.0, is_intensive: bool = True) -### _class_ maml.utils.StandardScaler(mean: float = 0.0, std: float = 1.0, is_intensive: bool = True) Bases: `Scaler` Standard scaler with consideration of extensive/intensive quantity @@ -203,8 +191,8 @@ std is the std for target/atom > standard scaling the target and. +### *classmethod* from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) -#### _classmethod_ from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) Generate a target scaler from a list of input structures/molecules, a target value vector and an indicator for intensiveness of the property @@ -217,8 +205,8 @@ property Returns: new instance. +### inverse_transform(transformed_target: float, n: int = 1) -#### inverse_transform(transformed_target: float, n: int = 1) Inverse transform of the target :param transformed_target: transformed target :type transformed_target: float @@ -227,12 +215,10 @@ Inverse transform of the target * **Returns** +original target. - original target. - +### transform(target: float, n: int = 1) - -#### transform(target: float, n: int = 1) Transform numeric values according the mean and std, plus a factor n :param target: target numerical value :type target: float @@ -241,12 +227,10 @@ Transform numeric values according the mean and std, plus a factor n * **Returns** +scaled target. - scaled target. +## *class* maml.utils.Stats() - - -### _class_ maml.utils.Stats() Bases: `object` Calculate the stats of a list of values. @@ -256,90 +240,80 @@ for machine learning purposes. supported +### allowed_stats(_ = [‘max’, ‘min’, ‘range’, ‘mode’, ‘mean_absolute_deviation’, ‘mean_absolute_error’, ‘moment’, ‘mean’, ‘inverse_mean’, ‘average’, ‘std’, ‘skewness’, ‘kurtosis’, ‘geometric_mean’, ‘power_mean’, ‘shifted_geometric_mean’, ‘harmonic_mean’_ ) -#### allowed_stats(_ = ['max', 'min', 'range', 'mode', 'mean_absolute_deviation', 'mean_absolute_error', 'moment', 'mean', 'inverse_mean', 'average', 'std', 'skewness', 'kurtosis', 'geometric_mean', 'power_mean', 'shifted_geometric_mean', 'harmonic_mean'_ ) +### *static* average(data: list[float], weights: list[float] | None = None) -#### _static_ average(data: list[float], weights: list[float] | None = None) Weighted average. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: average value +### *static* geometric_mean(data: list[float], weights: list[float] | None = None) -#### _static_ geometric_mean(data: list[float], weights: list[float] | None = None) Geometric mean of the data. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: geometric mean of the distribution +### *static* harmonic_mean(data: list[float], weights: list[float] | None = None) -#### _static_ harmonic_mean(data: list[float], weights: list[float] | None = None) harmonic mean of the data. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: harmonic mean of the distribution +### *static* inverse_mean(data: list[float], weights: list[float] | None = None) -#### _static_ inverse_mean(data: list[float], weights: list[float] | None = None) inverse mean. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: average value +### *static* kurtosis(data: list[float], weights: list[float] | None = None) -#### _static_ kurtosis(data: list[float], weights: list[float] | None = None) Kurtosis of the distribution. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: Kurtosis of the distribution +### *static* max(data: list[float], weights: list[float] | None = None) -#### _static_ max(data: list[float], weights: list[float] | None = None) Max of value Args:31 @@ -348,56 +322,50 @@ Args:31 Returns: maximum value +### *static* mean(data: list[float], weights: list[float] | None = None) -#### _static_ mean(data: list[float], weights: list[float] | None = None) Weighted average. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: average value +### *static* mean_absolute_deviation(data: list[float], weights: list[float] | None = None) -#### _static_ mean_absolute_deviation(data: list[float], weights: list[float] | None = None) mean absolute deviation. * **Parameters** - * **data** (*list*) – list of float data * **weights** (*list*) – optional weights - Returns: mean absolute deviation +### *static* mean_absolute_error(data: list[float], weights: list[float] | None = None) -#### _static_ mean_absolute_error(data: list[float], weights: list[float] | None = None) mean absolute error. * **Parameters** - * **data** (*list*) – list of float data * **weights** (*list*) – optional weights - Returns: mean absolute error +### *static* min(data: list[float], weights: list[float] | None = None) -#### _static_ min(data: list[float], weights: list[float] | None = None) min of value :param data: list of float data :type data: list @@ -406,25 +374,23 @@ min of value Returns: minimum value +### *static* mode(data: list[float], weights: list[float] | None = None) -#### _static_ mode(data: list[float], weights: list[float] | None = None) Mode of data, if multiple entries have equal counts, compute the average of those. * **Parameters** - * **data** (*list*) – list of float data * **weights** (*list*) – optional weights - Returns: mode of values, i.e., max - min +### *static* moment(data: list[float], weights: list[float] | None = None, order: int | None = None, max_order: int | None = None) -#### _static_ moment(data: list[float], weights: list[float] | None = None, order: int | None = None, max_order: int | None = None) Moment of probability mass function. order = 1 means weighted mean @@ -436,11 +402,10 @@ order > 2 corresponds to higher order moment to * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data points + * **weights** (*list*\* or \**None*) – weights for each data points * **order** (*int*) – moment order @@ -448,30 +413,27 @@ order > 2 corresponds to higher order moment to * **max_order** (*int*) – if set, it will overwrite order - Returns: float or list of floats +### *static* power_mean(data: list[float], weights: list[float] | None = None, p: int = 1) -#### _static_ power_mean(data: list[float], weights: list[float] | None = None, p: int = 1) power mean [https://en.wikipedia.org/wiki/Generalized_mean](https://en.wikipedia.org/wiki/Generalized_mean). * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point + * **weights** (*list*\* or \**None*) – weights for each data point * **p** (*int*) – power - Returns: power mean of the distribution +### *static* range(data: list[float], weights: list[float] | None = None) -#### _static_ range(data: list[float], weights: list[float] | None = None) Range of values :param data: list of float data :type data: list @@ -480,8 +442,8 @@ Range of values Returns: range of values, i.e., max - min +### *static* shifted_geometric_mean(data: list[float], weights: list[float] | None = None, shift: float = 100) -#### _static_ shifted_geometric_mean(data: list[float], weights: list[float] | None = None, shift: float = 100) Since we cannot calculate the geometric means on negative or zero values, we can first shift all values to positive and then calculate the geometric mean afterwards, we shift the computed geometric mean back by a shift value. @@ -489,52 +451,46 @@ afterwards, we shift the computed geometric mean back by a shift value. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point + * **weights** (*list*\* or \**None*) – weights for each data point * **shift** (*float*) – shift value - Returns: geometric mean of the distribution +### *static* skewness(data: list[float], weights: list[float] | None = None) -#### _static_ skewness(data: list[float], weights: list[float] | None = None) Skewness of the distribution. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: Skewness of the distribution +### *static* std(data: list[float], weights: list[float] | None = None) -#### _static_ std(data: list[float], weights: list[float] | None = None) Standard deviation. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: Standard deviation +## *class* maml.utils.ValueProfile(max_steps: int | None = None, \*\*kwargs) -### _class_ maml.utils.ValueProfile(max_steps: int | None = None, \*\*kwargs) Bases: `object` Base class for ValueProfile. The base class has the following methods @@ -542,21 +498,21 @@ Base class for ValueProfile. The base class has the following methods > add one to step +### get_value(self) -#### get_value(self) abstract method that return the value. +### get_value() -#### get_value() abstract method that returns the current value Returns: value float. +### increment_step() -#### increment_step() Increase step attribute by one. +## maml.utils.check_structures_forces_stresses(structures: list[Structure], forces: list | None = None, stresses: list | None = None, stress_format: str = ‘VASP’, return_none: bool = True) -### maml.utils.check_structures_forces_stresses(structures: list[Structure], forces: list | None = None, stresses: list | None = None, stress_format: str = 'VASP', return_none: bool = True) Check structures, forces and stresses. The forces and stress are dependent on the lattice orientation. This function will rotate the structures and the corresponding forces and structures to lammps format @@ -569,7 +525,6 @@ The lattice are formed by the row vectors. * **Parameters** - * **structures** (*list*) – list of structures @@ -580,26 +535,24 @@ The lattice are formed by the row vectors. * **stress_format** (*str*) – stress format, choose from - “VASP”, “LAMMPS”, “SNAP” +“VASP”, “LAMMPS”, “SNAP” * **return_none** (*bool*) – whether to return list of None - for forces and stresses - +for forces and stresses Returns: structures [forces], [stresses] +## maml.utils.convert_docs(docs, include_stress=False, \*\*kwargs) -### maml.utils.convert_docs(docs, include_stress=False, \*\*kwargs) Method to convert a list of docs into objects, e.g., Structure and DataFrame. * **Parameters** - * **docs** (*[**dict**]*) – List of docs. Each doc should have the same - format as one returned from .dft.parse_dir. +format as one returned from .dft.parse_dir. * **include_stress** (*bool*) – Whether to include stress components. @@ -608,17 +561,14 @@ Structure and DataFrame. * **\*\*kwargs** – Passthrough. - * **Returns** +A list of structures, and a DataFrame with energy and force +data in ‘y_orig’ column, data type (‘energy’ or ‘force’) in +‘dtype’ column, No. of atoms in ‘n’ column sharing the same row +of energy data while ‘n’ being 1 for the rows of force data. - A list of structures, and a DataFrame with energy and force - data in ‘y_orig’ column, data type (‘energy’ or ‘force’) in - ‘dtype’ column, No. of atoms in ‘n’ column sharing the same row - of energy data while ‘n’ being 1 for the rows of force data. - +## maml.utils.cwt(z: np.ndarray, widths: np.ndarray, wavelet: str | Callable = ‘morlet2’, \*\*kwargs) - -### maml.utils.cwt(z: np.ndarray, widths: np.ndarray, wavelet: str | Callable = 'morlet2', \*\*kwargs) The scalogram of the signal :param z: 1D signal array :type z: np.ndarray @@ -629,18 +579,16 @@ The scalogram of the signal Returns: 2D scalogram. +## maml.utils.feature_dim_from_test_system(describer) -### maml.utils.feature_dim_from_test_system(describer) Get feature size from a test system. * **Parameters** +**describer** (*BaseDescriber*) – describers instance - **describer** ([*BaseDescriber*](maml.base.md#maml.base.BaseDescriber)) – describers instance - +## maml.utils.fft_magnitude(z: ndarray) - -### maml.utils.fft_magnitude(z: ndarray) Discrete Fourier Transform the signal z and return the magnitude of the coefficients :param z: 1D signal array @@ -648,106 +596,94 @@ the magnitude of the coefficients Returns: 1D magnitude. +## maml.utils.get_describer_dummy_obj(instance) -### maml.utils.get_describer_dummy_obj(instance) For a describers, get a dummy object for transform_one. This relies on the type hint. * **Parameters** +**instance** (*BaseDescriber*) – describers instance - **instance** ([*BaseDescriber*](maml.base.md#maml.base.BaseDescriber)) – describers instance - +## maml.utils.get_full_args(func: Callable) - -### maml.utils.get_full_args(func: Callable) Get args from function. * **Parameters** +**func** (*callable*) – function to determine the args - **func** (*callable*) – function to determine the args - +## maml.utils.get_full_stats_and_funcs(stats: list) - -### maml.utils.get_full_stats_and_funcs(stats: list) Get expanded stats function name str and the corresponding function callables. * **Parameters** - - **stats** (*list*) – a list of stats names, e.g, [‘mean’, ‘std’, ‘moment:1:None’] - +**stats** (*list*) – a list of stats names, e.g, [‘mean’, ‘std’, ‘moment:1:None’] Returns: list of stats names, list of stats callable +## maml.utils.get_lammps_lattice_and_rotation(structure: Structure, origin=(0, 0, 0)) -### maml.utils.get_lammps_lattice_and_rotation(structure: Structure, origin=(0, 0, 0)) Transform structure to lammps compatible structure. The lattice and rotation matrix are returned. * **Parameters** - * **structure** (*Structure*) – pymatgen structure * **origin** (*tuple*) – origin coordinates - Returns: new lattice, rotation symmetry operator, rotation matrix +## maml.utils.get_sp_method(sp_method: str | Callable) -### maml.utils.get_sp_method(sp_method: str | Callable) Providing a signal processing method name return the callable :param sp_method: name of the sp function :type sp_method: str Returns: callable for signal processing. +## maml.utils.njit(func: Callable) -### maml.utils.njit(func: Callable) Dummy decorator, returns the original function :param func: function to be wrapped. :type func: Callable Returns: decorated function +## maml.utils.pool_from(structures, energies=None, forces=None, stresses=None) -### maml.utils.pool_from(structures, energies=None, forces=None, stresses=None) Method to convert structures and their properties in to datapool format. * **Parameters** - * **structures** (*[**Structure**]*) – The list of Pymatgen Structure object. * **energies** (*[**float**]*) – The list of total energies of each structure - in structures list. +in structures list. * **forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each - single structure case. +with m atoms in structures list. m can be varied with each +single structure case. * **stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. - +structure in structures list. * **Returns** +([dict]) - ([dict]) - +## maml.utils.spectrogram(z: np.ndarray, return_time_freq: bool = False) - -### maml.utils.spectrogram(z: np.ndarray, return_time_freq: bool = False) The spectrogram of the signal :param z: 1D signal array :type z: np.ndarray @@ -756,22 +692,20 @@ The spectrogram of the signal Returns: 2D spectrogram. +## maml.utils.stats_list_conversion(stats_list: list[str]) -### maml.utils.stats_list_conversion(stats_list: list[str]) Convert a list of stats str into a fully expanded list. This applies mainly to stats that can return a list of values, e.g., moment with max_order > 1. * **Parameters** - - **stats_list** (*list*) – list of stats str - +**stats_list** (*list*) – list of stats str Returns: list of expanded stats str +## maml.utils.stress_format_change(stress: np.ndarray | list[float], from_format: str, to_format: str) -### maml.utils.stress_format_change(stress: np.ndarray | list[float], from_format: str, to_format: str) Convert stress format from from_format to to_format :param stress: length-6 stress vector :type stress: list of float @@ -782,27 +716,25 @@ Convert stress format from from_format to to_format Returns: list of float stress vector +## maml.utils.stress_list_to_matrix(stress: np.ndarray | list[float], stress_format: str = ‘VASP’) -### maml.utils.stress_list_to_matrix(stress: np.ndarray | list[float], stress_format: str = 'VASP') convert a length-6 stress list to stress matrix 3x3. * **Parameters** - - * **stress** (*list** of **float*) – list of stress + * **stress** (*list*\* of \**float*) – list of stress * **stress_format** (*str*) – Supported formats are the follows - VASP: xx, yy, zz, xy, yz, xz - LAMMPS: xx, yy, zz, xy, zx, yz - SNAP: xx, yy, zz, yz, xz, xy - +VASP: xx, yy, zz, xy, yz, xz +LAMMPS: xx, yy, zz, xy, zx, yz +SNAP: xx, yy, zz, yz, xz, xy Returns: 3x3 stress matrix +## maml.utils.stress_matrix_to_list(stress_matrix: ndarray, stress_format: str = ‘VASP’) -### maml.utils.stress_matrix_to_list(stress_matrix: ndarray, stress_format: str = 'VASP') Stress matrix to list representation :param stress_matrix: stress matrix 3x3 :type stress_matrix: np.ndarray @@ -811,44 +743,42 @@ Stress matrix to list representation Returns: list of float stress vector. +## maml.utils.to_array(x) -### maml.utils.to_array(x) Convert x into numerical array :param x: x can be a dataframe, a list or an array return np.ndarray. +## maml.utils.to_composition(obj: Composition | Molecule | Structure | str) -### maml.utils.to_composition(obj: Composition | Molecule | Structure | str) Convert str/structure or composition to compositions. * **Parameters** - - **obj** (*str/structure/composition*) – object to convert - +**obj** (*str/structure/composition*) – object to convert * **Returns** +Composition object - Composition object - +## maml.utils.write_data_from_structure(structure: Structure, filename: str, ff_elements: list[str] | None = None, significant_figures: int = 6, origin: tuple = (0, 0, 0)) - -### maml.utils.write_data_from_structure(structure: Structure, filename: str, ff_elements: list[str] | None = None, significant_figures: int = 6, origin: tuple = (0, 0, 0)) Write structure to lammps data file, this is to speed up pymatgen LammpsData. Args:a - structure (Structure): pymatgen structure - filename (str): filename - ff_elements (list of str): elements to be considered - significant_figures (int): significant figures of floats in output - origin (tuple): origin coordinates +```none +structure (Structure): pymatgen structure +filename (str): filename +ff_elements (list of str): elements to be considered +significant_figures (int): significant figures of floats in output +origin (tuple): origin coordinates +``` +## maml.utils.wvd(z: np.ndarray, return_all: bool = False) -### maml.utils.wvd(z: np.ndarray, return_all: bool = False) Wigner Ville Distribution calculator :param z: signal 1D :type z: np.ndarray @@ -858,22 +788,20 @@ Wigner Ville Distribution calculator Returns: NxN wvd matrix. - ## maml.utils._data_conversion module Convert data list to docs or pool existing data lists for training. - ### maml.utils._data_conversion.convert_docs(docs, include_stress=False, \*\*kwargs) + Method to convert a list of docs into objects, e.g., Structure and DataFrame. * **Parameters** - * **docs** (*[**dict**]*) – List of docs. Each doc should have the same - format as one returned from .dft.parse_dir. +format as one returned from .dft.parse_dir. * **include_stress** (*bool*) – Whether to include stress components. @@ -882,17 +810,14 @@ Structure and DataFrame. * **\*\*kwargs** – Passthrough. - * **Returns** - - A list of structures, and a DataFrame with energy and force - data in ‘y_orig’ column, data type (‘energy’ or ‘force’) in - ‘dtype’ column, No. of atoms in ‘n’ column sharing the same row - of energy data while ‘n’ being 1 for the rows of force data. - - +A list of structures, and a DataFrame with energy and force +data in ‘y_orig’ column, data type (‘energy’ or ‘force’) in +‘dtype’ column, No. of atoms in ‘n’ column sharing the same row +of energy data while ‘n’ being 1 for the rows of force data. ### maml.utils._data_conversion.doc_from(structure, energy=None, force=None, stress=None) + Method to convert structure and its properties into doc format for further processing. If properties are None, zeros array will be used. @@ -900,7 +825,6 @@ array will be used. * **Parameters** - * **structure** (*Structure*) – Pymatgen Structure object. @@ -908,52 +832,45 @@ array will be used. * **force** (*np.array*) – The (m, 3) forces array of the structure - where m is the number of atoms in structure. +where m is the number of atoms in structure. * **stress** (*list/np.array*) – The (6, ) stresses array of the - structure. - +structure. * **Returns** - - (dict) - - +(dict) ### maml.utils._data_conversion.pool_from(structures, energies=None, forces=None, stresses=None) + Method to convert structures and their properties in to datapool format. * **Parameters** - * **structures** (*[**Structure**]*) – The list of Pymatgen Structure object. * **energies** (*[**float**]*) – The list of total energies of each structure - in structures list. +in structures list. * **forces** (*[**np.array**]*) – List of (m, 3) forces array of each structure - with m atoms in structures list. m can be varied with each - single structure case. +with m atoms in structures list. m can be varied with each +single structure case. * **stresses** (*list*) – List of (6, ) virial stresses of each - structure in structures list. - +structure in structures list. * **Returns** - - ([dict]) - - +([dict]) ### maml.utils._data_conversion.to_array(x) + Convert x into numerical array :param x: x can be a dataframe, a list or an array @@ -963,36 +880,36 @@ return np.ndarray. Data split. +### *class* maml.utils._data_split.DataSplitter() -### _class_ maml.utils._data_split.DataSplitter() Bases: `MSONable` Data splitter base class. - #### split(mat_ids, \*\*kwargs) + Split the mat_ids, optionally one can provide targets. This is useful in stratified split. * **Parameters** - - **mat_ids** (*list*) – list of material ids - +**mat_ids** (*list*) – list of material ids Returns: (train_ids, val_ids, test_ids) or - (train_ids, test_ids) +```none +(train_ids, test_ids) +``` +### *class* maml.utils._data_split.ShuffleSplitter(ratios: str = ‘80/10/10’, delim: str = ‘/’, random_seed: int | None = None) -### _class_ maml.utils._data_split.ShuffleSplitter(ratios: str = '80/10/10', delim: str = '/', random_seed: int | None = None) Bases: `DataSplitter` Randomly shuffe the material ids and split the ids into given ratios. - #### split(mat_ids, \*\*kwargs) + Randomly split the mat_ids :param mat_ids: material ids :type mat_ids: list @@ -1003,58 +920,50 @@ Returns: Dummy test systems. - ### maml.utils._dummy.feature_dim_from_test_system(describer) + Get feature size from a test system. * **Parameters** - - **describer** ([*BaseDescriber*](maml.base.md#maml.base.BaseDescriber)) – describers instance - - +**describer** (*BaseDescriber*) – describers instance ### maml.utils._dummy.get_describer_dummy_obj(instance) + For a describers, get a dummy object for transform_one. This relies on the type hint. * **Parameters** - - **instance** ([*BaseDescriber*](maml.base.md#maml.base.BaseDescriber)) – describers instance - +**instance** (*BaseDescriber*) – describers instance ## maml.utils._inspect module Inspect function args. - ### maml.utils._inspect.get_full_args(func: Callable) + Get args from function. * **Parameters** - - **func** (*callable*) – function to determine the args - - +**func** (*callable*) – function to determine the args ### maml.utils._inspect.get_param_types(func) + Get param and type info. * **Parameters** - - **func** (*callable*) – function to determine the arg types - +**func** (*callable*) – function to determine the arg types ## maml.utils._jit module Simple numba utility. Some functions can excelerated substantially with numba. - ### maml.utils._jit.njit(func: Callable) + Dummy decorator, returns the original function :param func: function to be wrapped. :type func: Callable @@ -1065,32 +974,28 @@ Returns: decorated function LAMMPS utility. - ### maml.utils._lammps._get_atomic_mass(element_or_specie: str) + Get atomic mass from element or specie string. * **Parameters** - - **element_or_specie** (*str*) – specie or element string - +**element_or_specie** (*str*) – specie or element string Returns: float mass - ### maml.utils._lammps._get_charge(element_or_specie: str | Element | Species) + Get charge from element or specie. * **Parameters** - - **element_or_specie** (*str** or **Element** or **Species*) – element or specie - +**element_or_specie** (*str*\* or **Element** or \**Species*) – element or specie Returns: charge float +### maml.utils._lammps.check_structures_forces_stresses(structures: list[Structure], forces: list | None = None, stresses: list | None = None, stress_format: str = ‘VASP’, return_none: bool = True) -### maml.utils._lammps.check_structures_forces_stresses(structures: list[Structure], forces: list | None = None, stresses: list | None = None, stress_format: str = 'VASP', return_none: bool = True) Check structures, forces and stresses. The forces and stress are dependent on the lattice orientation. This function will rotate the structures and the corresponding forces and structures to lammps format @@ -1103,7 +1008,6 @@ The lattice are formed by the row vectors. * **Parameters** - * **structures** (*list*) – list of structures @@ -1114,34 +1018,31 @@ The lattice are formed by the row vectors. * **stress_format** (*str*) – stress format, choose from - “VASP”, “LAMMPS”, “SNAP” +“VASP”, “LAMMPS”, “SNAP” * **return_none** (*bool*) – whether to return list of None - for forces and stresses - +for forces and stresses Returns: structures [forces], [stresses] - ### maml.utils._lammps.get_lammps_lattice_and_rotation(structure: Structure, origin=(0, 0, 0)) + Transform structure to lammps compatible structure. The lattice and rotation matrix are returned. * **Parameters** - * **structure** (*Structure*) – pymatgen structure * **origin** (*tuple*) – origin coordinates - Returns: new lattice, rotation symmetry operator, rotation matrix - ### maml.utils._lammps.stress_format_change(stress: np.ndarray | list[float], from_format: str, to_format: str) + Convert stress format from from_format to to_format :param stress: length-6 stress vector :type stress: list of float @@ -1152,27 +1053,25 @@ Convert stress format from from_format to to_format Returns: list of float stress vector +### maml.utils._lammps.stress_list_to_matrix(stress: np.ndarray | list[float], stress_format: str = ‘VASP’) -### maml.utils._lammps.stress_list_to_matrix(stress: np.ndarray | list[float], stress_format: str = 'VASP') convert a length-6 stress list to stress matrix 3x3. * **Parameters** - - * **stress** (*list** of **float*) – list of stress + * **stress** (*list*\* of \**float*) – list of stress * **stress_format** (*str*) – Supported formats are the follows - VASP: xx, yy, zz, xy, yz, xz - LAMMPS: xx, yy, zz, xy, zx, yz - SNAP: xx, yy, zz, yz, xz, xy - +VASP: xx, yy, zz, xy, yz, xz +LAMMPS: xx, yy, zz, xy, zx, yz +SNAP: xx, yy, zz, yz, xz, xy Returns: 3x3 stress matrix +### maml.utils._lammps.stress_matrix_to_list(stress_matrix: ndarray, stress_format: str = ‘VASP’) -### maml.utils._lammps.stress_matrix_to_list(stress_matrix: ndarray, stress_format: str = 'VASP') Stress matrix to list representation :param stress_matrix: stress matrix 3x3 :type stress_matrix: np.ndarray @@ -1181,55 +1080,52 @@ Stress matrix to list representation Returns: list of float stress vector. - ### maml.utils._lammps.write_data_from_structure(structure: Structure, filename: str, ff_elements: list[str] | None = None, significant_figures: int = 6, origin: tuple = (0, 0, 0)) + Write structure to lammps data file, this is to speed up pymatgen LammpsData. Args:a - structure (Structure): pymatgen structure - filename (str): filename - ff_elements (list of str): elements to be considered - significant_figures (int): significant figures of floats in output - origin (tuple): origin coordinates +```none +structure (Structure): pymatgen structure +filename (str): filename +ff_elements (list of str): elements to be considered +significant_figures (int): significant figures of floats in output +origin (tuple): origin coordinates +``` ## maml.utils._material module Materials utils. - ### maml.utils._material.to_composition(obj: Composition | Molecule | Structure | str) + Convert str/structure or composition to compositions. * **Parameters** - - **obj** (*str/structure/composition*) – object to convert - +**obj** (*str/structure/composition*) – object to convert * **Returns** - - Composition object - +Composition object ## maml.utils._preprocessing module Target preprocessing. +### *class* maml.utils._preprocessing.DummyScaler() -### _class_ maml.utils._preprocessing.DummyScaler() Bases: `MSONable` Dummy scaler does nothing. +#### *classmethod* from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) -#### _classmethod_ from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) * **Parameters** - * **structures** (*list*) – list of structures/molecules @@ -1238,11 +1134,10 @@ Dummy scaler does nothing. * **is_intensive** (*bool*) – whether the target is intensive - Returns: DummyScaler. +#### *static* inverse_transform(transformed_target: float, n: int = 1) -#### _static_ inverse_transform(transformed_target: float, n: int = 1) return as it is :param transformed_target: transformed target :type transformed_target: float @@ -1251,30 +1146,24 @@ return as it is * **Returns** +transformed_target. - transformed_target. +#### *static* transform(target: float, n: int = 1) - -#### _static_ transform(target: float, n: int = 1) - * **Parameters** - * **target** (*float*) – target numerical value * **n** (*int*) – number of atoms - * **Returns** +target. - target. +### *class* maml.utils._preprocessing.Scaler() - - -### _class_ maml.utils._preprocessing.Scaler() Bases: `MSONable` Base Scaler class. It implements transform and @@ -1282,8 +1171,8 @@ inverse_transform. Both methods will take number of atom as the second parameter in addition to the target property. - #### inverse_transform(transformed_target: float, n: int = 1) + Inverse transform of the target :param transformed_target: transformed target :type transformed_target: float @@ -1292,12 +1181,10 @@ Inverse transform of the target * **Returns** - - target. - - +target. #### transform(target: float, n: int = 1) + Transform the target values into new target values :param target: target numerical value :type target: float @@ -1306,12 +1193,10 @@ Transform the target values into new target values * **Returns** +scaled target. - scaled target. +### *class* maml.utils._preprocessing.StandardScaler(mean: float = 0.0, std: float = 1.0, is_intensive: bool = True) - - -### _class_ maml.utils._preprocessing.StandardScaler(mean: float = 0.0, std: float = 1.0, is_intensive: bool = True) Bases: `Scaler` Standard scaler with consideration of extensive/intensive quantity @@ -1323,8 +1208,8 @@ std is the std for target/atom > standard scaling the target and. +#### *classmethod* from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) -#### _classmethod_ from_training_data(structures: list[StructureOrMolecule], targets: VectorLike, is_intensive: bool = True) Generate a target scaler from a list of input structures/molecules, a target value vector and an indicator for intensiveness of the property @@ -1337,8 +1222,8 @@ property Returns: new instance. - #### inverse_transform(transformed_target: float, n: int = 1) + Inverse transform of the target :param transformed_target: transformed target :type transformed_target: float @@ -1347,12 +1232,10 @@ Inverse transform of the target * **Returns** - - original target. - - +original target. #### transform(target: float, n: int = 1) + Transform numeric values according the mean and std, plus a factor n :param target: target numerical value :type target: float @@ -1361,16 +1244,14 @@ Transform numeric values according the mean and std, plus a factor n * **Returns** - - scaled target. - +scaled target. ## maml.utils._signal_processing module Signal processing utils. +### maml.utils._signal_processing.cwt(z: np.ndarray, widths: np.ndarray, wavelet: str | Callable = ‘morlet2’, \*\*kwargs) -### maml.utils._signal_processing.cwt(z: np.ndarray, widths: np.ndarray, wavelet: str | Callable = 'morlet2', \*\*kwargs) The scalogram of the signal :param z: 1D signal array :type z: np.ndarray @@ -1381,8 +1262,8 @@ The scalogram of the signal Returns: 2D scalogram. - ### maml.utils._signal_processing.fft_magnitude(z: ndarray) + Discrete Fourier Transform the signal z and return the magnitude of the coefficients :param z: 1D signal array @@ -1390,16 +1271,16 @@ the magnitude of the coefficients Returns: 1D magnitude. - ### maml.utils._signal_processing.get_sp_method(sp_method: str | Callable) + Providing a signal processing method name return the callable :param sp_method: name of the sp function :type sp_method: str Returns: callable for signal processing. - ### maml.utils._signal_processing.spectrogram(z: np.ndarray, return_time_freq: bool = False) + The spectrogram of the signal :param z: 1D signal array :type z: np.ndarray @@ -1408,8 +1289,8 @@ The spectrogram of the signal Returns: 2D spectrogram. - ### maml.utils._signal_processing.wvd(z: np.ndarray, return_all: bool = False) + Wigner Ville Distribution calculator :param z: signal 1D :type z: np.ndarray @@ -1423,8 +1304,8 @@ Returns: NxN wvd matrix. Utils for describers. +### *class* maml.utils._stats.Stats() -### _class_ maml.utils._stats.Stats() Bases: `object` Calculate the stats of a list of values. @@ -1434,90 +1315,80 @@ for machine learning purposes. supported +#### allowed_stats(_ = [‘max’, ‘min’, ‘range’, ‘mode’, ‘mean_absolute_deviation’, ‘mean_absolute_error’, ‘moment’, ‘mean’, ‘inverse_mean’, ‘average’, ‘std’, ‘skewness’, ‘kurtosis’, ‘geometric_mean’, ‘power_mean’, ‘shifted_geometric_mean’, ‘harmonic_mean’_ ) -#### allowed_stats(_ = ['max', 'min', 'range', 'mode', 'mean_absolute_deviation', 'mean_absolute_error', 'moment', 'mean', 'inverse_mean', 'average', 'std', 'skewness', 'kurtosis', 'geometric_mean', 'power_mean', 'shifted_geometric_mean', 'harmonic_mean'_ ) +#### *static* average(data: list[float], weights: list[float] | None = None) -#### _static_ average(data: list[float], weights: list[float] | None = None) Weighted average. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: average value +#### *static* geometric_mean(data: list[float], weights: list[float] | None = None) -#### _static_ geometric_mean(data: list[float], weights: list[float] | None = None) Geometric mean of the data. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: geometric mean of the distribution +#### *static* harmonic_mean(data: list[float], weights: list[float] | None = None) -#### _static_ harmonic_mean(data: list[float], weights: list[float] | None = None) harmonic mean of the data. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: harmonic mean of the distribution +#### *static* inverse_mean(data: list[float], weights: list[float] | None = None) -#### _static_ inverse_mean(data: list[float], weights: list[float] | None = None) inverse mean. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: average value +#### *static* kurtosis(data: list[float], weights: list[float] | None = None) -#### _static_ kurtosis(data: list[float], weights: list[float] | None = None) Kurtosis of the distribution. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: Kurtosis of the distribution +#### *static* max(data: list[float], weights: list[float] | None = None) -#### _static_ max(data: list[float], weights: list[float] | None = None) Max of value Args:31 @@ -1526,56 +1397,50 @@ Args:31 Returns: maximum value +#### *static* mean(data: list[float], weights: list[float] | None = None) -#### _static_ mean(data: list[float], weights: list[float] | None = None) Weighted average. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: average value +#### *static* mean_absolute_deviation(data: list[float], weights: list[float] | None = None) -#### _static_ mean_absolute_deviation(data: list[float], weights: list[float] | None = None) mean absolute deviation. * **Parameters** - * **data** (*list*) – list of float data * **weights** (*list*) – optional weights - Returns: mean absolute deviation +#### *static* mean_absolute_error(data: list[float], weights: list[float] | None = None) -#### _static_ mean_absolute_error(data: list[float], weights: list[float] | None = None) mean absolute error. * **Parameters** - * **data** (*list*) – list of float data * **weights** (*list*) – optional weights - Returns: mean absolute error +#### *static* min(data: list[float], weights: list[float] | None = None) -#### _static_ min(data: list[float], weights: list[float] | None = None) min of value :param data: list of float data :type data: list @@ -1584,25 +1449,23 @@ min of value Returns: minimum value +#### *static* mode(data: list[float], weights: list[float] | None = None) -#### _static_ mode(data: list[float], weights: list[float] | None = None) Mode of data, if multiple entries have equal counts, compute the average of those. * **Parameters** - * **data** (*list*) – list of float data * **weights** (*list*) – optional weights - Returns: mode of values, i.e., max - min +#### *static* moment(data: list[float], weights: list[float] | None = None, order: int | None = None, max_order: int | None = None) -#### _static_ moment(data: list[float], weights: list[float] | None = None, order: int | None = None, max_order: int | None = None) Moment of probability mass function. order = 1 means weighted mean @@ -1614,11 +1477,10 @@ order > 2 corresponds to higher order moment to * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data points + * **weights** (*list*\* or \**None*) – weights for each data points * **order** (*int*) – moment order @@ -1626,30 +1488,27 @@ order > 2 corresponds to higher order moment to * **max_order** (*int*) – if set, it will overwrite order - Returns: float or list of floats +#### *static* power_mean(data: list[float], weights: list[float] | None = None, p: int = 1) -#### _static_ power_mean(data: list[float], weights: list[float] | None = None, p: int = 1) power mean [https://en.wikipedia.org/wiki/Generalized_mean](https://en.wikipedia.org/wiki/Generalized_mean). * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point + * **weights** (*list*\* or \**None*) – weights for each data point * **p** (*int*) – power - Returns: power mean of the distribution +#### *static* range(data: list[float], weights: list[float] | None = None) -#### _static_ range(data: list[float], weights: list[float] | None = None) Range of values :param data: list of float data :type data: list @@ -1658,8 +1517,8 @@ Range of values Returns: range of values, i.e., max - min +#### *static* shifted_geometric_mean(data: list[float], weights: list[float] | None = None, shift: float = 100) -#### _static_ shifted_geometric_mean(data: list[float], weights: list[float] | None = None, shift: float = 100) Since we cannot calculate the geometric means on negative or zero values, we can first shift all values to positive and then calculate the geometric mean afterwards, we shift the computed geometric mean back by a shift value. @@ -1667,109 +1526,95 @@ afterwards, we shift the computed geometric mean back by a shift value. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point + * **weights** (*list*\* or \**None*) – weights for each data point * **shift** (*float*) – shift value - Returns: geometric mean of the distribution +#### *static* skewness(data: list[float], weights: list[float] | None = None) -#### _static_ skewness(data: list[float], weights: list[float] | None = None) Skewness of the distribution. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: Skewness of the distribution +#### *static* std(data: list[float], weights: list[float] | None = None) -#### _static_ std(data: list[float], weights: list[float] | None = None) Standard deviation. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point - + * **weights** (*list*\* or \**None*) – weights for each data point Returns: Standard deviation - ### maml.utils._stats._add_allowed_stats(cls) + Decorate to add allowed_stats to the Stats class. * **Parameters** - - **cls** – Stats class - +**cls** – Stats class Returns: Stats class with allowed_stats attributes - -### maml.utils._stats._convert_a_or_b(v: str, a=, b=None) +### maml.utils._stats._convert_a_or_b(v: str, a=, b=None) ### maml.utils._stats._moment_symbol_conversion(moment_symbol: str) ### maml.utils._stats._root_moment(data, weights, order) + Auxiliary function to compute moment. * **Parameters** - * **data** (*list*) – list of float data - * **weights** (*list** or **None*) – weights for each data point + * **weights** (*list*\* or \**None*) – weights for each data point * **order** (*int*) – order of moment - Returns: moment of order - ### maml.utils._stats.get_full_stats_and_funcs(stats: list) + Get expanded stats function name str and the corresponding function callables. * **Parameters** - - **stats** (*list*) – a list of stats names, e.g, [‘mean’, ‘std’, ‘moment:1:None’] - +**stats** (*list*) – a list of stats names, e.g, [‘mean’, ‘std’, ‘moment:1:None’] Returns: list of stats names, list of stats callable - ### maml.utils._stats.stats_list_conversion(stats_list: list[str]) + Convert a list of stats str into a fully expanded list. This applies mainly to stats that can return a list of values, e.g., moment with max_order > 1. * **Parameters** - - **stats_list** (*list*) – list of stats str - +**stats_list** (*list*) – list of stats str Returns: list of expanded stats str @@ -1778,8 +1623,8 @@ Returns: list of expanded stats str Temporary directory and file creation utilities. This file is adapted from monty.tempfile. +### *class* maml.utils._tempfile.MultiScratchDir(rootpath: str | Path, n_dirs: int = 1, create_symbolic_link: bool = False, copy_from_current_on_enter: bool = False, copy_to_current_on_exit: bool = False) -### _class_ maml.utils._tempfile.MultiScratchDir(rootpath: str | Path, n_dirs: int = 1, create_symbolic_link: bool = False, copy_from_current_on_enter: bool = False, copy_to_current_on_exit: bool = False) Bases: `object` Creates a “with” context manager that automatically handles creation of @@ -1807,12 +1652,12 @@ The way it works is as follows: 6. Delete temp dir. +#### SCR_LINK(_ = ‘scratch_link_ ) -#### SCR_LINK(_ = 'scratch_link_ ) - -#### tempdirs(_: list[str_ ) +#### tempdirs(*: list[str* ) ### maml.utils._tempfile._copy_r_with_suffix(src: str, dst: str, suffix: Any | None = None) + Implements a recursive copy function similar to Unix’s “cp -r” command. Surprisingly, python does not have a real equivalent. shutil.copytree only works if the destination directory is not present. @@ -1820,13 +1665,11 @@ only works if the destination directory is not present. * **Parameters** - * **src** (*str*) – Source folder to copy. * **dst** (*str*) – Destination folder. - ## maml.utils._typing module Define several typing for convenient use. @@ -1838,31 +1681,31 @@ example, one can design a linearly increasing value profile, a sinusoidal profile or a constant profile, depending on the step, and previous values. +### *class* maml.utils._value_profile.ConstantValue(value: float, \*\*kwargs) -### _class_ maml.utils._value_profile.ConstantValue(value: float, \*\*kwargs) Bases: `ValueProfile` Return constant value. - #### get_value() + Return constant value. +### *class* maml.utils._value_profile.LinearProfile(value_start: float, value_end: float = 0.0, max_steps: int = 100, \*\*kwargs) -### _class_ maml.utils._value_profile.LinearProfile(value_start: float, value_end: float = 0.0, max_steps: int = 100, \*\*kwargs) Bases: `ValueProfile` LinearProfile by setting starting value and the rate of value change. The profile can be initialized either by [value_start, value_end, max_step] or [value_start, rate]. - #### get_value() + Get LinearProfile value Returns: float. +### *class* maml.utils._value_profile.ValueProfile(max_steps: int | None = None, \*\*kwargs) -### _class_ maml.utils._value_profile.ValueProfile(max_steps: int | None = None, \*\*kwargs) Bases: `object` Base class for ValueProfile. The base class has the following methods @@ -1870,15 +1713,15 @@ Base class for ValueProfile. The base class has the following methods > add one to step - #### get_value(self) -abstract method that return the value. +abstract method that return the value. #### get_value() + abstract method that returns the current value Returns: value float. - #### increment_step() + Increase step attribute by one. \ No newline at end of file diff --git a/setup.py b/setup.py index 1c3c5631..cf2ae0ab 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ setup( name="maml", packages=find_packages(), - version="2022.9.20", + version="2023.9.9", install_requires=["numpy", "scipy", "monty", "scikit-learn", "pandas", "pymatgen", "tqdm"], extras_requires={ "maml.apps.symbolic._selectors_cvxpy": ["cvxpy"], diff --git a/tasks.py b/tasks.py index 03c66363..9d002e0c 100644 --- a/tasks.py +++ b/tasks.py @@ -89,16 +89,6 @@ def publish(ctx): @task def set_ver(ctx, version): - lines = [] - with open("maml/__init__.py") as f: - for l in f: - if "__version__" in l: - lines.append('__version__ = "%s"' % version) - else: - lines.append(l.rstrip()) - with open("maml/__init__.py", "w") as f: - f.write("\n".join(lines) + "\n") - lines = [] with open("setup.py") as f: for l in f: @@ -113,7 +103,7 @@ def release(ctx, version=datetime.datetime.now().strftime("%Y.%-m.%-d"), notest= ctx.run("rm -r dist build maml.egg-info", warn=True) if not notest: ctx.run("pytest maml") - with open("CHANGES.rst") as f: + with open("CHANGES.md") as f: contents = f.read() toks = re.split(r"\-+", contents) desc = toks[1].strip()