class Array(T)
- Array(T)
- Reference
- Object
Overview
Generate Array#write methods for writable types
Included Modules
- Comparable(Array(T))
- Indexable::Mutable(T)
Defined in:
lib/views/src/views/array_view.crchem/core_ext/array.cr
chem/register_format.cr
Constructors
- .from_dcd(io : IO) : self
- .from_dcd(path : Path | String) : self
- .from_mol2(io : IO) : self
- .from_mol2(path : Path | String) : self
- .from_pdb(io : IO, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : self
- .from_pdb(path : Path | String, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : self
- .from_sdf(io : IO) : self
- .from_sdf(path : Path | String) : self
- .from_xyz(io : IO, guess_bonds : Bool = false, guess_names : Bool = false) : self
- .from_xyz(path : Path | String, guess_bonds : Bool = false, guess_names : Bool = false) : self
- .read(input : IO | Path | String, format : Chem::Mol2.class) : self
- .read(input : IO | Path | String, format : Chem::PDB.class) : self
- .read(input : IO | Path | String, format : Chem::SDF.class) : self
- .read(input : IO | Path | String, format : Chem::XYZ.class) : self
- .read(input : IO | Path | String, format : Chem::DCD.class) : self
-
.read(input : IO | Path | String, format : U.class) : self forall U
FIXME Make it compile time error.
-
.read(path : Path | String) : self
Returns the entries encoded in the specified file.
Instance Method Summary
- #sort(range : Range(Int, Int)) : self
- #sort(range : Range(Int, Int), &block : T, T -> Int32 | Nil) : self
- #sort!(range : Range(Int, Int)) : self
- #sort!(range : Range(Int, Int), &block : T, T -> Int32 | Nil) : self
- #write(output : IO | Path | String, format : Chem::Mol2.class) : Nil
- #write(output : IO | Path | String, format : Chem::PDB.class) : Nil
- #write(output : IO | Path | String, format : Chem::SDF.class) : Nil
- #write(output : IO | Path | String, format : Chem::XYZ.class) : Nil
- #write(output : IO | Path | String, format : Chem::DCD.class) : Nil
-
#write(output : IO | Path | String, format : U.class) : Nil forall U
FIXME Make it compile time error.
-
#write(path : Path | String) : Nil
Writes the elements to the specified file.
Instance methods inherited from module Indexable(T)
[](idxs : Tuple) : Tuple[](idxs : Enumerable(Int)) : Array(T)
[](*idxs : Int) : Tuple [], sentence(io : IO, separator : String = ", ", *, pair_separator : String = " and ", tail_separator : String = ", and ", & : T, IO -> ) : Nil
sentence(io : IO, separator : String = ", ", *, pair_separator : String = " and ", tail_separator : String = ", and ") : Nil
sentence(separator : String = ", ", *, pair_separator : String = " and ", tail_separator : String = ", and ", & : T -> ) : String
sentence(separator : String = ", ", *, pair_separator : String = " and ", tail_separator : String = ", and ") : String sentence, to_dcd(io : IO, title : String | Nil = nil) : Nil
to_dcd(title : String | Nil = nil) : String
to_dcd(path : Path | String, title : String | Nil = nil) : Nil to_dcd
Instance methods inherited from module Enumerable(T)
===(atom : Chem::Atom) : Bool===(chain : Chem::Chain) : Bool
===(residue : Chem::Residue) : Bool ===, average(weights : Indexable(Number))
average(weights : Indexable(Number), & : T -> _) average, find(pattern, if_none default = nil) find, find!(pattern) find!, mean
mean(& : T -> _) mean, to_dcd(io : IO, title : String | Nil = nil) : Nil
to_dcd(title : String | Nil = nil) : String
to_dcd(path : Path | String, title : String | Nil = nil) : Nil to_dcd, to_mol2(io : IO) : Nil
to_mol2(path : Path | String) : Nil
to_mol2 : String to_mol2, to_pdb(io : IO, conect conect_options : PDB::ConectOptions = PDB::ConectOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false) : Nil
to_pdb(conect conect_options : PDB::ConectOptions = PDB::ConectOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false) : String
to_pdb(path : Path | String, conect conect_options : PDB::ConectOptions = PDB::ConectOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false) : Nil to_pdb, to_sdf(io : IO, variant : Mol::Variant = :v2000) : Nil
to_sdf(path : Path | String, variant : Mol::Variant = :v2000) : Nil
to_sdf(variant : Mol::Variant = :v2000) : String to_sdf, to_xyz(io : IO, extended : Bool = false, fields : Array(String) = [] of String) : Nil
to_xyz(extended : Bool = false, fields : Array(String) = [] of String) : String
to_xyz(path : Path | String, extended : Bool = false, fields : Array(String) = [] of String) : Nil to_xyz
Constructor Detail
FIXME Make it compile time error. Should raise if format is not registered or format is incompatible with open_type. Better create an override with the other formats, and leave this as a fallback.
Returns the entries encoded in the specified file. The file format
is chosen based on the filename (see Chem.guess_format).
Raises ArgumentError if the file format cannot be determined.
Instance Method Detail
FIXME Make it compile time error. Should raise if format is not registered or format is incompatible with open_type. Better create an override with the other formats, and leave this as a fallback.
Writes the elements to the specified file. The file format is chosen
based on the filename (see Chem.guess_format). Raises
ArgumentError if the file format cannot be determined.