struct Chem::Structure::Experiment

Defined in:

chem/core/structure/experiment.cr
chem/register_format.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_pdb(input : IO | Path | String, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : self #

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

If input contains multiple entries, this method returns the first one only. Use Array#from_pdb or Chem::PDB::Reader#each to get multiple entries instead.


[View source]
def self.new(title : String, method : Method, resolution : Float64 | Nil, pdb_accession : String, deposition_date : Time, doi : String | Nil) #

[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::Structure::Experiment.

The supported file formats are Chem::PDB. 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 deposition_date : Time #

[View source]
def doi : String | Nil #

[View source]
def method : Method #

[View source]
def pdb_accession : String #

[View source]
def resolution : Float64 | Nil #

[View source]
def title : String #

[View source]