pyiron.atomistics.volumetric.generic module¶
-
class
pyiron.atomistics.volumetric.generic.
VolumetricData
[source]¶ Bases:
object
A new class to handle 3-dimensional volumetric data elegantly (charge densities, electrostatic potentials etc) based on the numpy.ndarray instance. This module is adapted from the pymatgen vasp VolumtricData class
http://pymatgen.org/_modules/pymatgen/io/vasp/outputs.html#VolumetricData
-
total_data
¶ A 3D array containing the data
- Type
numpy.ndarray
-
property
atoms
¶ The structure related to the volumeric data
- Returns
The structure associated with the data
- Return type
pyiron.atomistics.structure.Atoms
-
cylindrical_average_potential
(structure, spherical_center, axis_of_cyl, rad=2, fwhm=0.529177)[source]¶ Calculates the cylindrical average about a given point in space
- Parameters
structure (pyiron.atomistics.structure.Atoms) – Input structure
spherical_center (list/numpy.ndarray) – position of spherical_center in direct coordinate
rad (float) – radius of sphere to be considered in Angstrom (recommended value: 2)
fwhm (float) – Full width half maximum of gaussian function in Angstrom (recommended value: 0.529177)
axis_of_cyl (int) – Axis of cylinder (0 (x) or 1 (y) or 2 (z))
- Returns
Cylindrical average at the target center
- Return type
float
-
static
dist_between_two_grid_points
(target_grid_point, n_grid_at_center, lattice, grid_shape)[source]¶ Calculates the distance between a target grid point and another grid point
- Parameters
target_grid_point (numpy.ndarray/list) – Target grid point
n_grid_at_center (numpy.ndarray/list) – coordinate of center of sphere
lattice (numpy.ndarray/list) – lattice vector
grid_shape (tuple/list/numpy.ndarray) – size of grid
- Returns
Distance between target grid and center of sphere in angstrom
- Return type
float
-
static
dist_between_two_grid_points_cyl
(target_grid_point, n_grid_at_center, lattice, grid_shape, direction_of_cyl)[source]¶ Distance between a target grid point and the center of a cylinder
- Parameters
target_grid_point (numpy.ndarray/list) – Target grid point
n_grid_at_center (numpy.ndarray/list) – coordinate of center of sphere
lattice (numpy.ndarray/list) – lattice vector
grid_shape (tuple/list/numpy.ndarray) – size of grid
direction_of_cyl (int) – Axis of cylinder (0 (x) or 1 (y) or 2 (z))
- Returns
Distance between target grid and in-plane center of cylinder
- Return type
float
-
from_hdf
(hdf, group_name='volumetric_data')[source]¶ Recreating the VolumetricData instance by reading data from the HDF5 files
- Parameters
hdf (pyiron_base.generic.hdfio.ProjectHDFio) – The HDF file/path to write the data to
group_name (str) – The name of the group under which the data must be stored as
- Returns
The VolumetricData instance
- Return type
-
static
gauss_f
(d, fwhm=0.529177)[source]¶ Generates a Gaussian distribution for a given distance and full width half maximum value
- Parameters
d (float) – distance between target point and reference point
fwhm (float) – Full width half maximum in angstrom
- Returns
Gaussian reduction constant
- Return type
float
-
get_average_along_axis
(ind=2)[source]¶ Get the lateral average along a certain axis direction. This function is adapted from the pymatgen vasp VolumetricData class
http://pymatgen.org/_modules/pymatgen/io/vasp/outputs.html#VolumetricData.get_average_along_axis
- Parameters
ind (int) – Index of axis (0, 1 and 2 for the x, y, and z axis respectively)
- Returns
A 1D vector with the laterally averaged values of the volumetric data
- Return type
numpy.ndarray
-
read_cube_file
(filename='cube_file.cube')[source]¶ Generate data from a CUBE file
- Parameters
filename (str) – Filename to parse
-
spherical_average_potential
(structure, spherical_center, rad=2, fwhm=0.529177)[source]¶ Calculates the spherical average about a given point in space
- Parameters
structure (pyiron.atomistics.structure.Atoms) – Input structure
spherical_center (list/numpy.ndarray) – position of spherical_center in direct coordinate
rad (float) – radius of sphere to be considered in Angstrom (recommended value: 2)
fwhm (float) – Full width half maximum of gaussian function in Angstrom (recommended value: 0.529177)
- Returns
Spherical average at the target center
- Return type
float
-
to_hdf
(hdf, group_name='volumetric_data')[source]¶ Writes the data as a group to a HDF5 file
- Parameters
hdf (pyiron_base.generic.hdfio.ProjectHDFio) – The HDF file/path to write the data to
group_name (str) – The name of the group under which the data must be stored as
-
property
total_data
¶ The Nx x Ny x Nz sized array for the total data
- Type
numpy.ndarray
-