module Chem::SDF

Defined in:

chem/formats/sdf.cr

Class Method Summary

Class Method Detail

def self.each(io : IO, & : Structure -> ) : Nil #

Yields each structure in io.


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

Yields each structure in path.


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

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


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

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


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

Returns all structures in io.


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

Returns all structures in path.


[View source]
def self.write(io : IO, struc : Structure, variant : Mol::Variant = :v2000) : Nil #

Writes one or more structures to io.

The CTAB format is specified via variant: V2000 (legacy) or V3000.


[View source]
def self.write(io : IO, structures : Enumerable(Structure), variant : Mol::Variant = :v2000) : Nil #

Writes one or more structures to io.

The CTAB format is specified via variant: V2000 (legacy) or V3000.


[View source]
def self.write(path : Path | String, struc : Structure, variant : Mol::Variant = :v2000) : Nil #

Writes one or more structures to path.

The CTAB format is specified via variant: V2000 (legacy) or V3000.


[View source]
def self.write(path : Path | String, structures : Enumerable(Structure), variant : Mol::Variant = :v2000) : Nil #

Writes one or more structures to path.

The CTAB format is specified via variant: V2000 (legacy) or V3000.


[View source]