nanotools.utils module

Created on 2020-06-16

@author: Vincent Michaud-Rioux

nanotools.utils.get_chemical_symbols()[source]

Returns an ordered list of atomic species.

nanotools.utils.list_methods(obj)[source]

Returns a list of the methods of an object.

Reference

nanotools.utils.read_field(filename, fieldname, convert=True)[source]

Read a field from an HDF5 file.

Parameters:
  • filename (str) – Path the the HDF5 file. For example, “nano_scf_out.h5”.

  • fieldname (str) – Path of the field in the HDF5 file. For example, “potential/effective”.

Returns:

3D numpy array containing the field.

Return type:

fld (ndarray)

nanotools.utils.update_recursive(d, u)[source]

Update a dictionary recursively.

Source :param d: original dict :type d: dict :param u: new dict :type u: dict

Returns:

updated dict

Return type:

dict