[ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, 0.0 ], [ 2.0, 0.0, 0.0 ], [ 3.0, 0.0, 0.0 ], ] ); ''' atom_bas = [ [ 's', 'px', 'py', 'pz' ], [ 's' ], [ 's' ], [ 's', 'dz2' ], ] ''' atom_bas = MP.make_bas_list( [ len( atom_pos ) ] ) print "bas_list:", atom_bas atom_Rmin = np.array( [ 1.0, 1.0, 1.0, 1.0 ] ); atom_Rmax = np.array( [ 2.0, 2.0, 2.0, 2.0 ] ); atom_mask = np.array( [ True, True, True, False ] ); V = np.zeros( (50,50,50) ) cell = np.array([ [ 10.0, 0.0, 0.0 ], [ 0.0, 10.0, 0.0 ], [ 0.0, 0.0, 10.0 ] ]); MP.setGrid( V, cell );
import GridUtils as GU import Multipoles as MP import ProbeParticle as PP # ============== Setup WORK_DIR = '/home/prokop/Desktop/Probe_Particle_Simulations/Multipoles/COCu4/' # NOTE: Data for COCu4 tip example are on tarkil /auto/praha1/prokop/STHM/vasp/COCu4 # ============== load reference grid V, lvec, nDim, head = GU.loadXSF(WORK_DIR + 'LOCPOT.xsf') cell = np.array([lvec[1], lvec[2], lvec[3]]) MP.setGrid(V, cell) # ============== prepare atoms atom_types, atom_pos = GU.getFromHead_PRIMCOORD( head) # load atoms from header of xsf file # set sample region around atom atom_Rmin, atom_Rmax spacies = PP.loadSpecies('./defaults/atomtypes.ini') R_type = spacies[:, 0] atom_Rmin, atom_Rmax = MP.make_Ratoms(atom_types, R_type) # mask atoms which should not to be included into the expansion natoms = len(atom_types) atom_mask = np.array([True] * natoms) atom_mask[2:] = False
atom_pos = np.array([ [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [2.0, 0.0, 0.0], [3.0, 0.0, 0.0], ]) ''' atom_bas = [ [ 's', 'px', 'py', 'pz' ], [ 's' ], [ 's' ], [ 's', 'dz2' ], ] ''' atom_bas = MP.make_bas_list([len(atom_pos)]) print "bas_list:", atom_bas atom_Rmin = np.array([1.0, 1.0, 1.0, 1.0]) atom_Rmax = np.array([2.0, 2.0, 2.0, 2.0]) atom_mask = np.array([True, True, True, False]) V = np.zeros((50, 50, 50)) cell = np.array([[10.0, 0.0, 0.0], [0.0, 10.0, 0.0], [0.0, 0.0, 10.0]]) MP.setGrid(V, cell) sampled_val, sampled_pos = MP.sampleGridArroundAtoms(atom_pos, atom_Rmin, atom_Rmax, atom_mask) ''' X = sampled_pos[:,0]
import GridUtils as GU import Multipoles as MP import ProbeParticle as PP # ============== Setup WORK_DIR = '/home/prokop/Desktop/Probe_Particle_Simulations/Multipoles/COCu4/' # NOTE: Data for COCu4 tip example are on tarkil /auto/praha1/prokop/STHM/vasp/COCu4 # ============== load reference grid V, lvec, nDim, head = GU.loadXSF( WORK_DIR + 'LOCPOT.xsf' ) cell = np.array( [ lvec[1], lvec[2], lvec[3] ]); MP.setGrid( V, cell ); # ============== prepare atoms atom_types,atom_pos = GU.getFromHead_PRIMCOORD( head ) # load atoms from header of xsf file # set sample region around atom atom_Rmin, atom_Rmax spacies = PP.loadSpecies( './defaults/atomtypes.ini' ) R_type = spacies[:,0] atom_Rmin, atom_Rmax = MP.make_Ratoms( atom_types, R_type ) # mask atoms which should not to be included into the expansion natoms = len( atom_types ) atom_mask = np.array( [ True ] * natoms ); atom_mask[ 2: ] = False