Author Topic: modification of script  (Read 5164 times)

0 Members and 1 Guest are viewing this topic.

Offline fly

  • Regular QuantumATK user
  • **
  • Posts: 20
  • Reputation: 0
    • View Profile
modification of script
« 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

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: modification of script
« Reply #1 on: April 24, 2012, 13:09 »
brillouin_zone_integration_parameters = None
-------------->
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((3,3,1))

Offline fly

  • Regular QuantumATK user
  • **
  • Posts: 20
  • Reputation: 0
    • View Profile
Re: modification of script
« Reply #2 on: April 25, 2012, 03:56 »
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?

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: modification of script
« Reply #3 on: April 25, 2012, 09:48 »
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.
« Last Edit: April 25, 2012, 09:50 by zh »

Offline fly

  • Regular QuantumATK user
  • **
  • Posts: 20
  • Reputation: 0
    • View Profile
Re: modification of script
« Reply #4 on: April 25, 2012, 15:14 »
Thanks!

Offline yogita

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: modification of script
« Reply #5 on: February 14, 2013, 08:46 »
:)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

 :'( :)

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: modification of script
« Reply #6 on: February 14, 2013, 09:31 »
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.

Offline yogita

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: modification of script
« Reply #7 on: February 14, 2013, 12:25 »
Thanks for reply,


I have download some pseudopotential for Cu from quantum expresso, make it winzip and save in atk directory, will it work?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: modification of script
« Reply #8 on: February 14, 2013, 22:32 »
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.