Skip to content

shift

esta.general.shift

method to shift atoms: - shift atoms in xyz file along a direction - shift atoms in xyz file to origin - to get CM see thermo class -- already implemented

author: skumar email: sonukumar.physics@gmail.com

centroid(array)

find centroid of a set of points in array

if name == "main": import numpy as np A= np.random.randint(3,size=(9,3)) #(33,3) #.reshape(33,3) print(A) print (centroid(A))

shift_to_origin(filename)

method/function to shift atoms: - shift atoms in xyz file to origin

shift(filename, xshift, yshift, zshift)

shift atoms in xyz file along a direction with some value in each direction

shift_x(pos, symbol, xshift, yshift, zshift)

similar to shift, except position and atomic symbol are input instead of xyz file

Note

name of outfile is needed

shift_many(pos_all, symbol_one, xshift, yshift, zshift)

Note

here symb of only one atomic structure are provided

shift_xyzs(filename, ref_str, atm_indx, target_str=None, dshift=None)

shift a specific atom in an atomic-structure along a direction wrt to the same atom in another atomic-structure in the xyzs (many xyz) in a file

Parameters:

filename: str name of the file with many xyz structures ref_str: integer index of the reference structure wrt which an atom will be shifted (numbering from 1) atm_indx: integer atom index with numbering starting from 1 target_str: integer index of the target structure wrt which an atom will be shifted (numbering from 1) dshift : float shift of atom in an atomic strucutre with respect to the same atom in another atomic structure e.g. in neb xyz path, there are different images. shift atom x in image 1 wrt the same in image 8

shift_origin_to_atom(filename, atom_no)

shift the origin to specific atom in the xyz (or poscar → todo) file