Skip to content

distances_ase_esa

esta.general.distances_ase_esa

distances_pbc_ase(pos1, pos2=None, cell=None, pbc=None, lprint_dist=None)

get the distance among atoms using MIC .... using ASE geometry class .. for testing with own implementation ..sk!!

parameters:
pos1: 3d array
    atomic positions of shape(natoms, 3)
pos2: 3d array 
    atomic position of shape (natoms, 3)

cell: 3x3 array or matrix
    lattice parameters in the c format 
    e.g. cell = np.array ([lv1],
                          [lv2],
                          [lv3]])  
         which is equivalent to 
                np.array ( [[1,0,1],
                           [0,1,0],
                           [0,0,1]])
pbc: use periodic boundary condtion, set to True by default

lprint_dist: logical (True/False), optional
    to print distance among atoms
returns:
dist_vectors: (natoms, natoms, 3) dim array for distance among all atoms along x, y, and z.
dist_len : (natoms, natoms) dim matrix or array for distances among all atoms