Merge pull request #1831 from akohlmey/pair-bop-updates

Correct some issues with pair style bop and its potential files
This commit is contained in:
Axel Kohlmeyer 2020-01-15 17:30:07 -05:00 committed by GitHub
commit 77a28c404a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19394 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# DATE: 2015-07-06 CONTRIBUTOR: X. W. Zhou, xzhou@sandia.gov, Don Ward, donward@sandia.gov, CITATION: Zhou, Ward, and Foster, J. Alloys Compd., 680, 752 (2016). # DATE: 2015-07-06 CONTRIBUTOR: X. W. Zhou, xzhou@sandia.gov, Don Ward, donward@sandia.gov, CITATION: Zhou, Ward, and Foster, Phys. Chem. Chem. Phys., under consideration
2 2
13 2.69800000e+01 Al 13 2.69800000e+01 Al
29 6.35500000e+01 Cu 29 6.35500000e+01 Cu
@ -4835,7 +4835,7 @@
0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00
0.00000000e+00 4.90000000e+00
0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00

12083
potentials/AlCuH.bop.table Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

29
src/.gitignore vendored
View File

@ -27,8 +27,8 @@
/*_ssa.h /*_ssa.h
/*_ssa.cpp /*_ssa.cpp
/kim_query.cpp /kim_*.cpp
/kim_query.h /kim_*.h
/pair_kim.cpp /pair_kim.cpp
/pair_kim.h /pair_kim.h
@ -116,6 +116,8 @@
/compute_snad_atom.h /compute_snad_atom.h
/compute_snav_atom.cpp /compute_snav_atom.cpp
/compute_snav_atom.h /compute_snav_atom.h
/compute_snap.cpp
/compute_snap.h
/openmp_snap.h /openmp_snap.h
/pair_snap.cpp /pair_snap.cpp
/pair_snap.h /pair_snap.h
@ -318,8 +320,14 @@
/compute_fep.h /compute_fep.h
/compute_force_tally.cpp /compute_force_tally.cpp
/compute_force_tally.h /compute_force_tally.h
/compute_gyration_shape.cpp
/compute_gyration_shape.h
/compute_gyration_shape_chunk.cpp
/compute_gyration_shape_chunk.h
/compute_heat_flux_tally.cpp /compute_heat_flux_tally.cpp
/compute_heat_flux_tally.h /compute_heat_flux_tally.h
/compute_hma.cpp
/compute_hma.h
/compute_ke_atom_eff.cpp /compute_ke_atom_eff.cpp
/compute_ke_atom_eff.h /compute_ke_atom_eff.h
/compute_ke_eff.cpp /compute_ke_eff.cpp
@ -332,6 +340,8 @@
/compute_meso_rho_atom.h /compute_meso_rho_atom.h
/compute_meso_t_atom.cpp /compute_meso_t_atom.cpp
/compute_meso_t_atom.h /compute_meso_t_atom.h
/compute_momentum.cpp
/compute_momentum.h
/compute_msd_nongauss.cpp /compute_msd_nongauss.cpp
/compute_msd_nongauss.h /compute_msd_nongauss.h
/compute_pe_tally.cpp /compute_pe_tally.cpp
@ -422,6 +432,8 @@
/dump_custom_mpiio.h /dump_custom_mpiio.h
/dump_h5md.cpp /dump_h5md.cpp
/dump_h5md.h /dump_h5md.h
/dump_local_gz.cpp
/dump_local_gz.h
/dump_netcdf.cpp /dump_netcdf.cpp
/dump_netcdf.h /dump_netcdf.h
/dump_netcdf_mpiio.cpp /dump_netcdf_mpiio.cpp
@ -564,6 +576,8 @@
/fix_nph_asphere.h /fix_nph_asphere.h
/fix_npt_asphere.cpp /fix_npt_asphere.cpp
/fix_npt_asphere.h /fix_npt_asphere.h
/fix_npt_cauchy.cpp
/fix_npt_cauchy.h
/fix_nve_asphere.cpp /fix_nve_asphere.cpp
/fix_nve_asphere.h /fix_nve_asphere.h
/fix_nve_asphere_noforce.cpp /fix_nve_asphere_noforce.cpp
@ -673,6 +687,8 @@
/fix_spring_pull.h /fix_spring_pull.h
/fix_srd.cpp /fix_srd.cpp
/fix_srd.h /fix_srd.h
/fix_store_kim.cpp
/fix_store_kim.h
/fix_temp_rescale_eff.cpp /fix_temp_rescale_eff.cpp
/fix_temp_rescale_eff.h /fix_temp_rescale_eff.h
/fix_thermal_conductivity.cpp /fix_thermal_conductivity.cpp
@ -695,6 +711,8 @@
/fix_wall_ees.h /fix_wall_ees.h
/fix_wall_region_ees.cpp /fix_wall_region_ees.cpp
/fix_wall_region_ees.h /fix_wall_region_ees.h
/fix_wall_reflect_stochastic.cpp
/fix_wall_reflect_stochastic.h
/fix_wall_gran.cpp /fix_wall_gran.cpp
/fix_wall_gran.h /fix_wall_gran.h
/fix_wall_gran_region.cpp /fix_wall_gran_region.cpp
@ -843,6 +861,8 @@
/pair_lebedeva_z.h /pair_lebedeva_z.h
/pair_lj_expand_coul_long.cpp /pair_lj_expand_coul_long.cpp
/pair_lj_expand_coul_long.h /pair_lj_expand_coul_long.h
/pair_local_density.cpp
/pair_local_density.h
/pair_edip.cpp /pair_edip.cpp
/pair_edip.h /pair_edip.h
/pair_edip_multi.cpp /pair_edip_multi.cpp
@ -968,6 +988,8 @@
/pair_meam_spline.h /pair_meam_spline.h
/pair_meam_sw_spline.cpp /pair_meam_sw_spline.cpp
/pair_meam_sw_spline.h /pair_meam_sw_spline.h
/pair_mesocnt.cpp
/pair_mesocnt.h
/pair_mm3_switch3_coulgauss_long.cpp /pair_mm3_switch3_coulgauss_long.cpp
/pair_mm3_switch3_coulgauss_long.h /pair_mm3_switch3_coulgauss_long.h
/pair_morse_soft.cpp /pair_morse_soft.cpp
@ -1128,6 +1150,7 @@
/remap_wrap.h /remap_wrap.h
/restart_mpiio.cpp /restart_mpiio.cpp
/restart_mpiio.h /restart_mpiio.h
/rigid_const.h
/scafacos.cpp /scafacos.cpp
/scafacos.h /scafacos.h
/server.cpp /server.cpp
@ -1148,6 +1171,8 @@
/temper_grem.h /temper_grem.h
/temper_npt.cpp /temper_npt.cpp
/temper_npt.h /temper_npt.h
/third_order.cpp
/third_order.h
/thr_data.cpp /thr_data.cpp
/thr_data.h /thr_data.h
/verlet_split.cpp /verlet_split.cpp

View File

@ -61,6 +61,7 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp)
one_coeff = 1; one_coeff = 1;
manybody_flag = 1; manybody_flag = 1;
ghostneigh = 1; ghostneigh = 1;
allocated = 0;
BOP_index = NULL; BOP_index = NULL;
BOP_index3 = NULL; BOP_index3 = NULL;
@ -495,6 +496,53 @@ void PairBOP::allocate()
allocated = 1; allocated = 1;
int n = atom->ntypes; int n = atom->ntypes;
memory->destroy(rcut);
memory->destroy(rcut3);
memory->destroy(rcutsq);
memory->destroy(rcutsq3);
memory->destroy(dr);
memory->destroy(rdr);
memory->destroy(dr3);
memory->destroy(rdr3);
memory->destroy(setflag);
memory->destroy(cutsq);
memory->destroy(cutghost);
memory->destroy(pBetaS);
memory->destroy(pBetaS1);
memory->destroy(pBetaS2);
memory->destroy(pBetaS3);
memory->destroy(pBetaS4);
memory->destroy(pBetaS5);
memory->destroy(pBetaS6);
memory->destroy(pLong);
memory->destroy(pLong1);
memory->destroy(pLong2);
memory->destroy(pLong3);
memory->destroy(pLong4);
memory->destroy(pLong5);
memory->destroy(pLong6);
memory->destroy(pBetaP);
memory->destroy(pBetaP1);
memory->destroy(pBetaP2);
memory->destroy(pBetaP3);
memory->destroy(pBetaP4);
memory->destroy(pBetaP5);
memory->destroy(pBetaP6);
memory->destroy(pRepul);
memory->destroy(pRepul1);
memory->destroy(pRepul2);
memory->destroy(pRepul3);
memory->destroy(pRepul4);
memory->destroy(pRepul5);
memory->destroy(pRepul6);
memory->destroy(FsigBO);
memory->destroy(FsigBO1);
memory->destroy(FsigBO2);
memory->destroy(FsigBO3);
memory->destroy(FsigBO4);
memory->destroy(FsigBO5);
memory->destroy(FsigBO6);
memory->create(rcut,npairs,"BOP:rcut"); memory->create(rcut,npairs,"BOP:rcut");
memory->create(rcut3,npairs,"BOP:rcut3"); memory->create(rcut3,npairs,"BOP:rcut3");
memory->create(rcutsq,npairs,"BOP:rcutsq"); memory->create(rcutsq,npairs,"BOP:rcutsq");
@ -569,6 +617,8 @@ void PairBOP::coeff(int narg, char **arg)
int i,j; int i,j;
int n = atom->ntypes; int n = atom->ntypes;
MPI_Comm_rank(world,&me); MPI_Comm_rank(world,&me);
delete[] map;
map = new int[n+1]; map = new int[n+1];
if (narg != 3 + atom->ntypes) if (narg != 3 + atom->ntypes)
@ -5056,6 +5106,29 @@ void PairBOP::read_table(char *filename)
MPI_Bcast(&bop_types,1,MPI_INT,0,world); MPI_Bcast(&bop_types,1,MPI_INT,0,world);
MPI_Bcast(&npairs,1,MPI_INT,0,world); MPI_Bcast(&npairs,1,MPI_INT,0,world);
MPI_Bcast(&npower,1,MPI_INT,0,world); MPI_Bcast(&npower,1,MPI_INT,0,world);
memory->destroy(pi_a);
memory->destroy(pro_delta);
memory->destroy(pi_delta);
memory->destroy(pi_p);
memory->destroy(pi_c);
memory->destroy(r1);
memory->destroy(pro);
memory->destroy(sigma_delta);
memory->destroy(sigma_c);
memory->destroy(sigma_a);
memory->destroy(sigma_f);
memory->destroy(sigma_k);
memory->destroy(small3);
memory->destroy(gfunc);
memory->destroy(gfunc1);
memory->destroy(gfunc2);
memory->destroy(gfunc3);
memory->destroy(gfunc4);
memory->destroy(gfunc5);
memory->destroy(gfunc6);
memory->destroy(gpara);
memory->create(pi_a,npairs,"BOP:pi_a"); memory->create(pi_a,npairs,"BOP:pi_a");
memory->create(pro_delta,bop_types,"BOP:pro_delta"); memory->create(pro_delta,bop_types,"BOP:pro_delta");
memory->create(pi_delta,npairs,"BOP:pi_delta"); memory->create(pi_delta,npairs,"BOP:pi_delta");
@ -5225,22 +5298,23 @@ void PairBOP::read_table(char *filename)
pass=0; pass=0;
i=0; i=0;
if(nws==3) { if(nws==3) {
while(fgets(s,MAXLINE,fp)!=NULL&&i<npairs) { for(i=0;i<npairs;i++) {
utils::sfgets(FLERR,s,MAXLINE,fp,filename,error);
sscanf(s,"%lf",&rcut3[i]); sscanf(s,"%lf",&rcut3[i]);
pass=1;
i++;
} }
if(pass==1) { for(i=0;i<npairs;i++) {
for(i=0;i<npairs;i++) { for(j=0;j<nr;j++) {
for(j=0;j<nr;j++) { pass=0;
utils::sfgets(FLERR,s,MAXLINE,fp,filename,error); while(fgets(s,MAXLINE,fp)!=NULL&&pass==0) {
sscanf(s,"%lf%lf%lf%lf%lf",&pLong[i][j],&pLong[i][j+1] sscanf(s,"%lf%lf%lf%lf%lf",&pLong[i][j],&pLong[i][j+1]
,&pLong[i][j+2],&pLong[i][j+3],&pLong[i][j+4]); ,&pLong[i][j+2],&pLong[i][j+3],&pLong[i][j+4]);
j+=4; j+=4;
pass=1;
} }
} }
} }
} }
rcutall=0.0; rcutall=0.0;
for(i=0;i<npairs;i++) { for(i=0;i<npairs;i++) {
if(rcut[i]>rcutall) if(rcut[i]>rcutall)