QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: MolFET93 on February 11, 2022, 11:38

Title: DeviceLCAOBuilder' object has no attribute 'createMatrixCalculator'
Post by: MolFET93 on February 11, 2022, 11:38
Dear ATK community,

in running into trouble with the function vectorToGrid. In particular by typing:

vectorToGrid(eigenvector, device_configuration)

the following error occurs:

File "utilities.py", line 17, in vectorToGrid
matrix_calculator = builder.createMatrixCalculator()
AttributeError: 'DeviceLCAOBuilder' object has no attribute 'createMatrixCalculator'

Attached the script I'm running in 2021 version.
Any help?

I really thank you,
Best regards

Title: Re: DeviceLCAOBuilder' object has no attribute 'createMatrixCalculator'
Post by: Anders Blom on April 6, 2022, 21:05
What is the source of the utilities.py script, is it from some tutorial?

Try replacing it with
builder.createHamiltonianCalculator()
but if we changed that name, maybe other things in this script will break too. This is not officially supported functionality (which is why we change it between versions sometimes, when we restructure the code) but if this provides some useful functionality for you, let us know where you got the script, probably it needs to be updated.