dpgen.generator package

Contents

dpgen.generator package#

Subpackages#

Submodules#

dpgen.generator.arginfo module#

dpgen.generator.arginfo.basic_args() list[Argument][source]#
dpgen.generator.arginfo.data_args() list[Argument][source]#
dpgen.generator.arginfo.fp_args() list[Argument][source]#
dpgen.generator.arginfo.fp_style_abacus_args() list[Argument][source]#
dpgen.generator.arginfo.fp_style_amber_diff_args() list[Argument][source]#

Arguments for FP style amber/diff.

Returns:
list[dargs.Argument]

list of amber/diff fp style arguments

dpgen.generator.arginfo.fp_style_cp2k_args() list[Argument][source]#
dpgen.generator.arginfo.fp_style_custom_args() list[Argument][source]#

Arguments for FP style custom.

Returns:
list[dargs.Argument]

list of custom fp style arguments

dpgen.generator.arginfo.fp_style_gaussian_args() list[Argument][source]#

Gaussian fp style arguments.

Returns:
list[dargs.Argument]

list of Gaussian fp style arguments

dpgen.generator.arginfo.fp_style_pwscf_args() list[Argument][source]#

Arguments for FP style pwscf (Quantum Espresso).

Returns:
list[dargs.Argument]

list of pwscf fp style arguments

dpgen.generator.arginfo.fp_style_siesta_args() list[Argument][source]#
dpgen.generator.arginfo.fp_style_variant_type_args() Variant[source]#
dpgen.generator.arginfo.fp_style_vasp_args() list[Argument][source]#
dpgen.generator.arginfo.model_devi_amber_args() list[Argument][source]#

Amber engine arguments.

dpgen.generator.arginfo.model_devi_args() list[Variant][source]#
dpgen.generator.arginfo.model_devi_jobs_args() list[Argument][source]#
dpgen.generator.arginfo.model_devi_jobs_rev_mat_args() Argument[source]#
dpgen.generator.arginfo.model_devi_jobs_template_args() Argument[source]#
dpgen.generator.arginfo.model_devi_lmp_args() list[Argument][source]#
dpgen.generator.arginfo.run_jdata_arginfo() Argument[source]#

Argument information for dpgen run mdata.

Returns:
Argument

argument information

dpgen.generator.arginfo.run_mdata_arginfo() Argument[source]#

Generate arginfo for dpgen run mdata.

Returns:
Argument

arginfo

dpgen.generator.arginfo.training_args() Variant[source]#
dpgen.generator.arginfo.training_args_common() list[Argument][source]#
dpgen.generator.arginfo.training_args_dp() list[Argument][source]#

Traning arguments.

Returns:
list[dargs.Argument]

List of training arguments.

dpgen.generator.run module#

init: data iter:

00.train 01.model_devi 02.vasp 03.data.

dpgen.generator.run.check_bad_box(conf_name, criteria, fmt='lammps/dump')[source]#
dpgen.generator.run.check_cluster(conf_name, fp_cluster_vacuum, fmt='lammps/dump')[source]#
dpgen.generator.run.copy_model(numb_model, prv_iter_index, cur_iter_index, suffix='.pb')[source]#
dpgen.generator.run.detect_batch_size(batch_size, system=None)[source]#
dpgen.generator.run.dump_to_deepmd_raw(dump, deepmd_raw, type_map, fmt='gromacs/gro', charge=None)[source]#
dpgen.generator.run.expand_idx(in_list)[source]#
dpgen.generator.run.expand_matrix_values(target_list, cur_idx=0)[source]#
dpgen.generator.run.find_only_one_key(lmp_lines, key)[source]#
dpgen.generator.run.gen_run(args)[source]#
dpgen.generator.run.get_atomic_masses(atom)[source]#
dpgen.generator.run.get_job_names(jdata)[source]#
dpgen.generator.run.get_nframes(system)[source]#
dpgen.generator.run.get_sys_index(task)[source]#
dpgen.generator.run.make_fp(iter_index, jdata, mdata)[source]#

Select the candidate strutures and make the input file of FP calculation.

Parameters:
iter_indexint

iter index

jdatadict

Run parameters.

mdatadict

Machine parameters.

dpgen.generator.run.make_fp_abacus_scf(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_amber_diff(iter_index: int, jdata: dict)[source]#

Run amber twice to calculate high-level and low-level potential, and then generate difference between them.

Besides AMBER, one needs to install dpamber package, which is avaiable at njzjz/dpamber

Currently, it should be used with the AMBER model_devi driver.

Parameters:
iter_indexint

iter index

jdatadict
Run parameters. The following parameters are used in this method:
mdin_prefixstr

The path prefix to AMBER mdin files

qm_regionlist[str]

AMBER mask of the QM region. Each mask maps to a system.

qm_chargelist[int]

Charge of the QM region. Each charge maps to a system.

high_levelstr

high level method

low_levelstr

low level method

fp_paramsdict
This parameters includes:
high_level_mdinstr

High-level AMBER mdin file. %qm_theory%, %qm_region%, and %qm_charge% will be replace.

low_level_mdinstr

Low-level AMBER mdin file. %qm_theory%, %qm_region%, and %qm_charge% will be replace.

parm7_prefixstr

The path prefix to AMBER PARM7 files

parm7list[str]

List of paths to AMBER PARM7 files. Each file maps to a system.

References

[1]

Development of Range-Corrected Deep Learning Potentials for Fast, Accurate Quantum Mechanical/Molecular Mechanical Simulations of Chemical Reactions in Solution, Jinzhe Zeng, Timothy J. Giese, Şölen Ekesan, and Darrin M. York, Journal of Chemical Theory and Computation 2021 17 (11), 6993-7009

dpgen.generator.run.make_fp_calculation(iter_index, jdata, mdata)[source]#

Make the input file of FP calculation.

Parameters:
iter_indexint

iter index

jdatadict

Run parameters.

mdatadict

Machine parameters.

dpgen.generator.run.make_fp_cp2k(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_custom(iter_index, jdata)[source]#

Make input file for customized FP style.

Convert the POSCAR file to custom format.

Parameters:
iter_indexint

iter index

jdatadict

Run parameters.

dpgen.generator.run.make_fp_gaussian(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_pwmat(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_pwscf(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_siesta(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_task_name(sys_idx, counter)[source]#
dpgen.generator.run.make_fp_vasp(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_vasp_cp_cvasp(iter_index, jdata)[source]#
dpgen.generator.run.make_fp_vasp_incar(iter_index, jdata, nbands_esti=None)[source]#
dpgen.generator.run.make_fp_vasp_kp(iter_index, jdata)[source]#
dpgen.generator.run.make_model_devi(iter_index, jdata, mdata)[source]#
dpgen.generator.run.make_model_devi_conf_name(sys_idx, conf_idx)[source]#
dpgen.generator.run.make_model_devi_task_name(sys_idx, task_idx)[source]#
dpgen.generator.run.make_pwmat_input(jdata, filename)[source]#
dpgen.generator.run.make_train(iter_index, jdata, mdata)[source]#
dpgen.generator.run.make_train_dp(iter_index, jdata, mdata)[source]#
dpgen.generator.run.make_vasp_incar(jdata, filename)[source]#
dpgen.generator.run.make_vasp_incar_ele_temp(jdata, filename, ele_temp, nbands_esti=None)[source]#
dpgen.generator.run.parse_cur_job(cur_job)[source]#
dpgen.generator.run.parse_cur_job_revmat(cur_job, use_plm=False)[source]#
dpgen.generator.run.parse_cur_job_sys_revmat(cur_job, sys_idx, use_plm=False)[source]#
dpgen.generator.run.poscar_natoms(lines)[source]#
dpgen.generator.run.poscar_to_conf(poscar, conf)[source]#
dpgen.generator.run.post_fp(iter_index, jdata)[source]#
dpgen.generator.run.post_fp_abacus_scf(iter_index, jdata)[source]#
dpgen.generator.run.post_fp_amber_diff(iter_index, jdata)[source]#
dpgen.generator.run.post_fp_check_fail(iter_index, jdata, rfailed=None)[source]#
dpgen.generator.run.post_fp_cp2k(iter_index, jdata, rfailed=None)[source]#
dpgen.generator.run.post_fp_custom(iter_index, jdata)[source]#

Post fp for custom fp. Collect data from user-defined output_fn.

Parameters:
iter_indexint

The index of the current iteration.

jdatadict

The parameter data.

dpgen.generator.run.post_fp_gaussian(iter_index, jdata)[source]#
dpgen.generator.run.post_fp_pwmat(iter_index, jdata, rfailed=None)[source]#
dpgen.generator.run.post_fp_pwscf(iter_index, jdata)[source]#
dpgen.generator.run.post_fp_siesta(iter_index, jdata)[source]#
dpgen.generator.run.post_fp_vasp(iter_index, jdata, rfailed=None)[source]#
dpgen.generator.run.post_model_devi(iter_index, jdata, mdata)[source]#
dpgen.generator.run.post_train(iter_index, jdata, mdata)[source]#
dpgen.generator.run.post_train_dp(iter_index, jdata, mdata)[source]#
dpgen.generator.run.revise_by_keys(lmp_lines, keys, values)[source]#
dpgen.generator.run.revise_lmp_input_dump(lmp_lines, trj_freq, model_devi_merge_traj=False)[source]#
dpgen.generator.run.revise_lmp_input_model(lmp_lines, task_model_list, trj_freq, deepmd_version='1', use_ele_temp=0)[source]#
dpgen.generator.run.revise_lmp_input_plm(lmp_lines, in_plm, out_plm='output.plumed')[source]#
dpgen.generator.run.run_fp(iter_index, jdata, mdata)[source]#
dpgen.generator.run.run_fp_inner(iter_index, jdata, mdata, forward_files, backward_files, check_fin, log_file='fp.log', forward_common_files=[])[source]#
dpgen.generator.run.run_iter(param_file, machine_file)[source]#
dpgen.generator.run.run_md_model_devi(iter_index, jdata, mdata)[source]#
dpgen.generator.run.run_model_devi(iter_index, jdata, mdata)[source]#
dpgen.generator.run.run_train(iter_index, jdata, mdata)[source]#
dpgen.generator.run.run_train_dp(iter_index, jdata, mdata)[source]#
dpgen.generator.run.set_version(mdata)[source]#
dpgen.generator.run.update_mass_map(jdata)[source]#