QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: Dipankar Saha on June 15, 2015, 12:16
-
While, calculating the Hamiltonian derivatives....as depicted in the tutorial.... http://quantumwise.com/publications/tutorials/item/837-inelastic-transmission............, I was getting an error -->
______________________________
Traceback (most recent call last):
File "/home/dipankar_saha/Desktop/June15/si_pn_dHdR_Vogl_nonscf.py", line 88, in <module>
use_equivalent_bulk=False,
File "./zipdir/NL/Analysis/HamiltonianDerivatives.py", line 109, in __init__
File "./zipdir/NL/Analysis/HamiltonianDerivatives.py", line 308, in calculateHamiltonianDerivatives
File "./zipdir/NL/CommonConcepts/Configurations/DeviceConfiguration.py", line 76, in __init__
File "./zipdir/NL/CommonConcepts/Configurations/DeviceConfiguration.py", line 1344, in TwoProbeGeometryCheck
NL.ComputerScienceUtilities.Exceptions.NLValueError: The first 36 atoms of the central region must match the first 36 atoms of the left electrode region.
Atom 4 of the central region was NL.CommonConcepts.PeriodicTable.Silicon at (1.92000704296 Ang, 0.0 Ang, 6.109225 Ang),
it should have been NL.CommonConcepts.PeriodicTable.Silicon at (1.92000704296 Ang, 3.84001408591 Ang, 0.678625 Ang).
...
To avoid this.....I changed the script slightly....as shown below_
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceSlaterKosterCalculator(
basis_set=basis_set,
numerical_accuracy_parameters=device_numerical_accuracy_parameters,
iteration_control_parameters=device_iteration_control_parameters,
contour_parameters=contour_parameters,
spin_polarization=Unpolarized,
electrode_calculators=
[left_electrode_calculator, right_electrode_calculator],
)
device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration.update()
nlsave('/home/dipankar_saha/Desktop/June15/si_pn_dHdR_chk.nc', device_configuration)
# -------------------------------------------------------------
# Hamiltonian derivatives
# -------------------------------------------------------------
hamiltonian_derivatives = HamiltonianDerivatives(
configuration=device_configuration,
repeats=(1, 1, 1),
atomic_displacement=0.01*Angstrom,
use_equivalent_bulk=True,
)
nlsave('/home/dipankar_saha/Desktop/June15/si_pn_dHdR_chk.nc', hamiltonian_derivatives)
...
After that, I have got the "hamiltonian_derivatives" ......../ but while using the three *.nc files......si_pn_dHdR_chk.nc , ivcurve_selfconsistent_configurations.nc, and Si_pn_Vogl_dynamical_matrix.nc ....together to find the Inelastic transmission spectrum ....... I am finding again another error.....
Traceback (most recent call last):
File "/home/dipankar_saha/Desktop/June15/IET_loop.py", line 8, in <module>
dynamical_matrix = nlread("/home/dipankar_saha/Desktop/June15/Si_pn_Vogl_dynamical_matrix.nc",DynamicalMatrix)[0]
File "./zipdir/NL/IO/NLSaveUtilities.py", line 401, in nlread
File "./zipdir/NL/ComputerScienceUtilities/Timer.py", line 45, in __call__
File "./zipdir/NL/IO/NLSaveUtilities.py", line 401, in <lambda>
File "./zipdir/NL/Analysis/DynamicalMatrix.py", line 690, in nlreadDynamicalMatrix
KeyError: 'max_interaction_range'
...
What could be the possible reason ??!!!
Regards_
Dipankar
-
Which version of ATK are you using?
-
Besides, it will really be helpful..if you can please tell_
1) How a statement like ....." Size of dense matrices = 2520 x 2520 [97 MB per matrix] " can be correlated to the available computational resources?
2) Is it a feasible option to calculate the Dij ...using any classical potential....., and later fetching that calculated Dij to a script where the 'phonon transmission spectrum' needs to be obtained..?!!
-
0) I cannot reproduce your error. Could you kindly provide the nc file?
1) The size of dense matrices in the calculation may be used to optimize certain settings for algorithms used by ATK. This is a quite complicated matter, and optimum settings depends on many different factors at the same time. We are currently working on a guide for such settings, but it's not done yet.
2) Did you check, that is, try it out?
-
I didn't check.....that's why I asked..., is it at all a feasible solution....?!!! / Otherwise, the computational load is huge....
Anyways, I have sent you the required *.nc files via e-mail..... (because, the total size of those files is crossing the limit....)
Regards_
Dipankar
-
2) Technically yes. If it's accurate or not is a separate matter of course :)
-
The error is curious. Do you still have the python script that generated the nc file with the dynamical matrix?
-
Yeahhh... why not!!! / Please find the attached files...... :)
-
2) Technically yes. If it's accurate or not is a separate matter of course :)
Anders Blom,
Thank you.... :)
-
Most likely the error is caused by using two different versions of ATK 2015.dev. During the development of a new version, we change the NC file format without warning and without adding backwards compatibility. So you probably have to rerun the script which generated the NC file containing the dynamical matrix with the same version of the code you use to read it. If that's the case already, then it might be a real bug, however.
-
I have run the calculations and confirm that the issue is due to using two different dev versions of ATK: One version for writing the nc file, and another version for opening it. To fix this, you should redo the calculation of the dynamical matrix with your current ATK dev version.
-
You are right Jess.... , the problem got fixed....once I had re-calculated the whole thing....using the current ATK dev version !!!
_____________
Instead...another one popped up...!!! :P (though, this might be a trivial one....but, I don't know where to tune...)
Traceback (most recent call last):
File "/home/dipankar_saha/Desktop/June15/IET_loop.py", line 58, in <module>
method='LOE',
File "./zipdir/NL/Analysis/InelasticTransmissionSpectrum.py", line 235, in __init__
File "./zipdir/NL/Analysis/InelasticTransmissionSpectrum.py", line 2580, in setAndCheckMethod
NL.ComputerScienceUtilities.Exceptions.NLValueError: The parameter "method" must be either NLFlag.LOE or NLFlag.XLOE.
__________________________________
Thanks and Regards_
Dipankar
-
Yes, that flag has recently been changed, but unfortunately the tutorial has not been updated accordingly.
When setting up the InelasticTransmissionSpectrum, the option "method" should be changed from
method='LOE'
to
method=LOE
that is, the argument LOE should not be given as a string.
-
Dr. Anders Blom,
Yess.....as you said...it was due to the usage of different versions of ATK dev ...!!! Thanks.... :)
_________
Apart from that, I wanted to ask you_
For bulk...while obtaining Ph. Bnd Struct. we set k-point sampling 1x1x1....and set the repeats (custom) in dynamical matrix as 3x3x3 or, 5x5x5 or, 7x7x7 etc. ..........
1) Now, while calculating the Ph. Trns. spectrum... what should be the repeats in Dij ....when it's 1-D device struct. ??!!
(Specially, when we are using a Classical Potential...... )
2) What happens, when we set.....
symmetrize=True, constrain_electrodes=True, and......use_equivalent_bulk=True ??
Regards_
Dipankar
-
Yes, that flag has recently been changed, but unfortunately the tutorial has not been updated accordingly.
When setting up the InelasticTransmissionSpectrum, the option "method" should be changed from
method='LOE'
to
method=LOE
that is, the argument LOE should not be given as a string.
Dr. Jess Wellendorff ,
Thanks a lot...but, if I do that ....error is now something different......!!
______________________________________________________________
File "./zipdir/NL/Analysis/InelasticTransmissionSpectrum.py", line 1609, in calculateInelasticTransmissionSpectrum
File "./zipdir/NL/ComputerScienceUtilities/ParallelTools/ParallelTools.py", line 630, in broadcastScipySparseMatrices
File "./zipdir/NL/Analysis/InelasticTransmissionSpectrum.py", line 270, in __init__
NL.ComputerScienceUtilities.Exceptions File "./zipdir/NL/Analysis/InelasticTransmissionSpectrum.py", line 1609, in calculateInelasticTransmissionSpectrum
.NLValueError: Root process 0 does not have a sparse matrix to be broadcasted.
File "./zipdir/NL/ComputerScienceUtilities/ParallelTools/ParallelTools.py", line 636, in broadcastScipySparseMatrices
File "./build/lib/python2.7/site-packages/scipy/sparse/base.py", line 400, in __getattr__
AttributeError: broadcast not found
-
1. For a 1D system, as bulk, you would use 1x1x7 (or similar), but for a device you would use 1x1x1
2. The keywords are almost self-explanatory.
"symmetrize" is the same keyword as always, and means that in the output, the dynamical matrix is made symmetric (due to numerical noise, it may not be, otherwise)
"constrain_electrodes" should always be True for inelastic transmission, the electron-phonon coupling is only computed in the scattering region, but set it to False for phonon transmission
"use_equivalent_bulk" means that the dynamical matrix is computed for the central region treated as a bulk system. This is a lot cheaper than computing all forces in device mode.