Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Dipole training not working with any hybrid descriptor combination #4527

Closed
NatashaMartinez opened this issue Jan 4, 2025 · 1 comment · Fixed by #4542
Closed

[BUG] Dipole training not working with any hybrid descriptor combination #4527

NatashaMartinez opened this issue Jan 4, 2025 · 1 comment · Fixed by #4542
Labels

Comments

@NatashaMartinez
Copy link

Bug summary

File "/home/analys/.local/lib/python3.8/site-packages/deepmd/fit/dipole.py", line 88, in init
self.dim_rot_mat_1 = descrpt.get_dim_rot_mat_1()
File "/home/analys/.local/lib/python3.8/site-packages/deepmd/descriptor/descriptor.py", line 140, in get_dim_rot_mat_1
raise NotImplementedError
NotImplementedError

DeePMD-kit Version

DeePMD-kit v2.2.11

Backend and its version

TensorFlow 2.13.0

How did you download the software?

Offline packages

Input Files, Running Commands, Error Log, etc.

{
"",

"model": {
"type_map": [
"C",
"N",
"O",
"H"
],

"descriptor": {
  "type": "hybrid",
  "list": [
    {
      "type": "se_e3",
      "sel": "auto",
      "rcut_smth": 0.5,
      "rcut": 3.0,
      "neuron": [16, 32, 64],
      "resnet_dt": false,
      "seed": 31,
      "_comment": "Short-range descriptor: se_e3"
    },
    {
      "type": "se_e2_a",
      "sel": "auto",
      "rcut_smth": 0.5,
      "rcut": 10.0,
      "neuron": [111, 111, 111],
      "axis_neuron": 16,
      "resnet_dt": false,
      "seed": 31,
      "_comment": "comment"
    }
  ],
  "_comment": "Double-hybrid descriptor (se_e3 + se_e2_a)"
},

"fitting_net": {
  "type": "dipole",
  "neuron": [
    512,
    512,
    512
  ],
  "resnet_dt": true,
  "seed": 31,
  "activation_function": "relu",
  "_comment": "Dipole fitting network"
},

"_comment": "End of model block"

},

"learning_rate": {
"type": "exp",
"decay_steps": 1000,
"start_lr": 1e-3,
"stop_lr": 1e-8,
"_comment": "Exponential decay learning rate schedule"
},

"loss": {
"type": "tensor",
"pref": 1.0,
"pref_atomic": 0.0,
"_comment": "Loss for dipole training (using 'tensor')"
},

"training": {
"training_data": {
"systems": [
"./training_data"
],
"batch_size": "auto",
"_comment": "Specify your training set"
},
"validation_data": {
"systems": [
"./validation_data"
],
"batch_size": "auto",
"_comment": "Specify your validation set"
},
"numb_steps": 80000,
"seed": 555,
"disp_file": "lcurve.out",
"disp_freq": 200,
"save_freq": 500,
"_comment": "Overall training parameters"
},

"_comment": "That's all"
}

Steps to Reproduce

Try fitting dipoles with hybrid

Further Information, Files, and Links

No response

njzjz added a commit to njzjz/deepmd-kit that referenced this issue Jan 8, 2025
@njzjz njzjz linked a pull request Jan 8, 2025 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Jan 10, 2025
Fix #4527.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
	- Added rotation matrix handling methods to descriptor classes.
	- Introduced validation for model initialization.

- **Bug Fixes**
	- Improved error handling for fitting network configuration.

- **Tests**
	- Added new test suite for dipole hybrid descriptor model validation.

- **Refactor**
- Enhanced descriptor class functionality with default rotation matrix
methods.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
@NatashaMartinez
Copy link
Author

Thank you for resolving this. It runs with hybrid now!

@njzjz njzjz closed this as completed Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants