Other functions¶
Selfconsistent phonons¶

hiphive.self_consistent_phonons.
self_consistent_harmonic_model
(atoms_ideal, calc, cs, T, alpha, n_iterations, n_structures, parameters_start=None)[source]¶ Constructs a set of selfconsistent secondorder force constants that provides the closest match to the potential energy surface at a the specified temperature.
Parameters:  atoms_ideal (ase.Atoms) – ideal structure
 calc (ASE calculator object) – calculator to be used as reference potential
 cs (ClusterSpace) – clusterspace onto which to project the reference potential
 T (float) – temperature in K
 alpha (float) – stepsize in optimization algorithm
 n_iterations (int) – number of iterations in poor mans
 n_structures (int) – number of structures to use when fitting
 parameters_start (numpy.ndarray) – parameters from which to start the optimization
Returns: sequence of parameter vectors generated while iterating to selfconsistency
Return type: list(numpy.ndarray)
Utilities¶
This module contains various support/utility functions.

class
hiphive.utilities.
Shell
(types, distance, count=0)[source]¶ Neighbor Shell class
Parameters:  types (list or tuple) – atomic types for neighbor shell
 distance (float) – interatomic distance for neighbor shell
 count (int) – number of pairs in the neighbor shell

hiphive.utilities.
get_displacements
(atoms, atoms_ideal)[source]¶ Computes the smallest possible displacements from positions and ideal positions given a cell metric.
Notes
 uses
ase.geometry.find_mic()
 assumes pbc=[True, True, True].
Parameters:  positions (numpy.ndarray) – positions
 ideal_positions (numpy.ndarray) – ideal positions from which displacements are computed
 cell (numpy.ndarray) – cell metric with shape (3,3)
Returns: wrapped displacements
Return type:  uses

hiphive.utilities.
get_neighbor_shells
(atoms, cutoff, dist_tol=1e05)[source]¶ Gets list of neighbor shells.
Distances are grouped into shells via the following algorithm:
 Find smallest atomic distance d_min
 Find all pair distances in the range d_min + 1 * dist_tol
 Construct a shell from these and pop them from distance list
 Go to 1.
Parameters:  atoms (ase.Atoms) – Atoms used for finding shells
 cutoff (float) – exclude neighbor shells which have a distance larger than cutoff
 dist_tol (float) – distance tolerance
Returns: neighbor shells
Return type: list(Shell)

hiphive.utilities.
prepare_structures
(structures, atoms_ideal, calc)[source]¶ Prepares a set of structures in the format suitable for a
StructureContainer
.Note: Changes the structures in place.