struct Chem::Spatial::Positions3
- Chem::Spatial::Positions3
- Struct
- Value
- Object
Overview
TODO make compatible with Positions3Proxy
Included Modules
Defined in:
chem/register_format.crchem/spatial/positions3.cr
Constructors
-
.from_dcd(input : IO | Path | String) : self
Returns the positions3 encoded in input using the
Chem::DCD
file format. - .new(pos : Slice(Vec3), cell : Parallelepiped | Nil = nil)
-
.read(input : IO | Path | String, format : Chem::Format | String) : self
Returns the positions3 encoded in the specified file using format.
-
.read(path : Path | String) : self
Returns the positions3 encoded in the specified file.
Instance Method Summary
- #cell : Parallelepiped | Nil
- #cell? : Parallelepiped | Nil | Nil
- #size(*args, **options)
- #size(*args, **options, &)
- #unsafe_fetch(*args, **options)
- #unsafe_fetch(*args, **options, &)
Instance methods inherited from module Indexable(Chem::Spatial::Vec3)
[](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
Instance methods inherited from module Enumerable(Chem::Spatial::Vec3)
===(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
Constructor Detail
Returns the positions3 encoded in input using the
Chem::DCD
file format. Arguments are forwarded to
Chem::DCD::Reader.open
.
If input contains multiple entries, this method returns
the first one only. Use Array#from_dcd
or
Chem::DCD::Reader#each
to get multiple entries instead.
Returns the positions3 encoded in the specified file
using format. Raises ArgumentError
if format has
required arguments or cannot read Chem::Spatial::Positions3
.
The supported file formats are Chem::DCD
. Use the
.from_*
methods to customize how the object is decoded in
the corresponding file format if possible.
Returns the positions3 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:
Chem::DCD
(.dcd)
Use the .from_*
methods to customize how the object is
decoded in the corresponding file format if possible.