dpgen.generator.lib package#
Submodules#
dpgen.generator.lib.abacus_scf module#
- dpgen.generator.lib.abacus_scf.get_abacus_STRU(STRU)[source]#
Read STRU file and return a dictionary containing the structure information.
- Args:
STRU (str): The path of STRU file.
- Returns:
- dict: A dictionary containing the structure information.
- {
“atom_names”: list of str, “atom_numbs”: list of int, “atom_masses”: list of float, “coords”: np.ndarray, “cells”: np.ndarray, “pp_files”: list of str, “orb_files”: list of str, “dpks_descriptor”: str,
- }
dpgen.generator.lib.calypso_check_outcar module#
dpgen.generator.lib.calypso_run_model_devi module#
dpgen.generator.lib.calypso_run_opt module#
dpgen.generator.lib.cp2k module#
- dpgen.generator.lib.cp2k.calculate_multiplicity(atom_names, atom_types, charge=0)[source]#
Calculate the multiplicity based on atom species, quantities, and system charge.
This function provides a basic heuristic for determining multiplicity: - Even number of electrons -> singlet (multiplicity = 1) - Odd number of electrons -> doublet (multiplicity = 2)
Note: This approach assumes that an odd electron count always results in a doublet state. It does not account for systems with multiple unpaired electrons, which can have higher multiplicities (e.g., triplet, quartet, etc.). Users should be aware of this limitation and use the function accordingly.
- Parameters:
atom_names – List of element symbols.
atom_types – List of atom type indices.
charge – System charge (default: 0).
- Returns:
Multiplicity.
- dpgen.generator.lib.cp2k.iterdict(d, out_list, flag=None, indent=0)[source]#
- Doc:
a recursive expansion of dictionary into cp2k input
- K:
current key
- V:
current value
- D:
current dictionary under expansion
- Flag:
used to record dictionary state. if flag is None,
it means we are in top level dict. flag is a string. :indent: intent for current section.
dpgen.generator.lib.cvasp module#
dpgen.generator.lib.ele_temp module#
dpgen.generator.lib.gaussian module#
dpgen.generator.lib.lammps module#
dpgen.generator.lib.make_calypso module#
dpgen.generator.lib.parse_calypso module#
dpgen.generator.lib.pwmat module#
dpgen.generator.lib.pwscf module#
dpgen.generator.lib.run_calypso module#
calypso as model devi engine: 1. gen_structures 2. analysis 3. model devi.
- dpgen.generator.lib.run_calypso.gen_main(iter_index, jdata, mdata, caly_run_opt_list, gen_idx)[source]#
dpgen.generator.lib.siesta module#
dpgen.generator.lib.utils module#
- dpgen.generator.lib.utils.check_api_version(mdata)[source]#
Check if the API version in mdata is at least 1.0.
- dpgen.generator.lib.utils.symlink_user_forward_files(mdata, task_type, work_path, task_format=None)[source]#
Symlink user-defined forward_common_files Current path should be work_path, such as 00.train.
- Parameters:
- mdatadict
machine parameters
- task_typestr
task_type, such as “train”
- work_pathstr
work_path, such as “iter.000001/00.train”
- task_formatdict
formats of tasks
- Returns:
- None