pyextal.potentialMap.export =========================== .. py:module:: pyextal.potentialMap.export .. autoapi-nested-parse:: Volumetric files for VESTA and similar viewers: VASP CHGCAR and Gaussian cube. Attributes ---------- .. autoapisummary:: pyextal.potentialMap.export.BOHR Functions --------- .. autoapisummary:: pyextal.potentialMap.export.write_chgcar pyextal.potentialMap.export.read_chgcar pyextal.potentialMap.export.write_cube pyextal.potentialMap.export.read_cube Module Contents --------------- .. py:data:: BOHR :value: 0.529177210903 .. py:function:: write_chgcar(path, volume, lattice, atoms=None, origin_shift=None) Writes a 3D map as a VASP CHGCAR (values times the cell volume). :param path: Output file. :type path: path-like :param volume: (Nx, Ny, Nz) map on the fractional grid. :type volume: np.ndarray :param lattice: (3, 3) Cartesian lattice vectors (rows), Angstrom. :type lattice: np.ndarray :param atoms: ``[(symbol, [x, y, z]), ...]`` fractional, e.g. `Structure.atoms`. Without atoms a dummy H at the origin is written so viewers still draw the cell. :type atoms: list, optional :param origin_shift: Fractional shift applied to the atoms and, rounded to whole grid steps, to the map. :type origin_shift: array-like, optional .. py:function:: read_chgcar(path) Reads a CHGCAR written by `write_chgcar` (or VASP). :returns: ``(volume, lattice, atoms)``, the map divided back by the cell volume. :rtype: tuple .. py:function:: write_cube(path, volume, structure=None, comment='Generated by pyextal') Writes a 3D map as a Gaussian cube file (lengths in Bohr). :param path: Output file. :type path: path-like :param volume: (Nx, Ny, Nz) map on the fractional grid. :type volume: np.ndarray :param structure: Cell and atoms; defaults to `structure_from_bloch()`. :type structure: Structure, optional :param comment: Second header line. :type comment: str .. py:function:: read_cube(path) Reads a cube file written by `write_cube`. :returns: ``(volume, lattice, numbers, cart)``, lattice and atom positions in Angstrom. :rtype: tuple