QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: xylx9497 on February 24, 2023, 09:45

Title: A issue when Generating A Moment Tensor Potential
Post by: xylx9497 on February 24, 2023, 09:45
Dear Sir/Madam,
          When I tried to generate a MTP, I had finished the STEP 1 & 2 of the tutorials(https://docs.quantumatk.com/tutorials/mtp_hfo2/mtp_hfo2.html). However, when I tried to find an MTP with Lowest Error(Step 3), I used the scrpit "MTP_training.py " which I got from the tutorials. A issue appeared:
Code
Traceback (most recent call last):
  File "/opt/QuantumATK/QuantumATK-U-2022.12/bin/../atkpython/bin/atkpython", line 8, in <module>
    sys.exit(__run_atkpython())
  File "zipdir/ATKExecutables/atkwrappers/__init__.py", line 879, in __run_atkpython
  File "/home/dell/data/IGZO_MTPtraining/MTP_training.py", line 19, in <module>
    active_learning_data=nlread('active_learning_candidates.hdf5',Trajectory)[-1]
IndexError: list index out of range

Could you help me with this? Thanks very much!
Attachments are the input, 1.log is the log file, the reference-data.hdf5 is too large, I don't upload it.
Title: Re: A issue when Generating A Moment Tensor Potential
Post by: Jahanzaib on February 24, 2023, 12:51
The code is trying to access the last element in the list using the index -1, but the list appears to be empty or have no elements.  This could be caused by a number of reasons, such as the file not existing in the specified path, incorrect file path or filename, or issues with file permissions.
Title: Re: A issue when Generating A Moment Tensor Potential
Post by: Anders Blom on February 28, 2023, 07:27
The error is basically indicating that the file "active_learning_candidates.hdf5" does not contain any Trajectory objects. So the first thing to check is, what objects are actually in this file? You can look at it in the GUI, or via a script using

Code: python
from NL.IO.NLSaveUtilities import nlinspect
nlinspect("active_learning_candidates.hdf5")
Title: Re: A issue when Generating A Moment Tensor Potential
Post by: xylx9497 on February 28, 2023, 07:43
The error is basically indicating that the file "active_learning_candidates.hdf5" does not contain any Trajectory objects. So the first thing to check is, what objects are actually in this file? You can look at it in the GUI, or via a script using

Code: python
from NL.IO.NLSaveUtilities import nlinspect
nlinspect("active_learning_candidates.hdf5")

Thank you for replying. I've solved the issue. It is because the type the "active_learning_candidates.hdf5" has changed in version U-2022.12. It is now belong to "ConfigurationDataContainer" but not "Trajectory"。
Title: Re: A issue when Generating A Moment Tensor Potential
Post by: Anders Blom on February 28, 2023, 20:21
Excellent! We should update the tutorial. Good luck with the MTP fitting, I hope it will be smooth, fast and successful!

Are you trying IGZO as a test? Note that the U-version comes with a ready fitted IGZO potential...!
Title: Re: A issue when Generating A Moment Tensor Potential
Post by: xylx9497 on March 1, 2023, 06:17
Excellent! We should update the tutorial. Good luck with the MTP fitting, I hope it will be smooth, fast and successful!

Are you trying IGZO as a test? Note that the U-version comes with a ready fitted IGZO potential...!

Thanks a lot. I don't find it. OK, I'll check it with my MTP.