Author Topic: the error about the IterationControlParameters.DensityMatrix  (Read 5119 times)

0 Members and 1 Guest are viewing this topic.

Offline Roc

  • QuantumATK Guru
  • ****
  • Posts: 104
  • Reputation: 0
    • View Profile
when I run the job about the two-probe system, the error happened, as follows, (the script is run in the version of 2008.10)

Traceback (most recent call last):
  File "Au-molecule_script.py", line 218, in ?
    history_steps = 15
NLArgumentNameError: The quantity, NL.DensityFunctionalTheory.ATKParameters.IterationControlParameters.DensityMatrix, is not recognized.


how to resolve it, thanks!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
I think you have made a small typing error or a search/replace has gone bad. Your error indicates that you try to do something like
Code
iteration_mixing_parameters = iterationMixingParameters(
    algorithm = IterationMixing.Pulay,
    diagonal_mixing_parameter = 0.1,
    quantity = IterationControlParameters.DensityMatrix,    # <--------
    history_steps = 6
)
whereas the correct code should read
Code
iteration_mixing_parameters = iterationMixingParameters(
    algorithm = IterationMixing.Pulay,
    diagonal_mixing_parameter = 0.1,
    quantity = IterationMixing.DensityMatrix,    # <--------
    history_steps = 6
)
I'm guessing a bit, but it seems like this is the problem. If not, please post the whole script (minus the structure, if you don't want to publish it).

Offline Roc

  • QuantumATK Guru
  • ****
  • Posts: 104
  • Reputation: 0
    • View Profile
yeah, the script just like this,

exchange_correlation_type = GGA.PBE

iteration_mixing_parameters = iterationMixingParameters(
    algorithm = IterationMixing.Pulay,
    diagonal_mixing_parameter = 0.01,
    quantity = IterationControl.DensityMatrix,
    history_steps = 15

The error just happened when I set  up the Parameters in VNL Iteration Mixing--Quantity--DensityMatrix,
If I changed it to Iteration Mixing--Quantity--Hamiltionian, like this,

iteration_mixing_parameters = iterationMixingParameters(
    algorithm = IterationMixing.Pulay,
    diagonal_mixing_parameter = 0.01,
    quantity = IterationMixing.Hamiltonian,
    history_steps = 15


the script could work normally, it seems that the script couldn't be run using DensityMatrix.

thanks!
« Last Edit: March 6, 2009, 02:27 by anyipeng »

Offline nori

  • QuantumATK Guru
  • ****
  • Posts: 122
  • Reputation: 12
    • View Profile
Dear anyipeng,

Please fix the input of parameter "quantity" from "IterationControl.DensityMatrix" to "IterationMixing.DensityMatrix".
Then, Probably you can execute the script normally.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
In reply to anyipeng's last post:

That's really weird...! I tried it myself and it worked without problems. Are you using an older version of VNL (older than 2008.10)? If you could provide detailed steps to reproduce the problem, one by one from the beginning, it might help to figure out why it went wrong.

Still:
  • There is a simple workaround (the script fails immediately, so you don't waste time in the calculation)
  • Hamiltonian mixing is best for two-probes, always! :)

Offline Roc

  • QuantumATK Guru
  • ****
  • Posts: 104
  • Reputation: 0
    • View Profile
yeah, I just produce the script by VNL 2008.02 for windows system , and run it by ATK 200.10 for linux system, so the error happend,

why does the VNL2008.02 produce the script that quantity = IterationControl.DensityMatrix not IterationMixing.DensityMatrix,  is it a bug for the version of VNL 2008.02

thank you Anders Blom  and nori

I will chang the script using the Hamiltonian mixing

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
I tried VNL 2008.02 (on Windows) but couldn't reproduce the error. Let's attribute it to some random error that hopefully doesn't appear again!

Offline Roc

  • QuantumATK Guru
  • ****
  • Posts: 104
  • Reputation: 0
    • View Profile
OK, thank you again!! ;)