dxtb.config.Config#
- class dxtb.config.Config(*, file=None, strict=False, exclude=[], method=1, grad=False, batch_mode=0, int_cutoff=50.0, int_driver=0, int_level=2, int_uplo='l', anomaly=False, device=device(type='cpu'), dtype=torch.float32, maxiter=100, mixer=2, mix_guess=True, damp=0.5, damp_init=0.1, damp_dynamic=False, damp_dynamic_factor=0.99, damp_soft_start=True, damp_generations=5, damp_diagonal_offset=0.01, guess=0, scf_mode=0, scp_mode=2, x_atol=0.0001, x_atol_max=1e-05, f_atol=0.0001, force_convergence=False, fermi_etemp=300.0, fermi_maxiter=200, fermi_thresh=None, fermi_partition=0, cache_enabled=False, cache_hcore=False, cache_overlap=False, cache_dipole=False, cache_quadrupole=False, cache_charges=True, cache_coefficients=False, cache_density=False, cache_fock=False, cache_iterations=True, cache_mo_energies=False, cache_occupation=False, cache_potential=False, max_element=86, skip_compat_checks=False)[source]#
Bases:
objectConfiguration of the calculation.
Methods
Create a configuration from command-line arguments.
Create a configuration from a dictionary.
Create a configuration from a JSON file.
Return a dictionary with the configuration information.
Serialize the configuration to a JSON-formatted string.
Attributes
Whether multiple systems or a single one are handled.
Strict mode for SCF configuration.
The input file or directory.
The tight-binding components to exclude from the calculation.
The xTB method to use.
Whether to compute the gradient.
The maximum element number in the system.
Whether to run PyTorch in anomaly detection mode.
The device to use for the calculation.
The data type to use for the calculation.
The cache configuration.
The integral configuration.
The SCF configuration.
- Parameters:
strict (bool)
method (int)
grad (bool)
batch_mode (int)
int_cutoff (float)
int_level (int)
int_uplo (str)
anomaly (bool)
device (device)
dtype (dtype)
maxiter (int)
mix_guess (bool)
damp (float)
damp_init (float)
damp_dynamic (bool)
damp_dynamic_factor (float)
damp_soft_start (bool)
damp_generations (int)
damp_diagonal_offset (float)
x_atol (float)
x_atol_max (float)
f_atol (float)
force_convergence (bool)
fermi_etemp (float)
fermi_maxiter (int)
cache_enabled (bool)
cache_hcore (bool)
cache_overlap (bool)
cache_dipole (bool)
cache_quadrupole (bool)
cache_charges (bool)
cache_coefficients (bool)
cache_density (bool)
cache_fock (bool)
cache_iterations (bool)
cache_mo_energies (bool)
cache_occupation (bool)
cache_potential (bool)
max_element (int)
skip_compat_checks (bool)
- classmethod from_args(args)[source]#
Create a configuration from command-line arguments.
- Return type:
Self- Parameters:
args (Namespace) – The parsed command-line arguments.
- Returns:
The configuration object.
- Return type:
Self
- Parameters:
args (Namespace)
- classmethod from_json(path)[source]#
Create a configuration from a JSON file.
- Return type:
Self- Parameters:
path (PathLike) – The path to the JSON file.
- Returns:
The configuration object.
- Return type:
Self
- Raises:
FileNotFoundError – If the file does not exist.
- Parameters:
- to_json(path=None)[source]#
Serialize the configuration to a JSON-formatted string.
- Returns:
str: A JSON-formatted string representing the configuration.
- property batch_mode: int#
Whether multiple systems or a single one are handled.
The following batch modes are available:
0: Single system
1: Multiple systems with padding
2: Multiple systems with no padding (conformer ensemble)
- Returns:
The batch mode.
- Return type:
-
cache:
ConfigCache# The cache configuration.
-
ints:
ConfigIntegrals# The integral configuration.