This module is useful to process a logfile of BigDFT run, in yaml format. It also provides some tools to extract typical informations about the run, like the energy, the eigenvalues and so on.
BigDFT.Logfiles.
Logfile
(*args, **kwargs)[source]¶Import a Logfile from a filename in yaml format, a list of filenames, an archive (compressed tar file), a dictionary or a list of dictionaries.
Parameters: |
|
---|---|
Example: | >>> l = Logfile('one.yaml','two.yaml')
>>> l = Logfile(archive='calc.tgz')
>>> l = Logfile(archive='calc.tgz',member='one.yaml')
>>> l = Logfile(dictionary=dict1)
>>> l = Logfile(dictionary=[dict1, dict2])
|
Todo
Document the automatically generated attributes, perhaps via an inner function in futile python module
geopt_plot
()[source]¶For a set of logfiles construct the convergence plot if available. Plot the Maximum value of the forces against the difference between the minimum value of the energy and the energy of the iteration. Also an errorbar is given indicating the noise on the forces for a given point. Show the plot as per plt.show() with matplotlib.pyplots as plt
Example: | >>> tt=Logfile('log-with-geometry-optimization.yaml')
>>> tt.geopt_plot()
|
---|
get_brillouin_zone
()[source]¶Return an instance of the BrillouinZone class, useful for band structure.
:returns: Brillouin Zone of the logfile
:rtype: BigDFT.BZ.BrillouinZone
get_dos
(label=None, npts=2500)[source]¶Get the density of states from the logfile.
Parameters: |
|
---|---|
Returns: | Instance of the DoS class |
Return type: |
label
= None¶Label of the Logfile instance
reference_log
= None¶Position in the logfile items of the run associated to lower energy
srcdir
= None¶Absolute path of the directory of logfile
BigDFT.Logfiles.
find_iterations
(log)[source]¶Identify the different block of the iterations of the wavefunctions optimization.
Todo
Should be generalized and checked for mixing calculation and O(N) logfiles
Parameters: | log (dictionary) – logfile load |
---|---|
Returns: | wavefunction residue per iterations, per each subspace diagonalization |
Return type: | numpy array of rank two |
BigDFT.Logfiles.
floatify
(scalar)[source]¶Useful to make float from strings compatible from fortran
Parameters: | |
---|---|
Returns: | float. The value associated to scalar as a floating point number |
Example
>>> floatify('1.d-4') #this would be the same with "1.e-4" or with 0.0001
1.e-4
BigDFT.Logfiles.
get_logs
(files)[source]¶Return a list of loaded logfiles from files, which is a list of paths leading to logfiles.
Parameters: | files – List of filenames indicating the logfiles |
---|---|
Returns: | List of Logfile instances associated to filename |
BigDFT.Logfiles.
plot_wfn_convergence
(wfn_it, gnrm_cv)[source]¶Plot the convergence of the wavefunction coming from the find_iterations function. Cumulates the plot in matplotlib.pyplot module
Parameters: |
|
---|