class Chem::Spatial::KDTree

Defined in:

chem/spatial/kdtree.cr

Constant Summary

DIMENSIONS = 3

Constructors

Instance Method Summary

Constructor Detail

def self.new(structure : Structure, periodic : Bool, **options) #

[View source]
def self.new(structure : Structure, **options) : self #

[View source]
def self.new(atoms : AtomCollection, lattice : Lattice | Nil = nil, **options) #

[View source]

Instance Method Detail

def each_neighbor(of coords : Vector, *, within radius : Float64, &block : Atom, Float64 -> ) : Nil #

[View source]
def each_neighbor(of atom : Atom, *, within radius : Float64, &block : Atom, Float64 -> ) : Nil #

[View source]
def nearest(to coords : Vector) : Atom #

[View source]
def nearest(to atom : Atom) : Atom #

[View source]
def nearest_with_distance(atom : Atom | Vector) : Tuple(Atom, Float64) #

[View source]
def neighbors(of coords : Vector, *, count : Int) : Array(Atom) #

[View source]
def neighbors(of atom : Atom, *, count : Int) : Array(Atom) #

[View source]
def neighbors(of coords : Vector, *, within radius : Number) : Array(Atom) #

[View source]
def neighbors(of atom : Atom, *, within radius : Number) : Array(Atom) #

[View source]
def neighbors_with_distance(vec : Vector, *, n : Int) : Array(Tuple(Atom, Float64)) #

[View source]
def neighbors_with_distance(atom : Atom, *, n : Int) : Array(Tuple(Atom, Float64)) #

[View source]