Source code for pibronic.data.file_name
"""
Bookkeeping provided by file_name module
Store all naming conventions in one place
Keeps file naming consistent over the many modules if changes need to be made
"""
# system imports
# third party imports
# local imports
# TODO - consider the idea of making the template strings parameterizable as well as including different generating functions - seems like a lot of overhead for little gain?
""" the execution output of a pimc run
D - refers to the id of the data set
R - refers to the id of the sampling set (rho)
P - refers the number of beads (int)
T - refers to the temperature in Kelvin (float-2 places)
- number of samples used to obtain results inside file (int)
"""
_execution_output = "D{:s}_R{:s}_P{:s}_T{:s}.o{:s}"
[docs]def execution_output(D="{D:d}", R="{R:d}", P="{P:d}", T="{T:.2f}", J="{J:d}"):
""" wrapper function to allow parameterized search for files
can pass in any regular expression
most commonly will just pass in "*" to search for all files of a given argument
"""
return _execution_output.format(D, R, P, T, J)
""" the results of a pimc run
P - refers the number of beads (int)
T - refers to the temperature in Kelvin (float-2 places)
J - job number, default is zero (int)
"""
_pimc = "P{:s}_T{:s}_J{:s}_data_points.npz"
[docs]def pimc(P="{P:d}", T="{T:.2f}", J="{J:d}"):
""" wrapper function to allow parameterized search for files
can pass in any regular expression
most commonly will just pass in "*" to search for all files of a given argument
"""
return _pimc.format(P, T, J)
""" output of postprocess + jackknife
P - refers the number of beads (int)
T - refers to the temperature in Kelvin (float-2 places)
X - number of samples used to obtain results inside file (int)
"""
_jackknife = "P{:s}_T{:s}_X{:s}_thermo"
[docs]def jackknife(P="{P:d}", T="{T:.2f}", X="{X:d}"):
""" wrapper function to allow parameterized search for files
can pass in any regular expression
most commonly will just pass in "*" to search for all files of a given argument
"""
return _jackknife.format(P, T, X)
""" output of SOS for coupled model
B - refers the number of basis functions to obtain results inside file (int)
"""
_sos = "sos_B{:s}.json"
[docs]def sos(B="{B:d}"):
""" wrapper function to allow parameterized search for files
can pass in any regular expression
most commonly will just pass in "*" to search for all files of a given argument
"""
return _sos.format(B)
""" output of Trotter for coupled model
B - refers the number of basis functions to obtain results inside file (int)
"""
_trotter = "trotter_P{:s}_B{:s}.json"
[docs]def trotter(P="{P:d}", B="{B:d}"):
""" wrapper function to allow parameterized search for files
can pass in any regular expression
most commonly will just pass in "*" to search for all files of a given argument
"""
return _trotter.format(P, B)
""" R values used for training ML algorithms
P - refers the number of beads (int)
T - refers to the temperature in Kelvin (float-2 places)
J - job number, default is zero (int)
"""
_training_data_input = "P{:s}_T{:s}_J{:s}_training_data_input.npz"
""" output of a g(R) run - used for training ML algorithms
P - refers the number of beads (int)
T - refers to the temperature in Kelvin (float-2 places)
J - job number, default is zero (int)
"""
_training_data_g_output = "P{:s}_T{:s}_J{:s}_training_data_g_output.npz"
[docs]def training_data_g_output(P="{P:d}", T="{T:.2f}", J="{J:d}"):
""" wrapper function to allow parameterized search for files
can pass in any regular expression
most commonly will just pass in "*" to search for all files of a given argument
"""
return _training_data_g_output.format(P, T, J)
""" output of a rho(R) run - used for training ML algorithms
P - refers the number of beads (int)
T - refers to the temperature in Kelvin (float-2 places)
J - job number, default is zero (int)
"""
_training_data_rho_output = "P{:s}_T{:s}_J{:s}_training_data_rho_output.npz"
[docs]def training_data_rho_output(P="{P:d}", T="{T:.2f}", J="{J:d}"):
""" wrapper function to allow parameterized search for files
can pass in any regular expression
most commonly will just pass in "*" to search for all files of a given argument
"""
return _training_data_rho_output.format(P, T, J)
# TODO - maybe only need one file name for both rho and SOS???
""" output of SOS for model diagonal in electronic states
B - refers the number of basis functions to obtain results inside file (int)
"""
""" contains the parameters which describe the systems Hamiltonian
this is the full model
"""
coupled_model = "coupled_model.json"
""" contains the original parameters (diagonal) which describe the system's Hamiltonian
before we did a unitary transformation
"""
original_model = "original_coupled_model.json"
""" contains the parameters which describe the harmonic operator
this is all the Kinetic terms + any diagonal terms that can be described by a Harmonic oscillator
this can be used as a simplistic sampling distribution rho_0
"""
harmonic_model = "harmonic_model.json"
""" contains the parameters which describe a sampling model
this can be anything which is diagonal in the electronic states
"""
sampling_model = "sampling_model.json"
""" contains the parameters which describe the sampling model
which has been generated using our iterative decomposition method
whose weights have been corrected using single-point energy calculations
"""
iterative_model = "iterative_model.json"
""" contains the transformation matrix
which was used in our iterative decomposition method to generate the iterative model
"""
iterative_matrix = "iterative_matrix.txt"
""" contains any parameters which can be obtained through analytical methods
this commonly stores properties of the sampling model at different temperatures
"""
analytic_results = "analytic_results.json"
""" contains any parameters which can be obtained through analytical methods
which describe the system's Hamiltonian before we did a unitary transformation
"""
original_analytic_results = "original_analytic_results.json"
""" contains the orthonormal matrix
which was used to preform the unitary transformation on the original_coupled_model.json
to get the coupled_model.json
"""
orthogonal_matrix = "orthogonal_matrix.npy"
# TODO - maybe include the directories and so forth inside file_name? or maybe in file_structure?
# list_sub_dirs = [
# "parameters/",
# "results/",
# "execution_output/",
# "plots/",
# ]