Configuration Options
We store all configuration options in a nested data structure derived from pydantic models. This provides parsing from configuration files, default management, input validation, and autocompletion (both for code as well as for config-files).
To get a schema of all possible config options and there defaults refer to sample_configs/config_schema.json, which can also be used in IDEs to provide autocompletion when writing config files.
The most common config-options are listed in the table below, follwed by a full documentation of the entire config datastructure:
Option |
Sub-options |
Description |
---|---|---|
physical |
name |
Name of the molecule to be calculated, e.g. N2, CO, etc. For several small molecules this automatically popoulates the geometry, nuclear charges, electron number and spin |
R, Z, n_electrons, n_up |
Physical properties (e.g. geometry) of your system in atomic units (bohr) |
|
model |
name |
Type of model to use, e.g. “dpe1” (arxiv:2105.08351), “dpe4” (arxiv:2205.09438), “ferminet”. This sets all model-related defaults and allows subsequent changes to be made from there. |
features.use_local_coordinates |
Enable/disable a local coordinate system for each ion |
|
features.use_distance_features, features.use_el_el_differences, features.use_el_ion_differences |
Choose input features to be fed into embedding: Distances (scalar) and/or differences (3D vectors) |
|
embedding.name |
Type of embedding to use to use, e.g. “dpe1”, “dpe4”, “ferminet” |
|
embedding.n_iterations |
Number of embedding iterations (=embedding network depth) |
|
embedding.n_hidden_one_el, embedding.n_hidden_one_el |
For FermiNet, DeeepErwin: Number of hidden neurons in one-electron and two-electron streams |
|
orbitals.n_determinants |
Number of determinants to use for building the wavefunction |
|
orbitals.enevelope_orbitals |
Config-options related to FermiNet-like exponential envelope orbitals |
|
orbitals.baseline_orbitals |
Config-options related to PauliNet-like orbitals from a baseline calculation (e.g. Hartree-Fock) |
|
optimization |
optimizer.name |
Type of optimizer, e.g. “adam”, “rmsprop”, “kfac”, “kfac_adam” |
learning_rate |
Initial learning-rate during optimization. May be modified during optimization by the LR-schedule (optimization.schedule). |
|
n_epochs |
Number of epochs to train the wavefunction model. In each epoch all n_walkers walkers are updated using MCMC and then optimized batch-by-batch. |
|
mcmc.n_walkers, mcmc.n_inter_steps, mcmc. … |
Settings for Markov-Chain Monte Carlo (MCMC) sampling during wavefunction optimization. Analogous settings can be found within evaluation and pre_training. |
|
evaluation |
n_epochs |
Number of evaluation steps after the wavefunction optimization |
pre_training |
n_epochs |
Number of supervised pre-training steps to take before variational optimization |
logging |
wandb.entity, wandb.project |
When set, this enables logging of the experiment to Weights&Biases. Set logging.wandb=None to disable W&B-logging (default). |
computation |
n_devices |
Number of GPUs to use for parallelization |
require_gpu |
Abort computation when no GPU is found, instead of computing on CPUs |
|
reuse |
path |
Path to a directory containing a previously successfully finished wavefunction optimization to use as initializer for this experiment. |
DeepErwin hyperparameter and configuration management.
- pydantic model deeperwin.configuration.ConfigBaseclass[source]
Base class for all config models
- classmethod load(file) deeperwin.configuration.ConfigBaseclass [source]
- pydantic model deeperwin.configuration.InitializationConfig[source]
- Fields
- field bias_scale: float = 0.0
- field weight_distribution: Literal['normal', 'uniform'] = 'uniform'
- field weight_scale: Literal['glorot', 'glorot-input'] = 'glorot'
- pydantic model deeperwin.configuration.EmbeddingConfigFermiNet[source]
-
- field emb_dim: int = 128
Embedding dimension for the electron-electron and electron-ion SchNet convolution features
- field initialization: deeperwin.configuration.InitializationConfig = InitializationConfig(bias_scale=0.0, weight_scale='glorot', weight_distribution='uniform')
How to initialize weights and biases
Number of hidden neurons per layer for the electron-ion stream in the FermiNet network
Number of hidden neurons per layer for the one electron stream in the FermiNet network
Number of hidden neurons per layer for the electron-electron stream in the FermiNet network
- field n_iterations: Optional[int] = 4
Number iterations to combine features of different particle streams into the one electron stream
- field name: Literal['ferminet'] = 'ferminet'
- field sum_schnet_features: bool = True
Sum electron-electron and electron-ion SchNet convolution features together
- field use_average_h_one: bool = True
Whether to include the average embedding of all electrons as a feature into the 1-el-stream
- field use_average_h_two: bool = True
Use the average over the electron-electron stream output as additional feature for the one electron stream
- field use_el_ion_stream: bool = False
Whether to generate a second stream of interactions between electrons and ions
- field use_h_one: bool = True
Use the electron stream output as features for its own stream in the next iteration
- field use_h_two_same_diff: bool = False
Split the electron-electron stream into same- and different spin channel. Effectively turning one stream into two seperate streams
- field use_linear_out: bool = False
Use linear layer for mapping particle features to same dimension
- field use_schnet_features: bool = False
Use SchNet convolution features as input to the one electron stream
- field use_w_mapping: bool = False
Apply neural network for inter-particle features to further process before computing SchNet convolution
- pydantic model deeperwin.configuration.EmbeddingConfigDeepErwin4[source]
DO NOT INTRODUCE NEW FIELDS HERE. This class is only used to provide alternative defaults
- Fields
Number of hidden neurons per layer for the electron-ion stream in the FermiNet network
Number of hidden neurons per layer for the one electron stream in the FermiNet network
Number of hidden neurons per layer for the electron-electron stream in the FermiNet network
- field n_iterations: int = 4
Number iterations to combine features of different particle streams into the one electron stream
- field name: Literal['dpe4'] = 'dpe4'
- field use_el_ion_stream: bool = True
Whether to generate a second stream of interactions between electrons and ions
- pydantic model deeperwin.configuration.EmbeddingConfigDeepErwin1[source]
- Fields
- field deep_w = False
Whether to process inter-particle features further or to use for every SchNet iteration the inter-particle distances
- field embedding_dim: int = 64
Dimensionality of embedding vectors, including intermediate network widths.
Number of hidden neurons per layer of the g-Network within SchNet. The g-network applies a final non-linear transformation at the end of each SchNet round. If not specified the width as specified in net_width and depth = net_depth - 1 is used
Number of hidden neurons per layer of the h-Network within SchNet. The h-network takes the embedding of the previous iteration as input and computes a new embedding per particle, which is then weighted using the w-networks. If not specified the width/depth as specified in net_width/net_depth is used
Number of hidden neurons per layer of the w-Network within SchNet. The w-network takes pairwise features between particles as inputs and calculates the weight of each embedding dimension as output. If not specified the width/depth as specified in net_width/net_depth is used
- field n_iterations: int = 2
Number of embedding iterations for SchNet
- field name: Literal['dpe1'] = 'dpe1'
Identifier for this model-part. Fixed.
- field one_el_input: bool = False
- field use_res_net: bool = False
Whether to use residuals for the networks
- pydantic model deeperwin.configuration.CuspCorrectionConfig[source]
-
- field cusp_type: Literal['mo', 'ao'] = 'mo'
Mode how to calculate cusp-corrected orbitals. ‘ao’ computes a cusp correction for each atomic orbital (i.e. for each basis function), ‘mo’ computes a cusp correction for each molecular orbital (i.e. each solution of the HF-calculation). For atoms both cusp_types should be equivalent, but for molecules the simpler ‘ao’ cusps can in principle not correctly model the cusps that arise from an atomic wavefunction having a finite contribution at a different nucleus.
- field r_cusp_el_ion_scale: float = 1.0
Scaling parameter for the electron-ion cusp corrections. No cusp correction is applied outside a radius
r_cusp_el_ion_scale / Z
- field use: bool = True
- pydantic model deeperwin.configuration.CASSCFConfig[source]
- Fields
- field basis_set: str = '6-311G'
Basis set to use for the Hartree-Fock / CASSCF calculation. See the documentation of pySCF for all available basis-sets.
- field cusps: Optional[deeperwin.configuration.CuspCorrectionConfig] = CuspCorrectionConfig(use=True, cusp_type='mo', r_cusp_el_ion_scale=1.0)
Settings for the correction of wavefunction cusps when particles come close to each other
- field name: Literal['casscf'] = 'casscf'
Identifier of the baseline calculation. Fixed.
- field only_hf: bool = False
Only as HF orbitals as baseline method
- pydantic model deeperwin.configuration.InputFeatureConfig[source]
- Fields
- field concatenate_el_ion_features: bool [Required]
Whether to use concatenated electron-ion features as initialization for h_one; breaks equivariance
- field distance_feature_powers: List[int] [Required]
To calculate the embeddings, pairwise distances between particles are converted into input feature vectors and then fed into the embedding network. These input feature vectors partially consist of radial-basis-functions and monomials of the distance (i.e. r^n). This list specifies which exponents should be used to create the distance monomials. Note, that using powers of -1 or +1 can lead to cusps in the input features, which may or may not be desirable.
- field eps_dist_feat: float [Required]
Epsilon to be used when calculating pairwise features with negative exponent n < 0. Feature vector is calculated as \(\frac{1}{dist^{-n} + eps}\)
Number of hidden nodes for generation of one-electron-features from el-ion-features
- field n_ion_features: int [Required]
Embed nuclear charges into vectors of length n_ion_faetures
- field n_one_el_features: int [Required]
Generate one-electron features as a sum of el-ion features
- field n_rbf_features: int [Required]
Number of radial basis functions to use as pairwise fature vector
- field use_distance_features: bool [Required]
Whether to include the absolute value of the distance (and powers of this distance) as input feature
- field use_el_el_differences: bool [Required]
Whether to include electron-electron differences as input features
- field use_el_el_spin: bool [Required]
Whether to include additional information about the spin configurations of the elctrons
- field use_el_ion_differences: bool [Required]
Whether to include electron-ion differences as input features
- field use_local_coordinates: bool [Required]
Whether to construct local coordinate systems by diagonalizing the density matrix, leading to equivariant difference featres
- field use_rbf_features: bool [Required]
Whether to build distance features using gaussian functions of the distances
- pydantic model deeperwin.configuration.InputFeatureConfigDPE1[source]
DO NOT INTRODUCE NEW FIELDS HERE. This class is only used to provide alternative defaults
- Fields
- field concatenate_el_ion_features: bool = False
Whether to use concatenated electron-ion features as initialization for h_one; breaks equivariance
- field distance_feature_powers: List[int] = [-1]
To calculate the embeddings, pairwise distances between particles are converted into input feature vectors and then fed into the embedding network. These input feature vectors partially consist of radial-basis-functions and monomials of the distance (i.e. r^n). This list specifies which exponents should be used to create the distance monomials. Note, that using powers of -1 or +1 can lead to cusps in the input features, which may or may not be desirable.
- field eps_dist_feat: float = 0.01
Epsilon to be used when calculating pairwise features with negative exponent n < 0. Feature vector is calculated as \(\frac{1}{dist^{-n} + eps}\)
Number of hidden nodes for generation of one-electron-features from el-ion-features
- field n_one_el_features: int = 0
Generate one-electron features as a sum of el-ion features
- field n_rbf_features: int = 32
Number of radial basis functions to use as pairwise fature vector
- field name: Literal['dpe1'] = 'dpe1'
- field use_distance_features: bool = True
Whether to include the absolute value of the distance (and powers of this distance) as input feature
- field use_el_el_differences: bool = False
Whether to include electron-electron differences as input features
- field use_el_el_spin: bool = False
Whether to include additional information about the spin configurations of the elctrons
- field use_el_ion_differences: bool = False
Whether to include electron-ion differences as input features
- field use_local_coordinates: bool = False
Whether to construct local coordinate systems by diagonalizing the density matrix, leading to equivariant difference featres
- field use_rbf_features: bool = True
Whether to build distance features using gaussian functions of the distances
- pydantic model deeperwin.configuration.InputFeatureConfigFermiNet[source]
DO NOT INTRODUCE NEW FIELDS HERE. This class is only used to provide alternative defaults
- Fields
- field concatenate_el_ion_features: bool = True
Whether to use concatenated electron-ion features as initialization for h_one; breaks equivariance
- field distance_feature_powers: List[int] = [1]
To calculate the embeddings, pairwise distances between particles are converted into input feature vectors and then fed into the embedding network. These input feature vectors partially consist of radial-basis-functions and monomials of the distance (i.e. r^n). This list specifies which exponents should be used to create the distance monomials. Note, that using powers of -1 or +1 can lead to cusps in the input features, which may or may not be desirable.
- field eps_dist_feat: float = 0.01
Epsilon to be used when calculating pairwise features with negative exponent n < 0. Feature vector is calculated as \(\frac{1}{dist^{-n} + eps}\)
Number of hidden nodes for generation of one-electron-features from el-ion-features
- field n_one_el_features: int = 0
Generate one-electron features as a sum of el-ion features
- field n_rbf_features: int = 0
Number of radial basis functions to use as pairwise fature vector
- field name: Literal['ferminet'] = 'ferminet'
- field use_distance_features: bool = True
Whether to include the absolute value of the distance (and powers of this distance) as input feature
- field use_el_el_differences: bool = True
Whether to include electron-electron differences as input features
- field use_el_el_spin: bool = False
Whether to include additional information about the spin configurations of the elctrons
- field use_el_ion_differences: bool = True
Whether to include electron-ion differences as input features
- field use_local_coordinates: bool = False
Whether to construct local coordinate systems by diagonalizing the density matrix, leading to equivariant difference featres
- field use_rbf_features: bool = False
Whether to build distance features using gaussian functions of the distances
- pydantic model deeperwin.configuration.InputFeatureConfigDPE4[source]
DO NOT INTRODUCE NEW FIELDS HERE. This class is only used to provide alternative defaults
- field name: Literal['dpe4'] = 'dpe4'
- field use_el_el_differences: bool = False
Whether to include electron-electron differences as input features
- field use_local_coordinates: bool = True
Whether to construct local coordinate systems by diagonalizing the density matrix, leading to equivariant difference featres
- pydantic model deeperwin.configuration.EnvelopeOrbitalsConfig[source]
- Fields
- field envelope_type: Literal['isotropic_exp'] = 'isotropic_exp'
Which enveolope to use for the backflow-add term
- field initialization: Literal['constant', 'analytical'] = 'constant'
Use a least-squares fit to initialized the scale- and decay-parameters for the envelopes instead of constant intialization
List of ints, specifying the number of hidden units per layer in the backflow-factor-network.
- field use_bias: bool = False
Enable / disable bias terms for the final layer of the backflow-add network
- pydantic model deeperwin.configuration.BaselineOrbitalsConfig[source]
- Fields
- field baseline: deeperwin.configuration.CASSCFConfig = CASSCFConfig(name='casscf', basis_set='6-311G', cusps=CuspCorrectionConfig(use=True, cusp_type='mo', r_cusp_el_ion_scale=1.0), only_hf=False)
Config-options for the underlying baseline calculation, typically a Complete-Active-Space Self-Consistent-Field (CASSCF) Calculation
- field bf_factor_constant_bias: float = 1.0
Bias to apply to the output of the backflow factor, i.e. phi = phi_HF x (backflow + bias). If bias is set to 1.0, NN-output of zero, yields to original HF-orbitals
List of ints, specifying the number of hidden units per layer in the backflow-factor-network. If not provided, the width and depth set by net_width and net_depth are used.
List of ints, specifying the number of hidden units per layer in the backflow-shift-network. If not provided, the width and depth set by net_width and net_depth are used.
- field output_shift: Literal[1, 3] = 1
Dimensionality of the output for the backflow-shift network. Can either be scalar or 3-dimensional. Note that only a scalar output ensures rotational equivariance.
- field register_scale = False
Whether to register the parameterst that scale the output of the backflow networks as parameters for KFAC optimization
- field use_bf_factor: bool = True
Enable the backflow-factor, i.e. multiply the CASSCF orbitals with the output of a neural network
- field use_bf_factor_bias: bool = True
Enable / disable bias terms for the final layer of the backflow-factor network
- field use_bf_shift: bool = True
Enable the backflow-shift, i.e. shift all electron coordinates by a neural network before calculating the CASSCF orbitals
- field use_trainable_scales: bool = True
Scale the network outputs by a trainable float. Clever initialization of this scale can speed-up training, but in principle also introduces redundant parameters.
- field use_trainable_shift_decay_radius: bool = True
Backflow-shift decays to 0 close the the nuclei to ensure correct cusp conditions. This flag specifies whether the radius in which the shift decays is a trainable parameter or fixed.
- pydantic model deeperwin.configuration.OrbitalsConfig[source]
- Fields
- field baseline_orbitals: Optional[deeperwin.configuration.BaselineOrbitalsConfig] = None
Orbitals containing a baked-in baselin model (e.g. Hartree-Fock or CASSCF) which gets modified by 2 neural networks: backflow shifts and backflow factors
- field envelope_orbitals: Optional[deeperwin.configuration.EnvelopeOrbitalsConfig] = EnvelopeOrbitalsConfig(envelope_type='isotropic_exp', n_hidden=[], use_bias=False, initialization='constant')
Obritals containing only a simple, parametrized envelope, multiplied by a neural network
- field n_determinants: int = 32
Number of determinants in the wavefunction model
- field use_full_det: bool = True
Whether to use full n_el x n_el determinants, or whether to assume a block diagonal structure, represented by det(n_up x n_up)*det(n_dn x n_dn)
- pydantic model deeperwin.configuration.OrbitalsConfigFermiNet[source]
- Fields
- field baseline_orbitals: Optional[deeperwin.configuration.BaselineOrbitalsConfig] = None
Orbitals containing a baked-in baselin model (e.g. Hartree-Fock or CASSCF) which gets modified by 2 neural networks: backflow shifts and backflow factors
- field envelope_orbitals: Optional[deeperwin.configuration.EnvelopeOrbitalsConfig] = EnvelopeOrbitalsConfig(envelope_type='isotropic_exp', n_hidden=[], use_bias=False, initialization='constant')
Obritals containing only a simple, parametrized envelope, multiplied by a neural network
- pydantic model deeperwin.configuration.OrbitalsConfigDPE1[source]
- Fields
- field baseline_orbitals: Optional[deeperwin.configuration.BaselineOrbitalsConfig] = BaselineOrbitalsConfig(baseline=CASSCFConfig(name='casscf', basis_set='6-311G', cusps=CuspCorrectionConfig(use=True, cusp_type='mo', r_cusp_el_ion_scale=1.0), only_hf=False), use_trainable_scales=True, use_bf_shift=True, use_trainable_shift_decay_radius=True, n_hidden_bf_factor=[40, 20, 20], n_hidden_bf_shift=[40, 40], use_bf_factor=True, use_bf_factor_bias=True, bf_factor_constant_bias=1.0, output_shift=1, register_scale=False)
Orbitals containing a baked-in baselin model (e.g. Hartree-Fock or CASSCF) which gets modified by 2 neural networks: backflow shifts and backflow factors
- field envelope_orbitals: Optional[deeperwin.configuration.EnvelopeOrbitalsConfig] = None
Obritals containing only a simple, parametrized envelope, multiplied by a neural network
- pydantic model deeperwin.configuration.JastrowConfig[source]
-
- field differentiate_spins: bool = False
Use separate functions for J(spin_up) and J(spin_down)
List of ints, specifying the number of hidden units per layer in the jastrow-network. If not provided, the width and depth set by net_width and net_depth are used.
- field use: bool = True
- pydantic model deeperwin.configuration.MLPConfig[source]
- Fields
- field activation: Literal['tanh', 'silu', 'elu', 'relu'] = 'tanh'
- field init_bias_scale: float = 0.0
- field init_weights_distribution: Literal['normal', 'truncated_normal', 'uniform'] = 'uniform'
- field init_weights_scale: Literal['fan_in', 'fan_out', 'fan_avg'] = 'fan_avg'
- pydantic model deeperwin.configuration.ModelConfig[source]
Configuration for the primary wavefunction model, which maps electron coordinate to psi
- Fields
- field embedding: Optional[Union[deeperwin.configuration.EmbeddingConfigDeepErwin4, deeperwin.configuration.EmbeddingConfigFermiNet, deeperwin.configuration.EmbeddingConfigDeepErwin1]] [Required]
Config-options for mapping symmetrized input features to high-dimensional embeddings of electrons
- field features: deeperwin.configuration.InputFeatureConfig [Required]
Config-options for mapping raw inputs (r,R,Z) to some symmetrized input features
- field jastrow: Optional[deeperwin.configuration.JastrowConfig] [Required]
Enable the jastrow-factor, i.e. multiple the total wavefunction by the output of a global neural network
- field mlp: deeperwin.configuration.MLPConfig = MLPConfig(activation='tanh', init_bias_scale=0.0, init_weights_scale='fan_avg', init_weights_distribution='uniform')
How to build multi-layer-perceptrons: Activation and how to initialize weights and biases
- field orbitals: deeperwin.configuration.OrbitalsConfig [Required]
Config-options for computing orbitals from embedding vectors of electrons
- field use_el_el_cusp_correction: bool [Required]
Explicit, additive el-el-cusp correction
- pydantic model deeperwin.configuration.ModelConfigDeepErwin1[source]
DO NOT INTRODUCE NEW FIELDS HERE. This class is only used to provide alternative defaults
- Fields
- field embedding: Optional[Union[deeperwin.configuration.EmbeddingConfigDeepErwin1, deeperwin.configuration.EmbeddingConfigDeepErwin4, deeperwin.configuration.EmbeddingConfigFermiNet]] = EmbeddingConfigDeepErwin1(name='dpe1', embedding_dim=64, n_iterations=2, n_hidden_w=[40, 40], n_hidden_h=[40, 40], n_hidden_g=[40], use_res_net=False, one_el_input=False, deep_w=False, use_linear_layer_w=True)
Config-options for mapping symmetrized input features to high-dimensional embeddings of electrons
- field features: Union[deeperwin.configuration.InputFeatureConfigDPE1, deeperwin.configuration.InputFeatureConfigFermiNet] = InputFeatureConfigDPE1(use_rbf_features=True, n_rbf_features=32, use_distance_features=True, use_el_ion_differences=False, use_el_el_differences=False, use_el_el_spin=False, use_local_coordinates=False, n_one_el_features=0, n_ion_features=0, concatenate_el_ion_features=False, n_hidden_one_el_features=[], eps_dist_feat=0.01, distance_feature_powers=[-1], name='dpe1')
Config-options for mapping raw inputs (r,R,Z) to some symmetrized input features
- field jastrow: Optional[deeperwin.configuration.JastrowConfig] = JastrowConfig(use=True, n_hidden=[40, 40], differentiate_spins=False)
Enable the jastrow-factor, i.e. multiple the total wavefunction by the output of a global neural network
- field name: Literal['dpe1'] = 'dpe1'
- field orbitals: deeperwin.configuration.OrbitalsConfigDPE1 = OrbitalsConfigDPE1(baseline_orbitals=BaselineOrbitalsConfig(baseline=CASSCFConfig(name='casscf', basis_set='6-311G', cusps=CuspCorrectionConfig(use=True, cusp_type='mo', r_cusp_el_ion_scale=1.0), only_hf=False), use_trainable_scales=True, use_bf_shift=True, use_trainable_shift_decay_radius=True, n_hidden_bf_factor=[40, 20, 20], n_hidden_bf_shift=[40, 40], use_bf_factor=True, use_bf_factor_bias=True, bf_factor_constant_bias=1.0, output_shift=1, register_scale=False), envelope_orbitals=None, n_determinants=20, use_full_det=False)
Config-options for computing orbitals from embedding vectors of electrons
- pydantic model deeperwin.configuration.ModelConfigDeepErwin4[source]
DO NOT INTRODUCE NEW FIELDS HERE. This class is only used to provide alternative defaults
- Fields
- field embedding: Optional[Union[deeperwin.configuration.EmbeddingConfigDeepErwin4, deeperwin.configuration.EmbeddingConfigFermiNet, deeperwin.configuration.EmbeddingConfigDeepErwin1]] = EmbeddingConfigDeepErwin4(name='dpe4', n_hidden_one_el=[256, 256, 256, 256], n_hidden_two_el=[32, 32, 32], n_hidden_el_ions=[32, 32, 32], n_iterations=4, use_el_ion_stream=True, use_average_h_one=True, initialization=InitializationConfig(bias_scale=0.0, weight_scale='glorot', weight_distribution='uniform'), use_average_h_two=False, use_h_one=True, use_h_two_same_diff=True, use_schnet_features=True, sum_schnet_features=False, emb_dim=32, use_linear_out=False, use_w_mapping=True)
Config-options for mapping symmetrized input features to high-dimensional embeddings of electrons
- field features: Union[deeperwin.configuration.InputFeatureConfigDPE4, deeperwin.configuration.InputFeatureConfigFermiNet, deeperwin.configuration.InputFeatureConfigDPE1] = InputFeatureConfigDPE4(use_rbf_features=False, n_rbf_features=0, use_distance_features=True, use_el_ion_differences=True, use_el_el_differences=False, use_el_el_spin=False, use_local_coordinates=True, n_one_el_features=0, n_ion_features=32, concatenate_el_ion_features=True, n_hidden_one_el_features=[], eps_dist_feat=0.01, distance_feature_powers=[1], name='dpe4')
Config-options for mapping raw inputs (r,R,Z) to some symmetrized input features
- field jastrow: Optional[deeperwin.configuration.JastrowConfig] = None
Enable the jastrow-factor, i.e. multiple the total wavefunction by the output of a global neural network
- field name: Literal['dpe4'] = 'dpe4'
- field orbitals: deeperwin.configuration.OrbitalsConfigFermiNet = OrbitalsConfigFermiNet(baseline_orbitals=None, envelope_orbitals=EnvelopeOrbitalsConfig(envelope_type='isotropic_exp', n_hidden=[], use_bias=False, initialization='constant'), n_determinants=32, use_full_det=True)
Config-options for computing orbitals from embedding vectors of electrons
- field use_el_el_cusp_correction: bool = False
Explicit, additive el-el-cusp correction
- pydantic model deeperwin.configuration.ModelConfigFermiNet[source]
DO NOT INTRODUCE NEW FIELDS HERE. This class is only used to provide alternative defaults
- Fields
- field embedding: Optional[Union[deeperwin.configuration.EmbeddingConfigFermiNet, deeperwin.configuration.EmbeddingConfigDeepErwin4, deeperwin.configuration.EmbeddingConfigDeepErwin1]] = EmbeddingConfigFermiNet(name='ferminet', n_hidden_one_el=[256, 256, 256, 256], n_hidden_two_el=[32, 32, 32], n_hidden_el_ions=[32, 32, 32], n_iterations=4, use_el_ion_stream=False, use_average_h_one=True, initialization=InitializationConfig(bias_scale=0.0, weight_scale='glorot', weight_distribution='uniform'), use_average_h_two=True, use_h_one=True, use_h_two_same_diff=False, use_schnet_features=False, sum_schnet_features=True, emb_dim=128, use_linear_out=False, use_w_mapping=False)
Config-options for mapping symmetrized input features to high-dimensional embeddings of electrons
- field features: Union[deeperwin.configuration.InputFeatureConfigFermiNet, deeperwin.configuration.InputFeatureConfigDPE1] = InputFeatureConfigFermiNet(use_rbf_features=False, n_rbf_features=0, use_distance_features=True, use_el_ion_differences=True, use_el_el_differences=True, use_el_el_spin=False, use_local_coordinates=False, n_one_el_features=0, n_ion_features=32, concatenate_el_ion_features=True, n_hidden_one_el_features=[], eps_dist_feat=0.01, distance_feature_powers=[1], name='ferminet')
Config-options for mapping raw inputs (r,R,Z) to some symmetrized input features
- field jastrow: Optional[deeperwin.configuration.JastrowConfig] = None
Enable the jastrow-factor, i.e. multiple the total wavefunction by the output of a global neural network
- field name: Literal['ferminet'] = 'ferminet'
- field orbitals: deeperwin.configuration.OrbitalsConfigFermiNet = OrbitalsConfigFermiNet(baseline_orbitals=None, envelope_orbitals=EnvelopeOrbitalsConfig(envelope_type='isotropic_exp', n_hidden=[], use_bias=False, initialization='constant'), n_determinants=32, use_full_det=True)
Config-options for computing orbitals from embedding vectors of electrons
- pydantic model deeperwin.configuration.MCMCSimpleProposalConfig[source]
-
- field name: Literal['normal', 'cauchy', 'normal_one_el'] = 'normal'
- pydantic model deeperwin.configuration.MCMCLangevinProposalConfig[source]
-
- field langevin_scale: float = 1.0
- field name: Literal['langevin'] = 'langevin'
- field r_max: float = 2.0
- field r_min: float = 0.2
- pydantic model deeperwin.configuration.LocalStepsizeProposalConfig[source]
Config for a local stepsize proposal rule for MCMC. Stepsize depends on distance to closest nuclei
- field name: Literal['local', 'local_one_el'] = 'local'
- field r_max: float = 1
Max stepsize for electron move
- field r_min: float = 0.1
Minimal stepsize for electron move
- pydantic model deeperwin.configuration.MCMCConfig[source]
Config for Markov-Chain-Monte-Carlo integration
- Fields
- field max_age: int [Required]
Maximum number of MCMC steps for which a walker can reject updates during optimization. After having rejected an update max_age times, the walkers is forced to accepet, to avoid getting stuck
- field max_stepsize_scale: float = 1.0
Maximum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field min_stepsize_scale: float = 0.01
Minimum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field n_burn_in: int [Required]
Number of MCMC steps before starting optimization
- field n_inter_steps: int [Required]
Number of MCMC steps between epochs
- field n_walkers: int = 2048
Number of walkers for optimization
- field proposal: Union[deeperwin.configuration.MCMCSimpleProposalConfig, deeperwin.configuration.LocalStepsizeProposalConfig, deeperwin.configuration.MCMCLangevinProposalConfig] = MCMCSimpleProposalConfig(name='normal')
Type of proposal function to use for MCMC steps
- field stepsize_update_interval: int [Required]
Number of steps after which the step-size is adjusted
- field target_acceptance_rate: float = 0.5
Acceptance-rate that the MCMC-runner is trying to achieve by modifying the stepsize
- pydantic model deeperwin.configuration.MCMCConfigPreTrain[source]
- Fields
- field max_age: int = 20
Maximum number of MCMC steps for which a walker can reject updates during optimization. After having rejected an update max_age times, the walkers is forced to accepet, to avoid getting stuck
- field max_stepsize_scale: float = 1.0
Maximum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field min_stepsize_scale: float = 0.01
Minimum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field n_burn_in: int = 0
Number of MCMC steps before starting optimization
- field n_inter_steps: int = 1
Number of MCMC steps between epochs
- field n_walkers: int = 2048
Number of walkers for optimization
- field proposal: Union[deeperwin.configuration.MCMCSimpleProposalConfig, deeperwin.configuration.LocalStepsizeProposalConfig, deeperwin.configuration.MCMCLangevinProposalConfig] = MCMCSimpleProposalConfig(name='normal')
Type of proposal function to use for MCMC steps
- field stepsize_update_interval: int = 1000
Number of steps after which the step-size is adjusted
- field target_acceptance_rate: float = 0.5
Acceptance-rate that the MCMC-runner is trying to achieve by modifying the stepsize
- pydantic model deeperwin.configuration.MCMCConfigOptimization[source]
- Fields
- field max_age: int = 20
Maximum number of MCMC steps for which a walker can reject updates during optimization. After having rejected an update max_age times, the walkers is forced to accepet, to avoid getting stuck
- field max_stepsize_scale: float = 1.0
Maximum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field min_stepsize_scale: float = 0.01
Minimum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field n_burn_in: int = 1000
Number of MCMC steps before starting optimization
- field n_inter_steps: int = 20
Number of MCMC steps between epochs
- field n_walkers: int = 2048
Number of walkers for optimization
- field proposal: Union[deeperwin.configuration.MCMCSimpleProposalConfig, deeperwin.configuration.LocalStepsizeProposalConfig, deeperwin.configuration.MCMCLangevinProposalConfig] = MCMCSimpleProposalConfig(name='normal')
Type of proposal function to use for MCMC steps
- field stepsize_update_interval: int = 100
Number of steps after which the step-size is adjusted
- field target_acceptance_rate: float = 0.5
Acceptance-rate that the MCMC-runner is trying to achieve by modifying the stepsize
- pydantic model deeperwin.configuration.MCMCConfigEvaluation[source]
- Fields
- field max_age: int = 100
Maximum number of MCMC steps for which a walker can reject updates during optimization. After having rejected an update max_age times, the walkers is forced to accepet, to avoid getting stuck
- field max_stepsize_scale: float = 1.0
Maximum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field min_stepsize_scale: float = 0.01
Minimum stepsize. For spatially adaptive stepsize-schemes this only defines a factor which may be modified by the adaptive scheme
- field n_burn_in: int = 500
Number of MCMC steps before starting optimization
- field n_inter_steps: int = 20
Number of MCMC steps between epochs
- field n_walkers: int = 2048
Number of walkers for optimization
- field proposal: Union[deeperwin.configuration.MCMCSimpleProposalConfig, deeperwin.configuration.LocalStepsizeProposalConfig, deeperwin.configuration.MCMCLangevinProposalConfig] = MCMCSimpleProposalConfig(name='normal')
Type of proposal function to use for MCMC steps
- field stepsize_update_interval: int = 100
Number of steps after which the step-size is adjusted
- field target_acceptance_rate: float = 0.5
Acceptance-rate that the MCMC-runner is trying to achieve by modifying the stepsize
- pydantic model deeperwin.configuration.ClippingConfig[source]
- Fields
- field center: Literal['mean', 'median'] = 'mean'
- field clip_by: float = 5.0
- field from_previous_step: bool = True
- field name: Literal['hard', 'tanh'] = 'tanh'
- field width_metric: Literal['std', 'mae'] = 'std'
- pydantic model deeperwin.configuration.ConstantLRSchedule[source]
- Fields
- field name: Literal['fixed'] = 'fixed'
- pydantic model deeperwin.configuration.InverseLRScheduleConfig[source]
-
- field decay_time: float = 6000.0
- field name: Literal['inverse'] = 'inverse'
- pydantic model deeperwin.configuration.StandardOptimizerConfig[source]
- Fields
- field learning_rate: float = 0.001
- field lr_schedule: Union[deeperwin.configuration.InverseLRScheduleConfig, deeperwin.configuration.ConstantLRSchedule] = InverseLRScheduleConfig(name='inverse', decay_time=6000.0)
Schedule for the learning rate decay
- field name: Literal['adam', 'rmsprop_momentum', 'sgd'] = 'adam'
- field scale_lr = 1.0
Factor which to apply to the learning rates of specified modules
- field scaled_modules: Optional[List[str]] = None
List of parameters for which the learning rate is being scaled.
- pydantic model deeperwin.configuration.OptimizerConfigKFAC[source]
-
- field curvature_ema: float = 0.95
- field damping: float = 0.001
- field damping_scheduler: bool = False
- field estimation_mode: Literal['fisher_gradients', 'fisher_exact'] = 'fisher_exact'
- field internal_optimizer: Union[deeperwin.configuration._OptimizerConfigSGD, deeperwin.configuration.StandardOptimizerConfig] = _OptimizerConfigSGD(name='sgd', learning_rate=1.0, lr_schedule=ConstantLRSchedule(name='fixed'), scaled_modules=None, scale_lr=1.0)
Internal optimizer to use for applying the preconditioned gradients calculated by KFAC. Use SGD for ‘pure’ KFAC.
- field learning_rate: float = 0.1
- field lr_schedule: Union[deeperwin.configuration.InverseLRScheduleConfig, deeperwin.configuration.ConstantLRSchedule] = InverseLRScheduleConfig(name='inverse', decay_time=6000.0)
Schedule for the learning rate decay
- field min_damping: float = 0.0001
- field momentum: float = 0.0
- field n_burn_in: int = 0
- field name: Literal['kfac'] = 'kfac'
Identifier. Fixed
- field norm_constraint: float = 0.003
- field register_generic: bool = False
- field update_inverse_period: int = 1
Period of how often the fisher matrix is being updated (in batches). e.g. update_inverse_period==1 means that it is updated after every gradient step.
- pydantic model deeperwin.configuration.BFGSOptimizerConfig[source]
- Fields
- field hessian_regularization: float = 100.0
Amount of Tikhonov regularization to apply
- field internal_optimizer: deeperwin.configuration.StandardOptimizerConfig = StandardOptimizerConfig(name='adam', learning_rate=0.001, lr_schedule=InverseLRScheduleConfig(name='inverse', decay_time=6000.0), scaled_modules=None, scale_lr=1.0)
Configuration for built-in optimizer to update the parameters, usinge the preconditioned gradients calculated by BFGS. Use these internal optimizers to easily implement features like momentum.
- field memory_length: int = 2000
Number of gradients to keep in memory to build-up the hessian. Longer memory yields a higher-rank hessian, potentially increasing accuracy, but also slightly increases run-time cost.
- field name: Literal['slbfgs'] = 'slbfgs'
Identifier of optimizer. Fixed.
- field norm_constraint: float = 0.0005
Maximum of the norm of the preconditioned gradients. If the norm of the preconditioned gradients exceeds this norm_constraint, it will be scaled down to meet this norm.
- field update_hessian_every_n_epochs: int = 1
How often to update the hessian. More frequent update (= smaller setting) is preferrable, but can be expensive when using use_variance_reduction=True
- field use_variance_reduction: bool = False
Recalculate 2 batches at the end of each epoch to reduce stochastic MCMC noise in the gradients. Improves accuracy at the expense of 2 additional batches per epoch
- pydantic model deeperwin.configuration.IntermediateEvaluationConfig[source]
-
- field n_epochs: int = 5000
How many evaluation epochs to use for intermediate evaluation.
- field opt_epochs: List[int] = []
List of epochs at which to run an intermediate evaluation to accurately assess wavefunction accuracy.
- Fields
Maximal number of epochs a geometry can be not considered during weight-sharing. Preventing a few geometries from requiring all parameter updates for stddev scheduling
Method to vary between geometries during weight-sharing
What modules/ parts of the neural network should be shared during weight-sharing
- pydantic model deeperwin.configuration.CheckpointConfig[source]
-
- field additional_n_epochs: List[int] = []
- field keep_every_n_epochs: int = 50000
- field replace_every_n_epochs: int = 1000
- pydantic model deeperwin.configuration.OptimizationConfig[source]
- Fields
- field checkpoints: deeperwin.configuration.CheckpointConfig = CheckpointConfig(replace_every_n_epochs=1000, keep_every_n_epochs=50000, additional_n_epochs=[])
- field clipping: deeperwin.configuration.ClippingConfig = ClippingConfig(name='tanh', width_metric='std', center='mean', from_previous_step=True, clip_by=5.0)
Config for clipping the local energies in the loss function. Clipping significantly improves optimization stability.
- field intermediate_eval: Optional[deeperwin.configuration.IntermediateEvaluationConfig] = None
Config for running intermediate evaluation runs during wavefunction optimization to obtain accurate estimates of current accuracy
- field mcmc: deeperwin.configuration.MCMCConfigOptimization = MCMCConfigOptimization(n_inter_steps=20, n_burn_in=1000, max_age=20, stepsize_update_interval=100, n_walkers=2048, target_acceptance_rate=0.5, min_stepsize_scale=0.01, max_stepsize_scale=1.0, proposal=MCMCSimpleProposalConfig(name='normal'))
- field n_epochs: int = 60000
Number of epochs for wavefunction optimization
- field n_epochs_prev: int = 0
Nr of epochs that this wavefunction has already been optimized. This can be used to store number of previous epochs after a restart
- field optimizer: Union[deeperwin.configuration.OptimizerConfigKFAC, deeperwin.configuration._OptimizerConfigKFACwithAdam, deeperwin.configuration.StandardOptimizerConfig, deeperwin.configuration.BFGSOptimizerConfig] = OptimizerConfigKFAC(name='kfac', learning_rate=0.1, lr_schedule=InverseLRScheduleConfig(name='inverse', decay_time=6000.0), momentum=0.0, norm_constraint=0.003, damping=0.001, damping_scheduler=False, estimation_mode='fisher_exact', register_generic=False, update_inverse_period=1, n_burn_in=0, min_damping=0.0001, curvature_ema=0.95, internal_optimizer=_OptimizerConfigSGD(name='sgd', learning_rate=1.0, lr_schedule=ConstantLRSchedule(name='fixed'), scaled_modules=None, scale_lr=1.0))
Which optimizer to use and its corresponding sub-options
Config for shared optimization of multiple wavefunctions using weight-sharing between them
- field use_batch_reweighting: bool = False
Reweight gradients for different samples with the changes in log(psi^2) between batches
- property n_epochs_total
- pydantic model deeperwin.configuration.RestartConfig[source]
- Fields
- field continue_n_epochs: bool = True
Whether to increment n_epochs_prev in the config, to keep track of total epochs trained
- field ignore_extra_settings: bool = False
Whether to ignore extra config flags that are no longer compatible with the current config
- field mode: Literal['restart'] = 'restart'
- field path: str [Required]
Path to a previous calculation directory, containing a results.bz2 file
- field randomize_mcmc_rng: bool = False
Whether to change the state of the random-number-generator of the MCMC state. Does not move walkers, but will change their future random walk
- field reuse_clipping_state: bool = True
Whehter to re-use the clipping state for optimization to clip local energy. This may only make sense when calculating a wavefunction for the same (or very similar) geometry
- field reuse_config: bool = True
Whether to re-use the configuration of the original run or whether to start from a new default config
- field reuse_fixed_params: bool = True
Whether to re-use fixed (i.e. non-trainable) params
- field reuse_mcmc_state: bool = True
Whether to re-use the position of MCMC walkers. This may only make sense when calculating a wavefunction for the same (or very similar) geometry
- field reuse_modules: Optional[List[str]] = None
Model-specific list of strings, detailing which submodules should be re-used vs. re-initialized randomly. Names of modules to re-used is the same as the list of modules for weight-sharing-constraints.
- field reuse_opt_state: bool = True
Reuse state of the optimizer, e.g. momentum, hessian estimates
- field reuse_trainable_params: bool = True
Whether to re-use the trainable weights of the neural networks. Use reuse_modules to specify only specific parts of the model to be re-used.
- field skip_burn_in: bool = True
Whether to skip burn-in steps for MCMC walkers
- field skip_pretraining: bool = True
Whether to skip supervised pretraining of the wavefunction using HartreeFock
- pydantic model deeperwin.configuration.ReuseConfig[source]
Do not introduce new fields here
- Fields
- field continue_n_epochs: bool = False
Whether to increment n_epochs_prev in the config, to keep track of total epochs trained
- field ignore_extra_settings: bool = False
Whether to ignore extra config flags that are no longer compatible with the current config
- field mode: Literal['reuse'] = 'reuse'
- field reuse_clipping_state: bool = False
Whehter to re-use the clipping state for optimization to clip local energy. This may only make sense when calculating a wavefunction for the same (or very similar) geometry
- field reuse_config: bool = False
Whether to re-use the configuration of the original run or whether to start from a new default config
- field reuse_fixed_params: bool = False
Whether to re-use fixed (i.e. non-trainable) params
- field reuse_mcmc_state: bool = False
Whether to re-use the position of MCMC walkers. This may only make sense when calculating a wavefunction for the same (or very similar) geometry
- field reuse_modules: Optional[List[str]] = None
Model-specific list of strings, detailing which submodules should be re-used vs. re-initialized randomly. Names of modules to re-used is the same as the list of modules for weight-sharing-constraints.
- field reuse_opt_state: bool = False
Reuse state of the optimizer, e.g. momentum, hessian estimates
- field reuse_trainable_params: bool = True
Whether to re-use the trainable weights of the neural networks. Use reuse_modules to specify only specific parts of the model to be re-used.
- field skip_burn_in: bool = False
Whether to skip burn-in steps for MCMC walkers
- field skip_pretraining: bool = False
Whether to skip supervised pretraining of the wavefunction using HartreeFock
- pydantic model deeperwin.configuration.ForceEvaluationConfig[source]
-
- field R_core: float = 0.5
- field R_cut: float = 0.1
- field use: bool = True
- field use_antithetic_sampling: bool = False
- pydantic model deeperwin.configuration.EvaluationConfig[source]
- Fields
- field calculate_energies: bool = True
- field forces: Optional[deeperwin.configuration.ForceEvaluationConfig] = None
- field mcmc: deeperwin.configuration.MCMCConfigEvaluation = MCMCConfigEvaluation(n_inter_steps=20, n_burn_in=500, max_age=100, stepsize_update_interval=100, n_walkers=2048, target_acceptance_rate=0.5, min_stepsize_scale=0.01, max_stepsize_scale=1.0, proposal=MCMCSimpleProposalConfig(name='normal'))
- field n_epochs: int = 10000
- pydantic model deeperwin.configuration.PhysicalConfigChange[source]
-
- field E_ref: Optional[float] = None
- field R: Optional[List[List[float]]] = None
- field comment: Optional[str] = None
- pydantic model deeperwin.configuration.PhysicalConfig[source]
-
- field E_ref: Optional[float] = None
Known ground-truth energy as reference for output. This value is not used in the actual calculation, but only to benchmark the achieved results.
- field E_ref_source: Optional[str] = None
Source of included reference energy
- field R: Optional[List[List[float]]] = None
List of lists, specifiying the position of all ions. Outer index loops over ions, inder index loops over 3 coordinates XYZ.
- field Z: Optional[List[int]] = None
Nuclear charges per ion
- field changes: Optional[List[deeperwin.configuration.PhysicalConfigChange]] = None
List of changes to be made to this physical-configuration to obtain different molecules. This can be used to calculate multiple geometries with similar settings, by specifying a base configuration (e.g. charge, spin, CASSCF-settings, etc) and only specifying the changes (e.g. in nuclear geometry) in the changes section.
- field comment: Optional[str] = None
Optional comment to keep track of molecules, geometries or experiments
- field el_ion_mapping: Optional[List[int]] = None
Initial position of electrons. len(el_ion_mapping) == n_electrons. For each electron the list-entry specifies the index of the nucleus where the electron should be initialized. Note that the n_up first entries in this list correpsond to spin-up electrons and the remaining entries correspond to spin-down electrons
- field n_cas_electrons: Optional[int] = None
Number of active electrons to include in the CASSCF calculation. Other electrons will be kept fixed in their respective orbitals.
- field n_cas_orbitals: Optional[int] = None
Number of active orbitals to include in the CASSCF calculation. Other orbitals are kept as always occupied or always unoccupied, depending on their energy.
- field n_electrons: Optional[int] = None
Total number of electrons in the system
- field n_up: Optional[int] = None
Number of spin-up electrons
- field name: Optional[str] = None
Name of the molecule to be calculated. If other physical parameters are not specified, this name will be used as a lookup-key to find default values.
- property n_dn
- property n_ions
- pydantic model deeperwin.configuration.LoggerBaseConfig[source]
- Fields
- field n_skip_epochs: int = 0
- pydantic model deeperwin.configuration.WandBConfig[source]
- Fields
- field blacklist: List[str] = []
- field entity: Optional[str] = None
- field id: Optional[str] = None
- field project: Optional[str] = 'default'
- field use_id: bool = False
- pydantic model deeperwin.configuration.BasicLoggerConfig[source]
- Fields
- field fname: Optional[str] = 'log.out'
- field log_level: Union[int, Literal['CRITICAL', 'FATAL', 'ERROR', 'WARN', 'WARNING', 'INFO', 'DEBUG']] = 'DEBUG'
- field log_to_stdout: bool = True
- field n_skip_epochs: int = 9
- pydantic model deeperwin.configuration.PickleLoggerConfig[source]
- Fields
- field fname: str = 'results.bz2'
- pydantic model deeperwin.configuration.LoggingConfig[source]
- Fields
- field basic: Optional[deeperwin.configuration.BasicLoggerConfig] = BasicLoggerConfig(n_skip_epochs=9, log_to_stdout=True, log_level='DEBUG', fname='log.out')
Config for basic logger, which will produce human-readable log-files using the python built-in logging module
- field log_opt_state: bool = True
Flag whether to log the full state of the optimizer. Note that this can produce very large output-files, in particular when logging the hessian of 2nd-order-optimizers
- field pickle: Optional[deeperwin.configuration.PickleLoggerConfig] = PickleLoggerConfig(n_skip_epochs=0, fname='results.bz2')
Config for logging to binary files, which contain machine-readable pickle files containg all configs, metrics and model weights
- field tags: List[str] = []
List of tags to help mark/identify runs
- field wandb: Optional[deeperwin.configuration.WandBConfig] = None
Config for logging to Weights&Biases
- pydantic model deeperwin.configuration.DispatchConfig[source]
-
- field conda_env: str = 'jax'
Conda environment to select in SLURM-job-script. Not relevant for local execution
- field eval_epochs: Optional[int] = None
- field queue: Literal['default', 'vsc3plus_0064', 'devel_0128', 'gpu_a40dual', 'gpu_gtx1080amd', 'gpu_gtx1080multi', 'gpu_gtx1080single', 'gpu_v100', 'gpu_k20m', 'gpu_rtx2080ti', 'jupyter', 'normal_binf', 'vsc3plus_0256', 'mem_0096', 'devel_0096', 'jupyter', 'mem_0096', 'mem_0384', 'mem_0768', 'gpu_a100_dual'] = 'default'
SLURM queue to use for job submission on compute clusters. Not relevant for local execution
- field split_opt: Optional[List[int]] = None
- field system: Literal['local', 'local_background', 'vsc3', 'vsc4', 'dgx', 'auto'] = 'auto'
Which compute-cluster to use for this experiment. ‘auto’ detects whether the code is running on a known compute-cluster and selects the corresponding profile, or otherwise defaults to local execution
- field time: str = '3day'
Maximum job run-time to use for job submission on compute clusters. Not relevant for local execution
- pydantic model deeperwin.configuration.ComputationConfig[source]
- Fields
- field disable_jit: bool = False
- field disable_tensor_cores: bool = True
- field float_precision: Literal['float32', 'float64'] = 'float32'
- field force_device_count: bool = False
- field n_local_devices: Optional[int] = None
- field n_nodes: int = 1
- field require_gpu: bool = False
- field rng_seed: Optional[int] = None
- field use_gpu: bool = True
deprecated
- field use_profiler: bool = False
- pydantic model deeperwin.configuration.PreTrainingConfig[source]
- Fields
- field baseline: deeperwin.configuration.CASSCFConfig = CASSCFConfig(name='casscf', basis_set='6-311G', cusps=CuspCorrectionConfig(use=True, cusp_type='mo', r_cusp_el_ion_scale=1.0), only_hf=False)
Physical baseline settings for pre-training
- field mcmc: deeperwin.configuration.MCMCConfigPreTrain = MCMCConfigPreTrain(n_inter_steps=1, n_burn_in=0, max_age=20, stepsize_update_interval=1000, n_walkers=2048, target_acceptance_rate=0.5, min_stepsize_scale=0.01, max_stepsize_scale=1.0, proposal=MCMCSimpleProposalConfig(name='normal'))
- field n_epochs: int = 1000
Number of pre-training steps to fit DL-wavefunction to a baseline calculation as e.g. Hartree Fock
- field optimizer: Union[deeperwin.configuration._OptimizerConfigAdamForPretraining, deeperwin.configuration.StandardOptimizerConfig] = _OptimizerConfigAdamForPretraining(name='adam', learning_rate=0.0003, lr_schedule=ConstantLRSchedule(name='fixed'), scaled_modules=None, scale_lr=1.0)
Optimizer used for pre-training only. Setting will not affect standard optimization
- field use: bool = True
- field use_only_leading_determinant: bool = True
Whether to use only Hartree Fock determinant for pre-training or for each DL-wavefunction determinant a different CAS determinant
- pydantic model deeperwin.configuration.Configuration[source]
Root configuration for DeepErwin
- Fields
- field comment: Optional[str] = None
Optional coment to keep track of experiments
- field computation: deeperwin.configuration.ComputationConfig = ComputationConfig(use_gpu=True, require_gpu=False, n_local_devices=None, n_nodes=1, rng_seed=None, force_device_count=False, disable_jit=False, float_precision='float32', disable_tensor_cores=True, use_profiler=False)
Options regarding computational details such as GPU usage and float precision
- field dispatch: deeperwin.configuration.DispatchConfig = DispatchConfig(system='auto', queue='default', time='3day', conda_env='jax', split_opt=None, eval_epochs=None)
Options regarding where the code is being run, i.e. locally vs asynchronysly on a compute-cluster
- field evaluation: deeperwin.configuration.EvaluationConfig = EvaluationConfig(mcmc=MCMCConfigEvaluation(n_inter_steps=20, n_burn_in=500, max_age=100, stepsize_update_interval=100, n_walkers=2048, target_acceptance_rate=0.5, min_stepsize_scale=0.01, max_stepsize_scale=1.0, proposal=MCMCSimpleProposalConfig(name='normal')), n_epochs=10000, calculate_energies=True, forces=None)
The evaluation of the wavefunction (after optimization)
- field experiment_name: Optional[str] = 'deeperwin_experiment'
Experiment name to keep track of experiments
- field logging: deeperwin.configuration.LoggingConfig = LoggingConfig(tags=[], log_opt_state=True, basic=BasicLoggerConfig(n_skip_epochs=9, log_to_stdout=True, log_level='DEBUG', fname='log.out'), wandb=None, pickle=PickleLoggerConfig(n_skip_epochs=0, fname='results.bz2'))
The output of the code, e.g. logging to files, or online-services
- field model: Union[deeperwin.configuration.ModelConfigDeepErwin4, deeperwin.configuration.ModelConfigFermiNet, deeperwin.configuration.ModelConfigDeepErwin1] = ModelConfigDeepErwin4(features=InputFeatureConfigDPE4(use_rbf_features=False, n_rbf_features=0, use_distance_features=True, use_el_ion_differences=True, use_el_el_differences=False, use_el_el_spin=False, use_local_coordinates=True, n_one_el_features=0, n_ion_features=32, concatenate_el_ion_features=True, n_hidden_one_el_features=[], eps_dist_feat=0.01, distance_feature_powers=[1], name='dpe4'), embedding=EmbeddingConfigDeepErwin4(name='dpe4', n_hidden_one_el=[256, 256, 256, 256], n_hidden_two_el=[32, 32, 32], n_hidden_el_ions=[32, 32, 32], n_iterations=4, use_el_ion_stream=True, use_average_h_one=True, initialization=InitializationConfig(bias_scale=0.0, weight_scale='glorot', weight_distribution='uniform'), use_average_h_two=False, use_h_one=True, use_h_two_same_diff=True, use_schnet_features=True, sum_schnet_features=False, emb_dim=32, use_linear_out=False, use_w_mapping=True), orbitals=OrbitalsConfigFermiNet(baseline_orbitals=None, envelope_orbitals=EnvelopeOrbitalsConfig(envelope_type='isotropic_exp', n_hidden=[], use_bias=False, initialization='constant'), n_determinants=32, use_full_det=True), mlp=MLPConfig(activation='tanh', init_bias_scale=0.0, init_weights_scale='fan_avg', init_weights_distribution='uniform'), jastrow=None, use_el_el_cusp_correction=False, name='dpe4')
The actual wavefunction model mapping electron coordinates to psi
- field optimization: deeperwin.configuration.OptimizationConfig = OptimizationConfig(mcmc=MCMCConfigOptimization(n_inter_steps=20, n_burn_in=1000, max_age=20, stepsize_update_interval=100, n_walkers=2048, target_acceptance_rate=0.5, min_stepsize_scale=0.01, max_stepsize_scale=1.0, proposal=MCMCSimpleProposalConfig(name='normal')), optimizer=OptimizerConfigKFAC(name='kfac', learning_rate=0.1, lr_schedule=InverseLRScheduleConfig(name='inverse', decay_time=6000.0), momentum=0.0, norm_constraint=0.003, damping=0.001, damping_scheduler=False, estimation_mode='fisher_exact', register_generic=False, update_inverse_period=1, n_burn_in=0, min_damping=0.0001, curvature_ema=0.95, internal_optimizer=_OptimizerConfigSGD(name='sgd', learning_rate=1.0, lr_schedule=ConstantLRSchedule(name='fixed'), scaled_modules=None, scale_lr=1.0)), n_epochs=60000, n_epochs_prev=0, use_batch_reweighting=False, checkpoints=CheckpointConfig(replace_every_n_epochs=1000, keep_every_n_epochs=50000, additional_n_epochs=[]), clipping=ClippingConfig(name='tanh', width_metric='std', center='mean', from_previous_step=True, clip_by=5.0), intermediate_eval=None, shared_optimization=None)
The wavefunction optimization
- field physical: Optional[deeperwin.configuration.PhysicalConfig] [Required]
The physical system/molecule being calculated
- field pre_training: Optional[deeperwin.configuration.PreTrainingConfig] = PreTrainingConfig(use=True, mcmc=MCMCConfigPreTrain(n_inter_steps=1, n_burn_in=0, max_age=20, stepsize_update_interval=1000, n_walkers=2048, target_acceptance_rate=0.5, min_stepsize_scale=0.01, max_stepsize_scale=1.0, proposal=MCMCSimpleProposalConfig(name='normal')), n_epochs=1000, optimizer=_OptimizerConfigAdamForPretraining(name='adam', learning_rate=0.0003, lr_schedule=ConstantLRSchedule(name='fixed'), scaled_modules=None, scale_lr=1.0), use_only_leading_determinant=True, baseline=CASSCFConfig(name='casscf', basis_set='6-311G', cusps=CuspCorrectionConfig(use=True, cusp_type='mo', r_cusp_el_ion_scale=1.0), only_hf=False))
Supervised pre-training of the orbitals to fit the baseline orbitals.
- field reuse: Optional[Union[deeperwin.configuration.RestartConfig, deeperwin.configuration.ReuseConfig]] = None
Reuse information from a previosu runt to smartly initialize weights or MCMC walkers.