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.
- Parameters:
fname (
str
) – file namepath (
str
) – path to directory with force constant filen_types (
int
) – number of atom typesmax_order (
int
) – maximum order of the force constant potentialheat_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.
- Parameters:
fname_fc (
str
) – name of file which contains the lookup force constantsfname_clusters (
str
) – name of file which contains the clusters and the force constant lookup indexfcs – force constants
order (
int
) – force constants for this order will be written to filetol (
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.
Logging¶
- hiphive.input_output.logging_tools.set_config(filename=None, level=None, continuous=None)[source]
Alters the way logging is handled.
- Parameters:
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