A universal framework for on-lattice atomistic dynamics simulation
OpenFerro is a Python package for on-lattice atomistic dynamics simulation. OpenFerro is based on JAX, a high-performance linear algebra package supporting auto-differentiation and GPU acceleration. OpenFerro is designed to minimize the effort required to build on-lattice Hamiltonian models, and to perform molecular dynamics (MD) and Landau-Lifshitz-Gilbert simulations.
- Multi-GPU Acceleration, highly efficient for large-scale simulations.
- Auto-differentiable, will have native support for enhanced sampling and Hamiltonian optimization.
- Modularized, easy to implement new interaction term as a plug-in python function. No need to modify source code. OpenFerro handles the rest, including graident calculation and GPU acceleration.
-
Flexible, supports simultaneous simulation of
$R^d$ and SO(3) local order parameters. Fields with other symmetries can also be implemented.
See documentation for installation instructions.
A crystalline system is a periodic arrangement of atoms or molecules in space. OpenFerro focuses on a coarse-grained representation of a crystalline system, defined through a Bravias lattice, local order parameter, global variables of the lattice (such as global strain) and a Hamiltonian describing the energy of the system. See documentation for more details than the outline below.
A Bravias lattice is specified by a set of basis vectors. For example, a 3D Bravais lattice is an infinite array of discrete points described by
Local order parameters describe the state of each lattice site. They can be vectors in
Global variables describe global properties of the lattice. In OpenFerro, the default global variable is the global strain tensor in the Voigt notation:
A lattice Hamiltonian
- Ferroelectric materials: perovskites like BaTiO3, PbTiO3, etc.
- Magnetic materials: bcc iron, etc.
- Heterostructures
- ...
OpenFerro simulates dynamical evolution of local order parameters with molecular dynamics (MD) and Landau-Lifshitz-Gilbert (LLG) equations of motion. See the documentation for equations of motion used in NVE, NVT, NPT, and structure-optimization simulations. The isothermal condition is maintained by the second fluctuation-dissipation theorem.
Supported integrators (see documentation for details):
- MD: Leapfrog (NVE), Mid-point Langevin (NVT, NPT, see J. Phys. Chem. A 2019, 123, 28, 6056-6079)
- LLG: Semi-implicit B (SIB) scheme (see J. Phys.: Condens. Matter 22 (2010) 176001)
Unlike DFT or all-atom MD, coarse-grained lattice dynamics has not yet been fully standardized. So OpenFerro is designed to be flexible to accommodate different models. A schematic of OpenFerro is shown below. See documentation for a pedagogical introduction to OpenFerro.
See documentation for a quick start, where we cover both the basic usage and more advanced features.
See examples.
The code for this superlattices simulation will be added to the examples soon.
Running OpenFerro on a GPU node can bring over 100X speedup compared to a CPU node. See example for details.
See FAQ for frequently asked questions.
There will be a paper in the near future explaining the technical details of OpenFerro. Before that, please cite this repository for any use of OpenFerro.
The initial development of OpenFerro is done by Pinchen Xie with support from LBNL.
At this point, only a few publicly available model configurations are provided in the model_configs directory. We welcome contributions from the community to add more model configurations.
OpenFerro is pythonic and modularized. It is designed to be easy to modify and extend. We welcome contributions from the community. Raise an issue or submit a pull request. Also feel free to contact [email protected] for any questions.