QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: fly on April 24, 2012, 11:43
-
I have calculated a system using ATK2008-10. We can obtain the PDOS using the script below. But if the K-point sampling in x and y directions is 3*3. How do I modify this script?
from ATK.TwoProbe import *; import numpy
from projected_density_of_states import *
scf = restoreSelfConsistentCalculation('lih2li.nc')
projection_atoms = [5,6]
pdos = calculateProjectedDensityOfStates(scf,numpy.arange(-3,3.01,0.01)*Units.eV,
projection_atoms = projection_atoms)
nlPrint(pdos)
from ATK.TwoProbe import *; import numpy as np
def calculateProjectedDensityOfStates(self_consistent_calculation = None,
energies = None,
brillouin_zone_integration_parameters = None,
green_function_infinitesimal = None,
projection_atoms = []):
"""
Written by Nordland !
Extreme usage of ATK backengine!
Module for calculate the density of states projected onto the atoms.
Uses the same interfaces as calculateDensityOfStates, but is extended with a parameter
called projection_atoms.
Give the projection atoms as a sequence of the indicies of the atoms to project onto
for instance projection_atoms = [3,6,7,8]
"""
atom_container = self_consistent_calculation._attributeContainer().getAtomContainer("AtomContainer")
number_of_atoms = atom_container.numberOfAtoms()
old_contact = [(atom_container.atoms()).isContact() for i in range(number_of_atoms)]
first_atom_index = \
np.where([ not(atom_container.atoms()).isElectrode() for i in range(number_of_atoms)])[0][0]
new_contact = np.array([False]*number_of_atoms)
indicies = np.array(projection_atoms)+first_atom_index
new_contact[indicies] = True
# Insert the new contact atoms.
for i,c in enumerate(new_contact):
(atom_container.atoms()).setContact(bool(c))
pdos = calculateDensityOfStates(self_consistent_calculation,
energies,
brillouin_zone_integration_parameters,
green_function_infinitesimal)
# Restore the old contact atoms.
for i,c in enumerate(old_contact):
(atom_container.atoms()).setContact(bool(c))
# Return the projected density of states.
return pdos
-
brillouin_zone_integration_parameters = None
-------------->
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((3,3,1))
-
When I change the script from ‘brillouin_zone_integration_parameters = None’ to brillouinZoneIntegrationParameters((3,3,1)), it does not work. But if I modify the script as brillouinZoneIntegrationParameters((3,3)), it works well. Is it reasonable for this modification. If it is reasonable, whether this means the calculation for PDOS is always written as ‘brillouinZoneIntegrationParameters((3,3))’ when the K-points sampling is 3*3*100 or 3*3*500?
-
Your modification is reasonable. Sorry, there is a mistake in my last reply. ",1" should be removed. For the two-probe system, only the x-y directions are periodic.
-
Thanks!
-
:)hi,
i m doing MGGA with Cu2O for bandstructure so want to edit script frm double zeta double polarized toGGAPBEHGH
To print a list of the orbitals in a basis set,i use these lines of code:
basis_set = BasisGGAPBEHGH.Silicon_4_Tier_3
for o in basis_set.orbitals():
print "%i%s" % (o.principalQuantumNumber(),'spdf'[o.angularMomentum()]),
[/font] [/color] bt i got error message
|
| Atomistix ToolKit 11.8.2 [Build 09819e5] |
| |
+------------------------------------------------------------------------------+
Traceback (most recent call last):
File "c:\users\skf1f5~1.sha\appdata\local\temp\7795439354356883.py", line 3, in <module>
basis_set = BasisGGAPBEHGH.Cuprite_4_Tier_3
NameError: name 'BasisGGAPBEHGH' is not defined
and also change
basis_set = LDABasis.DoubleZetaDoublePolarized
to
basis_set = BasisGGAPBEHGH.Silicon_4_Tier_3
as well as for cuprite
what i can do, i want that for Cu2O,
pls assist me
:'( :)
-
The new Tier basis sets were released in a later version of ATK than you have.
Besides, there is no basis set for Cuprite, the basis sets are for elements, so there are (in newer ATK) basis sets like BasisGGAPBEHGH.Copper_11_Tier_2, etc.
-
Thanks for reply,
I have download some pseudopotential for Cu from quantum expresso, make it winzip and save in atk directory, will it work?
-
Who knows, maybe :) But I don't really see much reason for it, ATK has quite good pseudopotentials, and ultimately the quality of the calculations is determined by the basis set, so unless you plan to fit your own basis set to those pseudopotentials, I don't think you will have much success with this approach.