Input/output and logging

The functions and modules described below provide functionality for controlling the verbosity of the output as well as for reading and writing force constant matrices in different formats.

Input and output

hiphive.input_output.gpumd.write_fcp_txt(fname, path, n_types, max_order, heat_current_order=2)[source]

Write driver potential file for GPUMD.

  • fname (str) – file name

  • path (str) – path to directory with force constant file

  • n_types (int) – number of atom types

  • max_order (int) – maximum order of the force constant potential

  • heat_current_order (int) – heat current order used in thermal conductivity

Format is a simple file containing the following

fcp number_of_atom_types highest_force_order heat_current_order path_to_force_constant_files

which in practice for a binary system with a sixth order model, consider third-order heat-currents, would mean

fcp 2 6 3 /path/to/your/folder

hiphive.input_output.gpumd.write_fcs_gpumd(fname_fc, fname_clusters, fcs, order, tol=1e-10)[source]

Writes force constants of given order in GPUMD format.

  • fname_fc (str) – name of file which contains the lookup force constants

  • fname_clusters (str) – name of file which contains the clusters and the force constant lookup index

  • fcs – force constants

  • order (int) – force constants for this order will be written to file

  • tol (float) – if the norm of a force constant term is less than this value it will be excluded from the output; if two force-constants differ by this value or less, they are considered equal.

hiphive.input_output.gpumd.write_r0(fname, atoms)[source]

Write GPUMD r0 file, with reference atomic positions.

  • fname (str) – name of file to which to write the atomic positions

  • atoms (ase.Atoms) – input structure


hiphive.input_output.logging_tools.set_config(filename=None, level=None, continuous=None)[source]

Alters the way logging is handled.

  • filename (str) – name of file the log should be sent to

  • level (int) – verbosity level; see Python logging library for details

  • continuous (bool) – if True the progress will be continously updated