Author Topic: QuantumATK doesn't read optimized structure  (Read 3507 times)

0 Members and 1 Guest are viewing this topic.

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
QuantumATK doesn't read optimized structure
« on: March 30, 2023, 11:17 »
Dear all,

Please, I am trying to read the optimized structure of a junction but doesn't work. The part of the code is bellow:

device_configuration = nlread(filename='/home/jalmeida/MyProjects/junction/opt.hdf5',
                                                    class_type=DeviceConfiguration,
                                                    object_id='optimizedeviceconfiguration')

However, I got the error:

NL.ComputerScienceUtilities.Exceptions.NLTypeError: The parameter 'configuration' must be an instance of one of the following: MoleculeConfiguration, BulkConfiguration, SurfaceConfiguration, DeviceConfiguration.

The image of the objects is attached. probably I need to declare somehow the 'Optimized Configuration' to describe well where my DeviceConfiguration is. Thanks in advance!

Have a nice day,
SANTOS ALMEIDA, Joseane.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5574
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: QuantumATK doesn't read optimized structure
« Reply #1 on: March 30, 2023, 21:05 »
Most likely you just need to add [-1] to the end of the nlread (after the closing parenthesis).
nlread always returns a list, even if it only reads one object from the file, in order to have a consistent API.

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
Re: QuantumATK doesn't read optimized structure
« Reply #2 on: March 31, 2023, 09:47 »
Thanks for your reply. Unfortunately it didn't work. I tried 0, 1, -1, -2 just to check and all of them gives the error "IndexError: list index out of range". 

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5574
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: QuantumATK doesn't read optimized structure
« Reply #3 on: April 3, 2023, 19:54 »
In that case the list returned by nlread is empty, meaning no object was found in the file matching the criteria you provided.

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
Re: QuantumATK doesn't read optimized structure
« Reply #4 on: April 5, 2023, 17:26 »
All right. Since I tried different ways without success, the solution that I found was drop it in the builder and save the coordinates of optimized structure to do one scf calculation that I can use the hdf5 file later. Thank you for your reply!