The following figure illustrates the hiPhive workflow. Here, classes are shown in blue, input parameters and data in orange, and functionalities invoked via external libraries are indicated in green.

# dot -Tsvg -o workflow.svg digraph g { graph [ fontname = "helvetica", fontsize = 12.0, rankdir = "TB", bgcolor = "transparent" ]; edge [ fontname = "helvetica", fontsize = 12.0, penwidth = 1.5 ] node [ fontname = "helvetica", fontsize = 12.0, fontcolor = black, shape = ellipse, color = "#a0c9e5", style = filled]; Prototype [ color="#ffca9c", label="Prototype structure\n(primitive cell)", shape=box]; Cutoffs [ color="#ffca9c", label="Cutoff radii for\neach order", shape=box]; Structures [ color="#ffca9c", label="Input structures\nwith reference forces", shape=box, href="../advanced_topics/structure_generation.html", target="_top"]; ClusterSpace [ label="Cluster space", href="../moduleref/cluster_space.html#hiphive.ClusterSpace", target="_top" ]; StructureContainer [ label="Structure container", href="../moduleref/structures.html#hiphive.StructureContainer", target="_top" ]; Optimizer [ label="Optimizer", href="", target="_blank"]; ForceConstantPotential [ label="Force constant potential", href="../moduleref/force_constants.html#hiphive.ForceConstantPotential", target="_top" ]; ForceConstants [ label="Force constants", href="../moduleref/force_constants.html#hiphive.ForceConstants", target="_top" ]; ForceConstantCalculator [ label="Force constant calculator", href="../moduleref/force_constants.html#hiphive.calculators.ForceConstantCalculator", target="_top" ]; Supercell [ color="#ffca9c", label="Supercell structure", shape=box]; MD [ shape=rectangle, color="#a2daa2", label="Molecular dynamics (via ASE)", fontcolor=black, href="../tutorial/run_fourth_order_MD.html", target="_top"]; phonons [ shape=rectangle, color="#a2daa2", label="Derived properties\n(via phono3py, \nphonopy, shengBTE)", fontcolor=black, href="../tutorial/compute_harmonic_thermal_properties.html", target="_top"]; Prototype -> ClusterSpace; Cutoffs -> ClusterSpace; ClusterSpace -> StructureContainer; Structures -> StructureContainer; StructureContainer -> Optimizer [label=" Fit matrix and\n vector of target values"]; ClusterSpace -> ForceConstantPotential; Optimizer -> ForceConstantPotential [label=" Parameters"]; ForceConstantPotential -> ForceConstants; Supercell -> ForceConstants; ForceConstants -> phonons; ForceConstants -> ForceConstantCalculator; ForceConstantCalculator -> MD; }

The typical workflow involves the following steps:

  1. generate a set of input structures and compute the forces in these structures using a reference method, most commonly density functional theory

  2. initialize a cluster space (via ClusterSpace) by providing a prototype structure (typically a primitive cell) as well as cutoff radii for clusters of different orders

  3. initialize a structure container (via StructureContainer) using the cluster space from the second step and the set of input structures with reference forces from the first step for training and validation

  4. fit the parameters using an optimizer (e.g., Optimizer, EnsembleOptimizer, or CrossValidationEstimator from the trainstation package)

  5. construct a force constant potential (via ForceConstantPotential) by combining the cluster space with a set of parameters obtained by optimization

The final FCP can be used in a number of ways. For example one can

This basic workflow is illustrated in detail in the tutorial section. Further applications are discussed in the additional topics section.

Key concepts

Cluster spaces

A cluster space (represented by the ClusterSpace class) is defined by providing a prototype structure along with a set of cutoffs for each (cluster) order to be included, as demonstrated in the tutorial section that illustrates the construction of a force constant potential. It contains the set of clusters (pairs, triplets, quadruplets etc) and orbits into which a prototype structure can be decomposed. (An orbit is a set of symmetry equivalent clusters, see Figure below). A cluster space furthermore contains information pertaining to the symmetry operations that connect the clusters belonging to the same orbit and that ultimately define the relation between the parameters of a force constant potential and the force constants.

Structure containers

A structure container (represented by the StructureContainer class) is a collection of structures along with their decomposition into a specific cluster space. Structure containers allow one to easily compile structures for training and validation, as demonstrated in the tutorial on force constant potential construction. They can also be written to file for later use.


Optimizers allow one to train the parameters associated with each orbit in the cluster space. They are available in the form of optimizer classes such as Optimizer, EnsembleOptimizer, or CrossValidationEstimator.

Force constant potentials

A force constant potential (FCP; represented by the ForceConstantPotential class) is obtained by combining a cluster space with a set of parameters as illustrated in the tutorial on force constant potential construction. FCPs are the main output of the hiPhive model construction cycle. While they are specific for a given prototype structure and cluster space they are not tied to a specific supercell structure. FCPs can be written to file for later use.

Force constant matrices

Force constant matrices (represented by the ForceConstants class) are obtained by applying an FCP to a specific supercell structure. This allows one to conduct further analyses e.g., via phonopy, phono3py or shengBTE. This functionality is demonstrated in the tutorials on thermal properties in the harmonic approximations and phonon lifetimes.

Force constant calculators

An ASE calculator object (provided by the ForceConstantCalculator class) can be generated by applying an FCP to a specific supercell and can be subsequently employed to carry out e.g., molecular dynamics (MD) simulations as shown in the MD tutorial section.