pybec.analysis.get_spherical_coords_to_centroid

pybec.analysis.get_spherical_coords_to_centroid(atoms_dict, centroid)[source]

Calculate the centroid of the atoms of a certian element in a unit cell.

Parameters
  • atoms_dict (dict) – Dictionary of atomic coordinates in Angstroms, where the keys are the element symbols and the values are the numpy coordinate array for all atoms of that element.

  • centroid (str) – Numpy array of the x,y, and z coordinates (in Angstroms) of the centroid.

Returns

  • r (dict) – Dictionary of the distances of each ion in unit cell to the specified centroid. The keys are the element symbols and the values are numpy.ndarrays of the distances for each ion.

  • phi (dict) – Dictionary of the polar angle of each ion in unit cell with reference to an origin at the specified centroid.

  • theta (dict) – Dictionary of the azimuthal angle of each ion in unit cell with reference to an origin at the specified centroid.