QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: yogita taluja on October 1, 2015, 11:18
-
hello.. i m tried to find out magnetic moment of my defective graphene sheet but can't due to error
""" Traceback (most recent call last):
File "c:\users\combo\appdata\local\temp\3484328881580631.py", line 20, in <module>
density_up = electron_density.spinProjection(Spin.Up)
AttributeError: 'ElectronDensity' object has no attribute 'spinProjection' "
Kindly suggest me a way to tackle this problem.
-
Looks curious. Which version of ATK are you running? Can you upload the python script?
-
Jess Wellendorff sir , This is my python script.
-
The script you have uploaded is insufficient. The script used for the calculation of electron density (i.e., the generation of 'nickellsda.nc' file) is also needed.
In my test run for your script and a test calculation ( Atomistix ToolKit 2014.3) of LSDA, your script can extract the magnetic moment smoothly.
-
sir, my python file as per said....
-
Your second python file isn't useful for debugging your problem because it only gives the information of bulk configuration. Please upload your whole script files. The important is the setup of calculations method. What kind of exchange_correlation has been defined in the python script for the generation of 'nickellsda.nc' file?
-
sir , when i save my file in py format only new calculator setting saved .
i also done some changes like optical spectrum k point sampling to 1*5*5 and dos k point 1*5*5.
plz tell me if any other information require.
-
The problem comes from the 124th line in your "nickellsda.py" file. Your should comment or remove it. Otherwise, it will not perform the calculation of electron density for your system and save it.
....
122 electron_density = ElectronDensity(
123 configuration=bulk_configuration,
124 spin=Spin.Sum,
125 )
.......
-
Well spotted, zh!
To be precise, with line 124 included, ATK will perform and save the density, but only the sum, thus you cannot later ask for the spin components.