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.
- GPU supports, highly efficient for large-scale simulations.
- auto-differentiable, will have native support for enhanced sampling and Hamiltonian optimization.
- highly modularized, easy to implement new interaction terms without looking into the codebase.
-
highly 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. In OpenFerro, a crystalline system is defined by 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)
A schematic of OpenFerro is shown below. See documentation for introduction to core components of OpenFerro.
See documentation for a quick start, where we cover both the basic usage and more advanced features.
See examples in examples.
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.
We welcome contributions from the community. Raise an issue or submit a pull request. Also feel free to contact pinchenxie@lbl.gov for any questions.


