QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Roc on March 5, 2009, 12:51

Title: the error about the IterationControlParameters.DensityMatrix
Post by: Roc on March 5, 2009, 12:51
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!
Title: Re: the error about the IterationControlParameters.DensityMatrix
Post by: Anders Blom on March 5, 2009, 14:03
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).
Title: Re: the error about the IterationControlParameters.DensityMatrix
Post by: Roc on March 6, 2009, 02:14
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!
Title: Re: the error about the IterationControlParameters.DensityMatrix
Post by: nori on March 6, 2009, 03:25
Dear anyipeng,

Please fix the input of parameter "quantity" from "IterationControl.DensityMatrix" to "IterationMixing.DensityMatrix".
Then, Probably you can execute the script normally.
Title: Re: the error about the IterationControlParameters.DensityMatrix
Post by: Anders Blom on March 6, 2009, 09:11
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:
Title: Re: the error about the IterationControlParameters.DensityMatrix
Post by: Roc on March 6, 2009, 11:48
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
Title: Re: the error about the IterationControlParameters.DensityMatrix
Post by: Anders Blom on March 6, 2009, 13:09
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!
Title: Re: the error about the IterationControlParameters.DensityMatrix
Post by: Roc on March 7, 2009, 01:28
OK, thank you again!! ;)