struct Chem::Spatial::Positions3

Overview

TODO make compatible with Positions3Proxy

Included Modules

Defined in:

chem/register_format.cr
chem/spatial/positions3.cr

Constructors

Instance Method Summary

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

def self.from_dcd(input : IO | Path | String) : self #

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.


[View source]
def self.new(pos : Slice(Vec3), cell : Parallelepiped | Nil = nil) #

[View source]
def self.read(input : IO | Path | String, format : Chem::Format | String) : self #

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.


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

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:

Use the .from_* methods to customize how the object is decoded in the corresponding file format if possible.


[View source]

Instance Method Detail

def cell : Parallelepiped | Nil #

[View source]
def cell? : Parallelepiped | Nil | Nil #

[View source]
def size(*args, **options) #

[View source]
def size(*args, **options, &) #

[View source]
def unsafe_fetch(*args, **options) #

[View source]
def unsafe_fetch(*args, **options, &) #

[View source]