# Demonstrate calculation of Gaussian descriptors on a grid # for a cell with two atoms of type 1 and type 2. # The output in dump.glocal shows that for grid points # sitting on an atom of type 1 or 2: # val1 = 1.0/(0.1355*sqrt(2.0*pi))**3 = 25.5219 # val2 = 1.0/(0.2 *sqrt(2.0*pi))**3 = 7.93670 # These values are extracted to the log file # variable nrep index 1 variable a index 3.316 variable ngrid index 2 units metal atom_modify map hash # generate the box and atom positions using a BCC lattice variable nx equal ${nrep} variable ny equal ${nrep} variable nz equal ${nrep} boundary p p p lattice custom $a & a1 1 0 0 & a2 0 1 0 & a3 0 0 1 & basis 0 0 0 & basis 0.5 0.5 0.5 & region box block 0 ${nx} 0 ${ny} 0 ${nz} create_box 2 box create_atoms 1 box basis 1 1 basis 2 2 mass * 180.88 # define atom compute and grid compute variable rcutfac equal 4.67637 variable radelem1 equal 0.5 variable radelem2 equal 0.5 variable sigmaelem1 equal 0.1355 variable sigmaelem2 equal 0.2 variable gaussian_options string & "${rcutfac} ${radelem1} ${radelem2} ${sigmaelem1} ${sigmaelem2}" # build zero potential to force ghost atom creation pair_style zero ${rcutfac} pair_coeff * * # define atom and grid computes compute mygridlocal all gaussian/grid/local grid ${ngrid} ${ngrid} ${ngrid} & ${gaussian_options} # define output dump 1 all local 1000 dump.glocal c_mygridlocal[*] dump 2 all custom 1000 dump.gatom id x y z compute val1 all reduce max c_mygridlocal[7] inputs local compute val2 all reduce max c_mygridlocal[8] inputs local thermo_style custom step c_val1 c_val2 # run run 0