module Chem::XYZ

Defined in:

chem/formats/xyz.cr

Class Method Summary

Class Method Detail

def self.each(io : IO, guess_bonds : Bool = false, guess_names : Bool = false, & : Structure -> ) : Nil #

Yields each structure in io.


[View source]
def self.each(path : Path | String, guess_bonds : Bool = false, guess_names : Bool = false, & : Structure -> ) : Nil #

Yields each structure in path.


[View source]
def self.read(io : IO, guess_bonds : Bool = false, guess_names : Bool = false) : Structure #

Returns the next structure from io. Use .read_all or .each for multiple.


[View source]
def self.read(path : Path | String, guess_bonds : Bool = false, guess_names : Bool = false) : Structure #

Returns the next structure from path. Use .read_all or .each for multiple.


[View source]
def self.read_all(io : IO, guess_bonds : Bool = false, guess_names : Bool = false) : Array(Structure) #

Returns all structures in io.


[View source]
def self.read_all(path : Path | String, guess_bonds : Bool = false, guess_names : Bool = false) : Array(Structure) #

Returns all structures in path.


[View source]
def self.write(io : IO, obj : AtomView | Structure, extended : Bool = false, fields : Array(String) = [] of String) : Nil #

Writes one or more structures or groups of atoms to io.

extended enables the extended XYZ specification, which allows to specify additional data and atom properties in the comment line. If given, fields specifies which atom properties to write in extended mode, otherwise all metadata properties are written.


[View source]
def self.write(io : IO, objs : Enumerable(Structure), extended : Bool = false, fields : Array(String) = [] of String) : Nil #

Writes one or more structures or groups of atoms to io.

extended enables the extended XYZ specification, which allows to specify additional data and atom properties in the comment line. If given, fields specifies which atom properties to write in extended mode, otherwise all metadata properties are written.


[View source]
def self.write(path : Path | String, obj : AtomView | Structure, extended : Bool = false, fields : Array(String) = [] of String) : Nil #

Writes one or more structures or groups of atoms to path.

extended enables the extended XYZ specification, which allows to specify additional data and atom properties in the comment line. If given, fields specifies which atom properties to write in extended mode, otherwise all metadata properties are written.


[View source]
def self.write(path : Path | String, objs : Enumerable(Structure), extended : Bool = false, fields : Array(String) = [] of String) : Nil #

Writes one or more structures or groups of atoms to path.

extended enables the extended XYZ specification, which allows to specify additional data and atom properties in the comment line. If given, fields specifies which atom properties to write in extended mode, otherwise all metadata properties are written.


[View source]