pymatnext [ --random_seed / s <seed> ] [ --output_file_postfix / -p <postfix> ] [ --max_iter / -i <max iter> ] <params_file>
Do a nested sampling run based on the parameters in <params_file> in toml format.
--random_seed / s <seed>: set a random seed (overriding parameter file)--max_iter / -i <max_iter>: maximum NS iteration (overriding arameter file)--output_file_postfix / -p <postfix>: a suffix to all output files that is added to the parameter file value
By setting different random seeds and output postfix strings, multiple independent runs can be started (for better sampling) without having to modify the parameter file.
-
sampled quantities in
<global.output_file_prefix><output_file_postfix>.NS_samples- JSON format header line, prefixed by
#, describing NS run parameters and quantities in file, for analysis - one line every
<global.sample_interval>NS iterations, with iteration number, NS quantity, and configuration-specific quantities specified in headerextradict item.
- JSON format header line, prefixed by
-
sampled configurations in
<global.output_file_prefix><output_file_postfix>.traj.<filename_suffix>- One configuration in a type-specific format (
extxyzfor atomic configurations) everyglobal.traj_intervalNS iterations
- One configuration in a type-specific format (
-
snapshots
- NS state in
<global.output_file_prefix><output_file_postfix>.iter_<iter>.state.json> - NS configurations in
<global.output_file_prefix><output_file_postfix>.iter_<iter>.configs.<filename_suffix>>
- NS state in
Full featured example of a small system with variable cell, semi-grand-canonical run using LAMMPS internal propagators.
[global]
output_filename_prefix = "EAM_LAMMPS_sGC"
random_seed = 5
max_iter = 50000
stdout_report_interval = 60
snapshot_interval = 50000
[global.step_size_tune]
interval = 1000
[ns]
n_walkers = 280
walk_length = 400
configs_module = "pymatnext.ns_configs.ase_atoms"
[ns.exit_conditions]
module = "pymatnext.loop_exit.Z_of_T"
[ns.exit_conditions.module_kwargs]
T_to_ns_quant = "kB"
T = 5000.0
[configs]
composition = "AlCu"
n_atoms = 16
initial_rand_vol_per_atom = 800.0
initial_rand_min_dist = 0.5
[configs.calculator]
type = "LAMMPS"
[configs.calculator.args]
cmds = ["pair_style eam/alloy", "pair_coeff * * <PATH_TO_POTENTIALS>/AlCu_Zhou04.eam.alloy Al Cu"]
types.13 = 1
types.29 = 2
[configs.walk]
gmc_traj_len = 8
cell_traj_len = 4
type_traj_len = 8
gmc_proportion = 1.0
cell_proportion = 1.5
type_proportion = 1.0
[configs.walk.cell]
[configs.walk.cell.submove_probabilities]
volume = 0.33
shear = 0.33
stretch = 0.33
[configs.walk.type]
sGC = true
mu.13 = 0.1
mu.29 = 0.2
Hopefully section and key names are self explanatory.
- All intervals are in NS iterations, except
stdout_report_interval_swhich is in seconds configs.calculator.typecan be"ASE"or"LAMMPS"- if
"LAMMPS",argsconsists ofcmds, with LAMMPS commands, andtypesdict (one key for each species) - if
"ASE",argsconsists ofmodulekey with module that defines acalcsymbol containing anase.calculators.Calculatorobject
- if
configs.walk.*_traj_lencontrols the number of steps in a walk block of that typeconfigs.walk.*_proportioncontrols the fraction of steps overall that are used for that type of move- If
config.walk.type.sGC = true, a dict ofmuvalues, one per species, is required. - There are position, cell, and atom-type walks, with associated step size parameters that are auto-tuned. Default values depends on
an overall volume scale given by
initial_rand_vol_per_atomand corresponding length scale given by its cube root.- Maxima are in
[configs.walk.max_step_size]section. Defaults for first three are negative.pos_gmc_each_atom: distance (typically A) that each atom should typically make in GMC step. If negative, used as multiplier for length scale.cell_volume_per_atom: change in volume (typically A^3), will also be scaled by number of atoms. If negative, used as multiplier for volume scale.cell_shear_per_rt3_atom: cell shear magnitude (typically A) which multiplies normalized cell vectors, will also be scaled by cube root of number of atoms. If negative used as multiplier for length scale.cell_stretch: cell stretch, fractional (i.e. strain)
- Initial values with same key names are in
[configs.walk.step_size]section. Any negative values are replaced with half the corresponding maximum.
- Maxima are in