|
1 |
| -To be completed ... |
| 1 | +<!-- #region --> |
| 2 | +### Introduction |
| 3 | +This is a package for machine learning (ML) of the potential energy surface (PES) |
| 4 | +from costly density functional theory (DFT) calculations using the Gaussian process |
| 5 | +regression method with emphasis on the sparse approximations. |
| 6 | +Ab-initio calculations such as AIMD, NEB, etc can be substantially accelerated by |
| 7 | +fast ML models built on-the-fly. |
| 8 | +Moreover, the ML models built with smaller size of physical systems can be applied |
| 9 | +for simulations of larger systems which are impossible with DFT. |
| 10 | +In principle, all the calculators supported by the atomic simulation environment |
| 11 | +([ASE](https://wiki.fysik.dtu.dk/ase/)) can be modeled. |
| 12 | + |
| 13 | + |
| 14 | +### Dependencies |
| 15 | +Main: |
| 16 | +* numpy |
| 17 | +* scipy |
| 18 | +* pytorch |
| 19 | +* atomic simulation environment (ASE) |
| 20 | + |
| 21 | +Recommended: |
| 22 | +* message passing interface (MPI enabled pytorch) for distributed computation. |
| 23 | + |
| 24 | +Optional: |
| 25 | +* pymatgen |
| 26 | +* spglib |
| 27 | +* mendeleev |
| 28 | +* matplotlib |
| 29 | +* nglview |
| 30 | + |
| 31 | + |
| 32 | +### Usage |
| 33 | +It wraps ASE calculators: |
| 34 | + |
| 35 | +```python |
| 36 | +from theforce.calculator.active import ActiveCalculator |
| 37 | + |
| 38 | +# atoms = see ASE docs |
| 39 | +# main_calc = see ASE calculators |
| 40 | +# kernel = see the proceeding |
| 41 | + |
| 42 | +calc = ActiveCalculator(main_calc, kernel) |
| 43 | +atoms.set_calculator(calc) |
| 44 | + |
| 45 | +# proceed with desired calculations |
| 46 | +``` |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +Kernels can be imported from `theforce.similarity`. |
| 51 | +`UniversalSoapKernel` is the easiest to implement: |
| 52 | +```python |
| 53 | +from theforce.similarity.universal import UniversalSoapKernel |
| 54 | + |
| 55 | +lmax, nmax, exponent, cutoff = 3, 3, 4, 6. |
| 56 | +kernel = UniversalSoapKernel(lmax, nmax, exponent, cutoff) |
| 57 | +``` |
| 58 | +but it maybe slow in some cases. |
| 59 | + |
| 60 | +--- |
| 61 | + |
| 62 | +Another option is `HeterogeneousSoapKernel` which segregates atomic species, |
| 63 | +is faster (~10 times), but it uses more memory. |
| 64 | +A utility function is present for creating the relevent list of kernels given |
| 65 | +the atomic species present in the system: |
| 66 | +```python |
| 67 | +from theforce.run.fly import default_kernel |
| 68 | + |
| 69 | +# numbers = [1, 8] for water |
| 70 | +# cutoff, etc can be given as kwargs |
| 71 | +kernel = default_kernel(numbers) |
| 72 | +``` |
| 73 | +<!-- #endregion --> |
0 commit comments