hiPhive — High-order force constants for the masses¶
hiPhive is a tool for efficiently extracting high-order force constants from atomistic simulations, most commonly density functional theory calculations. It has been implemented in the form of a Python library, which allows it to be readily integrated with many first-principles codes and analysis tools accessible in Python.
The following snippet illustrates the construction of a force constant
potential object (
fcp), which can be subsequently used to run molecular
dynamics (MD) simulations or analyzed using e.g., phonopy, phono3py, or shengBTE:
from hiphive import ClusterSpace, StructureContainer, ForceConstantPotential from hiphive.fitting import Optimizer cs = ClusterSpace(ideal_cell, cutoffs=[6.0, 4.5]) sc = StructureContainer(cs) for atoms in list_of_training_structures: sc.add_structure(atoms) opt = Optimizer(sc.get_fit_data()) opt.train() fcp = ForceConstantPotential(cs, opt.parameters)
The list of training structures employed in the code above can be prepared for example as follows:
from ase.build import bulk from ase.calculators.emt import EMT ideal_cell = bulk('Al', cubic=True) ideal_supercell = ideal_cell.repeat(3) list_of_training_structures =  for k in range(5): atoms = ideal_supercell.copy() atoms.rattle(0.02, seed=k) atoms.set_calculator(EMT()) atoms.new_array('displacements', atoms.positions - ideal_supercell.positions) atoms.new_array('forces', atoms.get_forces()) atoms.positions = ideal_supercell.get_positions() list_of_training_structures.append(atoms)
hiPhive and its development are hosted on gitlab. Bugs and feature requests are ideally submitted via the gitlab issue tracker. The development team can also be reached by email via firstname.lastname@example.org.
- Basic tutorial
- Advanced topics
- User interface