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

from_hdf(hdf5, group_name='volumetric_data')[source]

Recreating the VolumetricData instance by reading data from the HDF5 files

Parameters
Returns

The VolumetricData instance

Return type

pyiron.atomistics.volumetric.generic.VolumetricData

get_average_along_axis(ind=2)[source]

Get the lateral average along a certain axis direction. This function is adapted from the pymatgen vasp VolumtricData 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

to_hdf(hdf5, group_name='volumetric_data')[source]

Writes the data as a group to a HDF5 file

Parameters
property total_data

The Nx x Ny x Nz sized array for the total data

Type

numpy.ndarray

write_cube_file(filename='cube_file.cube', cell_scaling=1.0)[source]

Write the volumetric data into the CUBE file format

Parameters
  • filename (str) – Filename

  • cell_scaling (float) – Scale the cell by this fraction

write_vasp_volumetric(filename='CHGCAR', normalize=False)[source]

Writes volumetric data into a VASP CHGCAR format

Parameters
  • filename (str) – Filename of the new file

  • normalize (bool) – True if the data is to be normalized by the volume