struct Chem::Spatial::Grid::Info

Defined in:

chem/register_format.cr
chem/spatial/grid.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_chgcar(input : IO | Path | String) : self #

Returns the header encoded in input using the Chem::VASP::Chgcar file format. Arguments are forwarded to Chem::VASP::Chgcar::Reader.open.


[View source]
def self.from_cube(input : IO | Path | String) : self #

Returns the header encoded in input using the Chem::Cube file format. Arguments are forwarded to Chem::Cube::Reader.open.


[View source]
def self.from_dx(input : IO | Path | String) : self #

Returns the header encoded in input using the Chem::DX file format. Arguments are forwarded to Chem::DX::Reader.open.


[View source]
def self.from_locpot(input : IO | Path | String) : self #

Returns the header encoded in input using the Chem::VASP::Locpot file format. Arguments are forwarded to Chem::VASP::Locpot::Reader.open.


[View source]
def self.new(bounds : Parallelepiped, dim : Dimensions) #

[View source]
def self.read(input : IO | Path | String, format : Chem::Format | String) : self #

Returns the header encoded in the specified file using format. Raises ArgumentError if format has required arguments or cannot read Chem::Spatial::Grid::Info.

The supported file formats are Chem::Cube, Chem::DX, Chem::VASP::Chgcar, Chem::VASP::Locpot. Use the .from_* methods to customize how the object is decoded in the corresponding file format if possible.


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

Returns the header encoded in the specified file. The file format is chosen based on the filename (see Chem::Format#from_filename). Raises ArgumentError if the file format cannot be determined.

The supported file formats are the following:

Use the .from_* methods to customize how the object is decoded in the corresponding file format if possible.


[View source]

Instance Method Detail

def bounds : Parallelepiped #

def clone #

[View source]
def copy_with(bounds _bounds = @bounds, dim _dim = @dim) #

[View source]
def dim : Dimensions #