Dipole Model
The dipole model1 requires the same dictionary as input as the potential model.
The only difference is the model_params
that can be set. They are listed below
along with their default values.
Parameter | Default | Description |
---|---|---|
max_dipole |
False |
When set to a number, exclude dipoles above this value in loss function |
d_scale |
1 |
Dipole unit during training |
use_d_per_atom |
False |
Use the per-atom dipole in place of total dipole in loss function |
log_d_per_atom |
True |
Log the per-atom dipole error, automatically enabled with use_d_per_atoms=True |
use_d_weight |
False |
Scale the energy loss according to the 'd_weight' Tensor in the dataset |
use_l2 |
False |
Include L2 regularization in loss |
d_loss_multiplier |
1 |
Weight of dipole loss |
l2_loss_multiplier |
1 |
Weight of l2 |
Variants
Since the PiNet2 update several new variants of the dipole model have become available.
- atomic charge (AC) model (
AC_dipole_model
) - atomic dipole (AD) model (
AD_dipole_model
) - bond charge model (
BC_R_dipole_model
) - atomic dipole oxidation state (AD(OS)) model (
AD_OS_dipole_model
) - AC+AD model (
AC_AD_dipole_model
) - AC+BC(R) (
AC_BC_R_dipole_model
) - AD+BC(R) (
AD_BC_R_dipole_model
)
Usage
Apart from the models containing the atomic dipole (AD), all models are compatible with both PiNet and PiNet2.
These models can be selected by changing name
of the model in model_params
(See overview for further instructions.).
Parameters
Parameter | Default | Description |
---|---|---|
max_dipole |
False |
When set to a number, exclude dipoles above this value in loss function |
d_scale |
1 |
Dipole unit during training |
d_unit |
1 |
Output unit of dipole during prediction |
vector_dipole |
False |
Toggle whether to use scalar or vector dipole predictions, should be the same as dipole moment of the dataset |
charge_neutrality |
True |
Enable charge neutrality |
neutral_unit |
'system' |
If charge neutrality is applied, set the charge neutral unit. Choose 'system' for system neutrality, or 'water_molecule' for neutrality per water molecule |
regularization |
True |
Enable regularization of the interaction prediction, only available for models containing the 'R' term |
use_d_per_atom |
False |
Use the per-atom dipole in place of total dipole in loss function |
log_d_per_atom |
True |
Log the per-atom dipole error, automatically enabled with use_d_per_atoms=True |
use_d_weight |
False |
Scale the energy loss according to the 'd_weight' Tensor in the dataset |
use_l2 |
False |
Include L2 regularization in loss |
d_loss_multiplier |
1 |
Weight of dipole loss |
l2_loss_multiplier |
1 |
Weight of l2 |
Model specifications
pinn.models.AC.AC_dipole_model
The atomic charge (AC) dipole model constructs the dipole moment from atomic charge predictions:
Source code in pinn/models/AC.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
pinn.models.AD.AD_dipole_model
The atomic dipole (AD) dipole model constructs the dipole moment from atomic dipole predictions:
Source code in pinn/models/AD.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
pinn.models.BC_R.BC_R_dipole_model
The bond charge dipole model with regularization (BC(R)) constructs the dipole moment from atomic pairwise interactions:
L2-regularization is applied to the atomic pairwise interactions.
Source code in pinn/models/BC_R.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
pinn.models.AD_OS.AD_OS_dipole_model
The atomic dipole with oxidation state term (AD(OS)) dipole model constructs the dipole moment from atomic dipole predictions and oxidation state charges:
Source code in pinn/models/AD_OS.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
pinn.models.AC_AD.AC_AD_dipole_model
The AC+AD dipole model constructs the dipole moment from atomic dipole predictions and atomic charge predictions:
Source code in pinn/models/AC_AD.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
pinn.models.AC_BC_R.AC_BC_R_dipole_model
The AC+BC(R) constructs the dipole moment from atomic charge predictions and atomic pairwise interactions:
L2-regularization is applied to the atomic pairwise interactions.
Source code in pinn/models/AC_BC_R.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
pinn.models.AD_BC_R.AD_BC_R_dipole_model
The AD+BC(R) constructs the dipole moment from atomic dipole predictions and atomic pairwise interactions:
L2-regularization is applied to the atomic pairwise interactions.
Source code in pinn/models/AD_BC_R.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
-
1 L. Knijff, and C. Zhang, “Machine learning inference of molecular dipole moment in liquid water,” Mach. Learn.: Sci. Technol. 2(3), 03LT03 (2021). ↩