chgSileVASP¶
-
class
sisl.io.vasp.
chgSileVASP
(filename, mode='r', comment=None, *args, **kwargs)[source]¶ Charge density plus geometry
This file-object handles the charge-density from VASP
Attributes
File of the current Sile
File of the current Sile
Methods
__init__
(self, filename[, mode, comment])Initialize self.
dir_file
(self[, filename])File of the current Sile
exist
(self)Query whether the file exists
read
(self, \*args, \*\*kwargs)Generic read method which should be overloaded in child-classes
read_geometry
(self)Returns Geometry object from the CONTCAR/POSCAR file
read_grid
(self[, index, dtype])Reads the charge density from the file and returns with a grid (plus geometry)
read_supercell
(self)Returns SuperCell object from the CONTCAR/POSCAR file
write
(self, \*args, \*\*kwargs)Generic write method which should be overloaded in child-classes
write_geometry
(self, geom)Writes the geometry to the contained file
-
property
base_file
¶ File of the current Sile
-
dir_file
(self, filename=None)¶ File of the current Sile
-
exist
(self)¶ Query whether the file exists
-
property
file
¶ File of the current Sile
-
read
(self, *args, **kwargs)¶ Generic read method which should be overloaded in child-classes
- Parameters
- kwargs :
keyword arguments will try and search for the attribute
read_<>
and call it with the remaining**kwargs
as arguments.
-
read_geometry
(self)¶ Returns Geometry object from the CONTCAR/POSCAR file
-
read_grid
(self, index=0, dtype=<class 'numpy.float64'>)[source]¶ Reads the charge density from the file and returns with a grid (plus geometry)
- Parameters
- indexint or array_like, optional
the index of the grid to read. For a spin-polarized VASP calculation 0 and 1 are allowed, UP/DOWN. For non-collinear 0, 1, 2 or 3 is allowed which equals, TOTAL, x, y, z charge density with the Cartesian directions equal to the charge magnetization. For array-like they refer to the fractional contributions for each corresponding index.
- dtypenumpy.dtype, optional
grid stored dtype
- Returns
- Gridcharge density grid with associated geometry
-
read_supercell
(self)¶ Returns SuperCell object from the CONTCAR/POSCAR file
-
write
(self, *args, **kwargs)¶ Generic write method which should be overloaded in child-classes
- Parameters
- **kwargs :
keyword arguments will try and search for the attribute write_ and call it with the remaining
**kwargs
as arguments.
-
write_geometry
(self, geom)¶ Writes the geometry to the contained file
-
property