class_property.py
Contains a abstract class to define strategies to fill a grid with different
properties.
StrategyProperty
Bases: ABC
An abstract base class for defining strategies to fill a grid with
properties.
Attributes
self.__name : str
Name of the computed property.
self._atom_constant : AtomConstant
The atom constant object to access different constant.
Source code in src/smiffer/grid/property_strategy/class_property.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
__init__(name, atom_constant)
Define the strategy for property computation.
Parameters
name : str
Name of the property.
AtomConstant
An object containing constant linked to atoms.
Source code in src/smiffer/grid/property_strategy/class_property.py
29 30 31 32 33 34 35 36 37 38 39 40 41 | |
__str__()
Redefine print() comportement.
Returns
str
The new message to print.
Source code in src/smiffer/grid/property_strategy/class_property.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
name()
self.__name getter.
Returns
str
The property name.
Source code in src/smiffer/grid/property_strategy/class_property.py
59 60 61 62 63 64 65 66 67 | |
populate_grid(grid, grid_object)
abstractmethod
Define an abstract method in order to fill a grid with given
properties.
Parameters
grid : np.ndarray
The grid to fill.
Grid
The grid object to access all attributes.
Returns
None
To skip an iteration.
Source code in src/smiffer/grid/property_strategy/class_property.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |