module Chem::GOpenMol

Overview

gOpenMol binary plot (*.plt) grids.

Header is five 32-bit integers (rank, surface type, nz, ny, nx) followed by six 32-bit floats (zmin, zmax, ymin, ymax, xmin, xmax) in bohrs. Rank must be 3. Data are 32-bit floats with X fastest, then Y, then Z. Endianness is detected from the rank field. FORTRAN unformatted files are not supported.

Format description: http://web.archive.org/web/20061011125817/http://www.csc.fi/gopenmol/developers/plt_format.phtml

Defined in:

chem/formats/gopenmol.cr

Class Method Summary

Class Method Detail

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

Returns the grid from io.


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

Returns the grid 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.write(io : IO, grid : Spatial::Grid) : Nil #

Writes a grid to io as a little-endian gOpenMol binary plot.

Coordinates are written in bohrs. Only orthogonal grids are supported.


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

Writes a grid to path as a little-endian gOpenMol binary plot.

Coordinates are written in bohrs. Only orthogonal grids are supported.


[View source]