module Chem::VASP::Chgcar

Defined in:

chem/formats/vasp/chgcar.cr

Class Method Summary

Class Method Detail

def self.read(io : IO) : Spatial::Grid #

Returns the charge density from io.


[View source]
def self.read(path : Path | String) : Spatial::Grid #

Returns the charge density from path.


[View source]
def self.read_info(io : IO) : Spatial::Grid::Info #

Returns the grid information from io without reading the data.


[View source]
def self.read_info(path : Path | String) : Spatial::Grid::Info #

Returns the grid information from path without reading the data.


[View source]
def self.read_structure(io : IO) : Structure #

Returns the structure from io without reading the data. Equivalent to Poscar.read.


[View source]
def self.read_structure(path : Path | String) : Structure #

Returns the structure from path without reading the data. Equivalent to Poscar.read.


[View source]
def self.write(io : IO, grid : Spatial::Grid, struc : Structure) : Nil #

Writes a grid to io.

The structure is written in the header. Raises ArgumentError if the structure's unit cell does not match the grid bounds.


[View source]
def self.write(path : Path | String, grid : Spatial::Grid, struc : Structure) : Nil #

Writes a grid to path.

The structure is written in the header. Raises ArgumentError if the structure's unit cell does not match the grid bounds.


[View source]