Skip to content

find k nearest neighbors within r_cutoff #32

@yzchen08

Description

@yzchen08

Can vesin find k nearest neighbors within r_cutoff and output idx_i, idx_j, shifts? For now I can only calculate all neighbors within r_cutoff.

calculator = vesin.NeighborList(cutoff=self.r_cutoff, full_list=True)
idx_i, idx_j, shifts, distances = calculator.compute(
    points=atoms.positions, 
    box=atoms.cell.array, 
    periodic=True, 
    quantities="ijSd"
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions