diff --git a/doc/src/read_restart.txt b/doc/src/read_restart.txt index d1091542b8..a5a2bfcc97 100644 --- a/doc/src/read_restart.txt +++ b/doc/src/read_restart.txt @@ -178,7 +178,7 @@ not the same and the current value is not the default. Note that some force field styles (pair, bond, angle, etc) do not store their coefficient info in restart files. Typically these are many-body or tabulated potentials which read their parameters from -separate files. In these cases you will need to re-specify the "pair +separate files. In these cases you will need to re-specify the "pair_coeff"_pair_coeff.html, "bond_coeff"_bond_coeff.html, etc commands in your restart input script. The doc pages for individual force field styles mention if this is the case. This is also true of diff --git a/examples/snap/Mo_Chen_PRM2017.snap b/examples/snap/Mo_Chen_PRM2017.snap new file mode 100644 index 0000000000..fefe32d0c7 --- /dev/null +++ b/examples/snap/Mo_Chen_PRM2017.snap @@ -0,0 +1,7 @@ + +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +# Definition of SNAP potential. +pair_style snap +pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo Mo_Chen_PRM2017.snapparam Mo + diff --git a/examples/snap/Mo_Chen_PRM2017.snapcoeff b/examples/snap/Mo_Chen_PRM2017.snapcoeff new file mode 100644 index 0000000000..8af3c62b78 --- /dev/null +++ b/examples/snap/Mo_Chen_PRM2017.snapcoeff @@ -0,0 +1,35 @@ +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +1 31 +Mo 0.5 1 +-17.2757958404 +0.00431015861472 +0.0657685117891 +0.477733335702 +0.0152688837211 +0.77559888196 +0.284846429566 +0.148804982644 +0.0573702179736 +0.19281989434 +0.323441703578 +0.101324335724 +0.0139639846514 +-0.0324444749083 +0.0349797952779 +0.0613023441282 +0.0881078513046 +0.118716074611 +0.0069662975532 +-0.0174658914685 +-0.0178902177779 +0.0195993756659 +0.0719238160707 +0.0344832661036 +-0.0358616891662 +-0.0292380783172 +-0.0334933909866 +0.00595462520243 +0.0754556638328 +-0.000972545258845 +-0.0100170422751 diff --git a/examples/snap/Mo_Chen_PRM2017.snapparam b/examples/snap/Mo_Chen_PRM2017.snapparam new file mode 100644 index 0000000000..dad0305050 --- /dev/null +++ b/examples/snap/Mo_Chen_PRM2017.snapparam @@ -0,0 +1,4 @@ +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +rcutfac 4.615858 +twojmax 6 diff --git a/examples/snap/in.snap.Mo_Chen b/examples/snap/in.snap.Mo_Chen new file mode 100644 index 0000000000..007bce2462 --- /dev/null +++ b/examples/snap/in.snap.Mo_Chen @@ -0,0 +1,45 @@ +# Demonstrate SNAP Ta potential + +# Initialize simulation + +variable nsteps index 100 +variable nrep equal 4 +variable a equal 3.160 +units metal + +# 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 bcc $a +region box block 0 ${nx} 0 ${ny} 0 ${nz} +create_box 1 box +create_atoms 1 box + +mass 1 183.84 + +# choose potential + +include Mo_Chen_PRM2017.snap + +# Setup output + +thermo 10 +thermo_modify norm yes + +# Set up NVE run + +timestep 0.5e-3 +neighbor 1.0 bin +neigh_modify once no every 1 delay 0 check yes + +# Run MD + +velocity all create 300.0 4928459 +fix 1 all nve +run ${nsteps} + diff --git a/lib/voronoi/README b/lib/voronoi/README index 2ca11c9221..9c20eff813 100644 --- a/lib/voronoi/README +++ b/lib/voronoi/README @@ -21,7 +21,7 @@ Instructions: tarball either in this /lib/voronoi directory or somewhere else on your system. -2. compile Voro++ from within its home directory +2. Compile Voro++ from within its home directory % make 3. There is no need to install Voro++ if you only wish diff --git a/potentials/Mo_Chen_PRM2017.snap b/potentials/Mo_Chen_PRM2017.snap new file mode 100644 index 0000000000..892bca6153 --- /dev/null +++ b/potentials/Mo_Chen_PRM2017.snap @@ -0,0 +1,6 @@ +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +# Definition of SNAP potential. +pair_style snap +pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo Mo_Chen_PRM2017.snapparam Mo + diff --git a/potentials/Mo_Chen_PRM2017.snapcoeff b/potentials/Mo_Chen_PRM2017.snapcoeff new file mode 100644 index 0000000000..8af3c62b78 --- /dev/null +++ b/potentials/Mo_Chen_PRM2017.snapcoeff @@ -0,0 +1,35 @@ +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +1 31 +Mo 0.5 1 +-17.2757958404 +0.00431015861472 +0.0657685117891 +0.477733335702 +0.0152688837211 +0.77559888196 +0.284846429566 +0.148804982644 +0.0573702179736 +0.19281989434 +0.323441703578 +0.101324335724 +0.0139639846514 +-0.0324444749083 +0.0349797952779 +0.0613023441282 +0.0881078513046 +0.118716074611 +0.0069662975532 +-0.0174658914685 +-0.0178902177779 +0.0195993756659 +0.0719238160707 +0.0344832661036 +-0.0358616891662 +-0.0292380783172 +-0.0334933909866 +0.00595462520243 +0.0754556638328 +-0.000972545258845 +-0.0100170422751 diff --git a/potentials/Mo_Chen_PRM2017.snapparam b/potentials/Mo_Chen_PRM2017.snapparam new file mode 100644 index 0000000000..dad0305050 --- /dev/null +++ b/potentials/Mo_Chen_PRM2017.snapparam @@ -0,0 +1,4 @@ +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +rcutfac 4.615858 +twojmax 6 diff --git a/src/compute_centro_atom.cpp b/src/compute_centro_atom.cpp index 3f88095d77..a22fb96f98 100644 --- a/src/compute_centro_atom.cpp +++ b/src/compute_centro_atom.cpp @@ -39,7 +39,8 @@ ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), distsq(NULL), nearest(NULL), centro(NULL) { - if (narg < 4 || narg > 6) error->all(FLERR,"Illegal compute centro/atom command"); + if (narg < 4 || narg > 6) + error->all(FLERR,"Illegal compute centro/atom command"); if (strcmp(arg[3],"fcc") == 0) nnn = 12; else if (strcmp(arg[3],"bcc") == 0) nnn = 8; @@ -54,7 +55,8 @@ ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) : int iarg = 4; while (iarg < narg) { if (strcmp(arg[iarg],"axes") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal compute centro/atom command3"); + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute centro/atom command3"); if (strcmp(arg[iarg+1],"yes") == 0) axes_flag = 1; else if (strcmp(arg[iarg+1],"no") == 0) axes_flag = 0; else error->all(FLERR,"Illegal compute centro/atom command2"); @@ -137,7 +139,8 @@ void ComputeCentroAtom::compute_peratom() memory->destroy(array_atom); nmax = atom->nmax; memory->create(centro,nmax,"centro/atom:centro"); - memory->create(array_atom,nmax,size_peratom_cols,"centro/atom:array_atom"); + memory->create(array_atom,nmax,size_peratom_cols, + "centro/atom:array_atom"); } } @@ -320,6 +323,7 @@ void ComputeCentroAtom::compute_peratom() } } + /* ---------------------------------------------------------------------- 2 select routines from Numerical Recipes (slightly modified) find k smallest values in array of length n @@ -434,5 +438,6 @@ void ComputeCentroAtom::select2(int k, int n, double *arr, int *iarr) double ComputeCentroAtom::memory_usage() { double bytes = nmax * sizeof(double); + if (axes_flag) bytes += size_peratom_cols*nmax * sizeof(double); return bytes; }