class Chem::Spatial::KDTree
- Chem::Spatial::KDTree
- Reference
- Object
Defined in:
chem/spatial/kdtree.crConstant Summary
-
DIMENSIONS =
3
Constructors
- .new(structure : Structure, periodic : Bool, **options)
- .new(structure : Structure, **options) : self
- .new(atoms : AtomCollection, lattice : Lattice | Nil = nil, **options)
Instance Method Summary
- #each_neighbor(of coords : Vector, *, within radius : Float64, &block : Atom, Float64 -> ) : Nil
- #each_neighbor(of atom : Atom, *, within radius : Float64, &block : Atom, Float64 -> ) : Nil
- #nearest(to coords : Vector) : Atom
- #nearest(to atom : Atom) : Atom
- #nearest_with_distance(atom : Atom | Vector) : Tuple(Atom, Float64)
- #neighbors(of coords : Vector, *, count : Int) : Array(Atom)
- #neighbors(of atom : Atom, *, count : Int) : Array(Atom)
- #neighbors(of coords : Vector, *, within radius : Number) : Array(Atom)
- #neighbors(of atom : Atom, *, within radius : Number) : Array(Atom)
- #neighbors_with_distance(vec : Vector, *, n : Int) : Array(Tuple(Atom, Float64))
- #neighbors_with_distance(atom : Atom, *, n : Int) : Array(Tuple(Atom, Float64))
Constructor Detail
Instance Method Detail
def each_neighbor(of coords : Vector, *, within radius : Float64, &block : Atom, Float64 -> ) : Nil
#