nanotools.base module

Created on 2020-05-11

@author: Vincent Michaud-Rioux

class nanotools.base.Base[source]

Bases: object

The Base class is used to define universal methods and parameters common to nanotools classes.

asdict()[source]

Returns the object as a dictionary.

Args:

Returns:

copy()[source]

Returns a deep copy of the object.

classmethod read(filename, units='si')[source]

Initialize an object from a JSON file.

set_units(units)[source]

Converts all units to the prescribed unit system (recursive).

Parameters:

units (str) – Unit system (‘atomic’ or ‘si’)

nanotools.base.set_units_core(self, units)[source]

Convert all units to the prescribed unit system (recursive).

Parameters:

units (str) – Unit system (‘atomic’ or ‘si’)

Returns: