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

Error encountered during the inference step #81

Closed
nukenadal opened this issue Oct 25, 2024 · 2 comments
Closed

Error encountered during the inference step #81

nukenadal opened this issue Oct 25, 2024 · 2 comments

Comments

@nukenadal
Copy link

Hi developers,

Following the guidelines, I have successfully reproduced the workflow in Demo1. Now I am trying the same workflow for my own system (with only the necessary modification on the settings), and I managed to finish all but the last inference step. In the inference step, the code stopped at the sub-step 2.get_local_coordinate, with the following error note:

Traceback (most recent call last):
  File "home/workspace/deeph/miniconda3/bin/deeph-inference", line 8, in <module>
    sys.exit(main())
  File "/home/workspace/deeph/miniconda3/lib/python3.9/site-packages/deeph/scripts/inference.py", line 109, in main
    get_rc(work_dir, work_dir, radius=radius, gen_rc_idx=gen_rc_idx, gen_rc_by_idx=gen_rc_by_idx,
  File "/home/workspace/deeph/miniconda3/lib/python3.9/site-packages/deeph/preprocess/get_rc.py", line 140, in get_rc
    rc_dict[key_str] = _get_local_coordinate(eij, neighbours_i, r2_rand=r2_rand)[0]
  File "/home/workspace/deeph/miniconda3/lib/python3.9/site-packages/deeph/preprocess/get_rc.py", line 38, in _get_local_coordinate
    r1 = neighbours_i.eijs[1]
IndexError: index 1 is out of bounds for dimension 0 with size 1

I could not find any similar raised issue in this repo, and I looked into the source code where I suppose this error might be associated with the overlap.h5 reading but could not understand further. I was wondering if you have any suggestions on how to locate the source of error?

I really appreciate any help you can provide and many thanks in advance.

@mzjb
Copy link
Owner

mzjb commented Oct 28, 2024

This error occurs when attempting to establish a local coordinate system between atoms i and j (where i ≠ j), but no neighboring atom k is found to define the coordinate system. Please check if your material structure only contains two atoms, or if there are any other unique structural configurations that might cause the local coordinate system setup to fail.

@nukenadal
Copy link
Author

Thank you for your elaboration. With further testing after knowing this, I found that this issue can be resolved by setting radius = -1 in the graph section.

@mzjb mzjb closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants