mc

The mc keyword is used to carry out Monte Carlo (MC) trial steps, usually in combination with a MD simulation. Three MC ensembles are supported, including the canonical, the semi-grand canonical (SGC), and the variance-constrained semi-grand canonical (VCSGC) [Sadigh2012a] [Sadigh2012b] ensemble.

This keyword can only be used in combination with NEP models.

Syntax

canonical

If the first parameter is canonical, the system will be sampled in the canonical MC ensemble. It can be used as follows:

mc canonical <md_steps> <mc_trials> <T_i> <T_f> [group <grouping_method> <group_id>]

This means that mc_trials MC trials are performed every md_steps MD steps, while the instant temperature for the MC ensemble changes linearly from T_i to T_f.

sgc

If the first parameter is sgc, the system will be sampled in the SGC MC ensemble. It can be used as follows:

mc sgc <md_steps> <mc_trials> <T_i> <T_f> <num_species> {<species_0> <mu_0> <species_1> <mu_1> ...} [group <grouping_method>  <group_id>]

This means that mc_trials MC trials are performed every md_steps MD steps, while the instant temperature for the MC ensemble changes linearly from T_i to T_f.

num_species specifies the number of species that are to be included in the sampling. It must be no less than 2 and no larger than 4. After specifying the number of species, one needs to specify their chemical symbols (species_i) and chemical potentials (mu_i) in units of eV. The species can be listed in arbitrary order. Note that only the differences between the chemical potentials matter.

vcsgc

If the first parameter is vcsgc, the system will be sampled in the VCSGC MC ensemble. It can be used in the following way:

mc vcsgc <md_steps> <mc_trials> <T_i> <T_f> <num_species> {<species_0> <phi_0> <species_1> <phi_1> ...} kappa [group <grouping_method>  <group_id>]

This means that mc_trials MC trials are performed every md_steps MD steps, while the instant temperature for the MC ensemble changes linearly from T_i to T_f.

num_species specifies the number of species that are to be included in the sampling. It must be no less than 2 and no larger than 4. After specifying the number of species, one needs to specify their chemical symbols (species_i) and chemical potentials (phi_i = \(\phi_i\)). The species can be listed in arbitrary order. Next one needs to specify the (dimensionless) kappa parameter (\(\kappa\)).

The \(\phi\) and \(\kappa\) parameters constrain the average and variance of the species concentrations, respectively. One can usually achieve a sampling of the full composition range by varying \(\phi_i\) between −1.2 and +1.2, which thus play a role that is equivalent to the \(\mu_i\) parameters in the SGC ensemble. Typically a \(\kappa\) value of 100 is suitable. If the concentration fluctuations are too large (e.g., deep with miscibility gaps) one should increase this value.

The choice of parameters that we use here differs from the original papers [Sadigh2012a] [Sadigh2012b] in terms of normalization and follows the expressions in e.g., [Rahm2021].

General

  • The listed species must be supported by the NEP model.

  • For all the MC ensembles, there is an option to specify the grouping method grouping_method and the group ID group_id in the given grouping method, after the parameter group. The functionality is illustrated in the example section below.

  • There must be at least one listed species in the initial model system or specified group. For example, if you list Au and Cu for doing SGC MC, the system or the specified group must have some Au or Cu atoms (or both); otherwise the MC trial cannot get started.

Example 1

An example for sampling in the canonical ensemble is:

mc canonical 100 200 500 100 group 1 3

This means

  • Perform 200 MC trials after every 100 MD steps.

  • Change the temperature for the MC simulation linearly from 500 to 300 K, even though the temperature for the MD ensemble is kept to be 300 K.

  • Only the atoms in group 3 of grouping method 1 will be considered during MC sampling.

Example 2

Here is an example for MC sampling the SGC ensemble:

mc sgc 100 1000 300 300 2 Cu 0 Au 0.6

This means

  • Perform 1000 MC trials after every 100 MD steps.

  • The temperature for the MC ensemble will be kept at 300 K.

  • Only the Cu and Au atoms are involved in the MC process. The Au atoms have a chemical potential of 0.6 eV relative to the Cu atoms.

Example 3

Here is an example for sampling in the VCSGC ensemble:

mc vcsgc 200 1000 500 500 2 Al -2 Ag 0 10000

This means

  • Perform 1000 MC trials after every 200 MD steps.

  • The temperature for the MC ensemble will be kept at 500 K.

  • Only the Al and Ag atoms are involved in the MC process. The dimensionless \(\phi\) parameters for Al and Ag are −2 and 0, respectively. The dimensionless \(\kappa\) parameter is 10000.