QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Lim changmin on November 8, 2023, 02:51

Title: Device calculation error at 2022.12-U-atk
Post by: Lim changmin on November 8, 2023, 02:51
Hello, my name is changmin Lim and I am currently using Quantum-atk 2022.12-U version

Recently when I was calculating device I ran into unknown error.

Traceback (most recent call last):
  File "zipdir/NL/GUI/Tools/Data/DataCatalogWidget.py", line 793, in _onDoubleClicked
  File "zipdir/NL/GUI/Tools/Data/DataCatalogWidget.py", line 896, in open
  File "zipdir/NL/GUI/Tools/Data/DataCatalogWidget.py", line 896, in <listcomp>
  File "zipdir/NL/GUI/Tools/Data/ToolAnalysisPlugins.py", line 214, in createWidget
  File "zipdir/NL/GUI/Tools/Tool.py", line 960, in dropEvent
  File "zipdir/NL/GUI/DnD/DropExtractor.py", line 618, in extract
  File "zipdir/NL/GUI/DnD/DropExtractor.py", line 248, in mimeDataTextsFromInstances
  File "zipdir/NL/IO/NLPrint.py", line 70, in nlprint
  File "zipdir/NL/Study/Study.py", line 939, in nlprint
  File "zipdir/NL/Study/OptimizeDeviceConfiguration.py", line 514, in _nlprint
  File "zipdir/NL/Study/OptimizeDeviceConfiguration.py", line 463, in result
  File "zipdir/NL/Study/Study.py", line 620, in _results
  File "zipdir/NL/Study/Study.py", line 587, in _tasks
  File "zipdir/NL/Study/Study.py", line 510, in _workflow
NL.ComputerScienceUtilities.Exceptions.NLValueError: The study object workflow not available on a lightweight instance. To access the workflow read the study object as a heavyweight instance.


I tried to search heavyweight and lightweight on qna, but nothing was found.

also, I tried to find txt files that showed on error, but I could not find the error line as well.

Can anyone help me with this error?
Thank you
Title: Re: Device calculation error at 2022.12-U-atk
Post by: Anders Blom on November 8, 2023, 23:23
You will need to explain more in detail what you do before the error appears. It seems to be related to the GUI, not running the calculation?
Title: Re: Device calculation error at 2022.12-U-atk
Post by: Lim changmin on November 9, 2023, 03:27
I was studying on tutorial of NiSi2/Si interface.
While doing that, I tried to optimize NiSi2/Si using device optimization tools in Script generator. The device range was 100 Angstrom total(64 for Si and 36 for NiSi2) and I set device optimization range to 40 Angstrom
It went well on 2020 version.
But when I ran the calculation in 2022-U version, the calculation suddenly stopped and showed the error that I posted above.
However when I ran other tutorials that used only bulk configurations, it worked well.

So I am suspecting that the calculation error occurred only at device configuration calculation.

But I am not sure what exactly caused that error on the last sentence(heavy weight and light weight instance)
Title: Re: Device calculation error at 2022.12-U-atk
Post by: Anders Blom on November 9, 2023, 06:26
Thanks, we will investigate! Unfortunately a lot of our tutorials were written for older versions and we have not had time to update them. If you have a chance to try the V-2023.09 version it will be even more helpful, because if the error is isolated to the U-version but it works in V, then there is no point in fixing it since we cannot release updates to U anymore.
Title: Re: Device calculation error at 2022.12-U-atk
Post by: Lim changmin on November 9, 2023, 10:53
Thank you for your reply. And also when I ran nisi2 calculation without optimization, it worked.

So I am now suspecting that the optimization is the only problem that I got.

Can you please help with device optimization error?

Thank you
Title: Re: Device calculation error at 2022.12-U-atk
Post by: Lim changmin on November 9, 2023, 11:16
I am posting py file just in case of optimization

# %% OptimizeDeviceConfiguration

optimize_geometry_parameters = OptimizeGeometryParameters(
    max_forces=0.02*eV/Angstrom,
    max_stress=0.1*GPa,
    max_steps=200,
    max_step_length=0.2*Angstrom,
    constraints=[],
    optimize_cell=False,
    optimizer_method=LBFGS(),
    target_stress=None,
    pre_step_hook=None,
    post_step_hook=None,
    constrain_bravais_lattice=True,
    trajectory_interval=1,
    restart_strategy=RestartFromTrajectory(),
    enable_optimization_stop_file=True
)

optimize_device_configuration = OptimizeDeviceConfiguration(
    device_configuration=device_interface_silicon_alpha_100_nisi2_100,
    filename='Device_Interface_Silicon_alpha_100_NiSi2_100_results.hdf5',
    object_id='opt_device_conf',
    calculator=None,
    optimization_region_length=40.0*Angstrom,
    optimization_region_center=None,
    passivate_electrode_surfaces=(True, True),
    optimize_geometry_parameters=optimize_geometry_parameters,
    log_filename_prefix='optimizedeviceconfiguration',
    perform_device_optimization=False
)
optimize_device_configuration.update()
optimized_device_configuration = optimize_device_configuration.result()

nlsave('Device_Interface_Silicon_alpha_100_NiSi2_100_results.hdf5', optimized_device_configuration, object_id='opt_device_conf_1')
Title: Re: Device calculation error at 2022.12-U-atk
Post by: Lim changmin on November 9, 2023, 13:43
Also, I have updated to 2023 -V verison and when I ran optimization,  an error appeared like below[/b]

Traceback (most recent call last):
  File "/home/edrl_04/QuantumATK/QuantumATK-U-2022.12-SP1/bin/../atkpython/bin/atkpython", line 8, in <module>
    sys.exit(__run_atkpython())
  File "zipdir/ATKExecutables/atkwrappers/__init__.py", line 879, in __run_atkpython
  File "Device_Interface_2023_NiSi2_100.py", line 542, in <module>
    optimize_geometry_parameters = OptimizeGeometryParameters(
TypeError: __init__() got an unexpected keyword argument 'trajectory_object_id'

My python file was shown below
nlsave('Device_Interface_2023_NiSi2_100.hdf5', device_interface_silicon_alpha_100_nisi2_100)


# %% OptimizeDeviceConfiguration

restart_strategy = RestartFromTrajectory(
    trajectory_filename=None,
    object_id=None
)

optimize_geometry_parameters = OptimizeGeometryParameters(
    max_forces=0.02*eV/Angstrom,
    max_stress=0.1*GPa,
    max_steps=200,
    max_step_length=0.2*Angstrom,
    constraints=[],
    trajectory_filename=None,
    trajectory_object_id=None
    optimize_cell=False,
    optimizer_method=LBFGS(),
    target_stress=None,
    pre_step_hook=None,
    post_step_hook=None,
    constrain_bravais_lattice=True,
    trajectory_interval=1,
    restart_strategy=restart_strategy,
    enable_optimization_stop_file=True,
    write_raw_stress=None,
    write_raw_forces=None
)

optimize_device_configuration = OptimizeDeviceConfiguration(
    device_configuration=device_interface_silicon_alpha_100_nisi2_100,
    filename='Device_Interface_2023_NiSi2_100.hdf5',
    object_id='opt_device_conf',
    calculator=None,
    optimization_region_length=10.0*Angstrom,
    optimization_region_center=None,
    passivate_electrode_surfaces=(True, True),
    optimize_geometry_parameters=optimize_geometry_parameters,
    log_filename_prefix='optimizedeviceconfiguration',
    perform_device_optimization=False
)
optimize_device_configuration.update()
optimized_device_configuration = optimize_device_configuration.result()

nlsave('Device_Interface_2023_NiSi2_100.hdf5', optimized_device_configuration, object_id='opt_device_conf_1')

This error didn't occured in 2020 version so I am wondering what would have caused that error.


Thank you

Title: Re: Device calculation error at 2022.12-U-atk
Post by: Lim changmin on November 9, 2023, 13:45
Also when I clicked the Device optimization icon, at 2023-V version, the same error that I asked at the first question appeared again.
Title: Re: Device calculation error at 2022.12-U-atk
Post by: Anders Blom on November 10, 2023, 08:56
It appears to be a bug. It will be fixed in the December release V-2023.12.