Skip to content

Commit

Permalink
Merge pull request #402 from brucefan1983/nep_defaults
Browse files Browse the repository at this point in the history
Nep defaults
  • Loading branch information
brucefan1983 authored Mar 31, 2023
2 parents 6c1ed2f + 6d874b1 commit 556fb70
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/nep/input_files/nep_in.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Here is an example :attr:`nep.in` file using all the default parameters::
version 4 # default
cutoff 8 4 # default
n_max 4 4 # default
basis_size 8 8 # default
basis_size 12 12 # default
l_max 4 2 0 # default
neuron 30 # default
lambda_e 1.0 # default
Expand Down
2 changes: 1 addition & 1 deletion doc/nep/input_parameters/basis_size.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ The syntax is::
where :attr:`<N_bas_R>` and :attr:`<N_bas_A>` set :math:`N_\mathrm{bas}^\mathrm{R}` and :math:`N_\mathrm{bas}^\mathrm{A}`, respectively.
The parameters must satisfy :math:`0 \leq N_\mathrm{bas}^\mathrm{R},N_\mathrm{bas}^\mathrm{A} \leq 19`.

The default values of :math:`N_\mathrm{bas}^\mathrm{R}=8` and :math:`N_\mathrm{bas}^\mathrm{A}=8` are usually sufficient.
The default values of :math:`N_\mathrm{bas}^\mathrm{R}=12` and :math:`N_\mathrm{bas}^\mathrm{A}=12` are usually sufficient.

**Note:** These parameters should not be confused with :math:`n_\mathrm{max}^\mathrm{R}` and :math:`n_\mathrm{max}^\mathrm{A}`, which are set via the :ref:`n_max keyword <kw_n_max>`.
11 changes: 6 additions & 5 deletions src/main_nep/parameters.cu
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ void Parameters::set_default_parameters()
version = 4; // NEP4 is the best
rc_radial = 8.0f; // large enough for vdw/coulomb
rc_angular = 4.0f; // large enough in most cases
basis_size_radial = 8; // large enough in most cases
basis_size_angular = 8; // large enough in most cases
basis_size_radial = 12; // large enough in most cases
basis_size_angular = 12; // large enough in most cases
n_max_radial = 4; // a relatively small value to achieve high speed
n_max_angular = 4; // a relatively small value to achieve high speed
L_max = 4; // the only supported value
Expand All @@ -94,11 +94,11 @@ void Parameters::set_default_parameters()
population_size = 50; // almost optimal
maximum_generation = 100000; // a good starting point
type_weight_cpu.resize(NUM_ELEMENTS);
zbl_para.resize(440); // Maximum number of zbl parameters
zbl_para.resize(440); // Maximum number of zbl parameters
for (int n = 0; n < NUM_ELEMENTS; ++n) {
type_weight_cpu[n] = 1.0f; // uniform weight by default
}
enable_zbl = false; // default is not to include ZBL
enable_zbl = false; // default is not to include ZBL
flexible_zbl = false; // default Universal ZBL
}

Expand Down Expand Up @@ -245,7 +245,8 @@ void Parameters::report_inputs()
printf(" (input) will add the flexible ZBL potential\n");
} else {
printf(
" (input) will add the universal ZBL potential with outer cutoff %g A and inner cutoff %g A.\n",
" (input) will add the universal ZBL potential with outer cutoff %g A and inner "
"cutoff %g A.\n",
zbl_rc_outer, zbl_rc_inner);
}
} else {
Expand Down
2 changes: 2 additions & 0 deletions src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# You can consider removing -Xcompiler "/wd 4819"
# 3) Add -DUSE_PLUMED to CFLAGS when use the PLUMED plugin
# and remove it otherwise.
# 4) Add -DUSE_TABLE to speed up MD simulations with NEP
# using pre-computed radial functions in the descriptors
###########################################################


Expand Down

0 comments on commit 556fb70

Please sign in to comment.