class Chem::Cube::Reader

Included Modules

Defined in:

chem/formats/cube.cr

Constant Summary

BOHR_TO_ANGS = 0.529177210859

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Chem::FormatReader::Attached(Chem::Structure)

read_attached : T read_attached

Instance methods inherited from module Chem::FormatReader::Headed(Chem::Spatial::Grid::Info)

read_header : T read_header

Instance methods inherited from module Chem::FormatReader(Chem::Spatial::Grid)

read? : Bool read?, read_entry : T read_entry

Instance methods inherited from module IO::Wrapper

close close, closed? : Bool closed?, sync_close : Bool sync_close, sync_close=(sync_close : Bool) sync_close=

Constructor Detail

def self.new(io : IO, sync_close : Bool = false) #

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

Creates a new object from the given path. Positional and named arguments are forwarded to the designated constructor.

An IO object will be created and open from the given path, which will be closed when closing this object (sync_close = true). The file open mode is specified by the FILE_MODE constant.


Class Method Detail

def self.open(io : IO, sync_close : Bool = false, & : self -> ) #

Creates a new object from the given io, yields it to the given block, and closes it at the end. Positional and named arguments are forwarded to the constructor.


def self.open(path : Path | String, & : self -> ) #

Creates a new object from the given path yields it to the given block, and closes it at the end. Positional and named arguments are forwarded to the constructor.

An IO object will be created and open from the given path, which will be closed when closing this object (sync_close = true). The file open mode is specified by the FILE_MODE constant.


Instance Method Detail

def read_attached : Structure #
Description copied from module Chem::FormatReader::Attached(Chem::Structure)

Reads the attached object from the IO. Raises IO::Error if the reader is closed or ParseException if the object cannot be decoded.


[View source]