Author Topic: Python script for PDOS  (Read 3417 times)

0 Members and 1 Guest are viewing this topic.

Offline PR

  • Heavy QuantumATK user
  • ***
  • Posts: 28
  • Country: in
  • Reputation: 0
    • View Profile
Python script for PDOS
« on: July 23, 2014, 13:52 »
Dear sir,
I want to plot PDOS using Gaussian smoothing function. I tried the script given in the end of page on below mentioned link, but it plots total DOS instead of PDOS.
http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.densityofstates.html

Can you please send me the script to plot PDOS by Gaussian function.


Regards
PR

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5538
  • Country: dk
  • Reputation: 90
    • View Profile
    • QuantumATK at Synopsys
Re: Python script for PDOS
« Reply #1 on: July 24, 2014, 06:41 »
As you can see from that page you can also provide a ProjectionList to the gaussianSpectrum method, that will give the PDOS, projected according to the projection list.

Offline PR

  • Heavy QuantumATK user
  • ***
  • Posts: 28
  • Country: in
  • Reputation: 0
    • View Profile
Re: Python script for PDOS
« Reply #2 on: July 24, 2014, 07:58 »
Thanks for quick your reply Mr. Blom.
I have two questions.
(1) I have already optimized the geometry and trying to calculate the atom PDOS from .nc file. I can find PDOS from custom analyzer using tetrahedron (by default). Is there any way to calculate it using Gaussian method from the same file.   

(2) In the script you mentioned, I need to give molecular configuration in the code, but While doing so, I am getting the error as :


    configuration=molecule_configuration,
NameError: name 'molecule_configuration' is not defined
.

Please tell me how to proceed with this error.
Attached is the python script which I was trying to simulate.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5538
  • Country: dk
  • Reputation: 90
    • View Profile
    • QuantumATK at Synopsys
Re: Python script for PDOS
« Reply #3 on: July 24, 2014, 08:13 »
I would recommend to use the DOS analyzer in VNL, then you don't need to worry about the Python code... Sure, it only gives tetrahedron spectrum, but why, exactly, do you need the Gaussian version of the DOS? The tetrahedron method is generally better for bulk materials unless you already have a very high k-point sampling (in which case it's also good). Still, as long as you have the DOS object you can plot it using either tetrahedron or Gaussian. You only need to compute the DOS once. But you can't just take code from two scripts and put them together, you need to understand how the code works. Of course you don't need any molecule configuration if you are working with a bulk configuration - it's just that a molecule is used as an example of how to use the ProjectionList class. What you need is to take the Gaussian spectrum example from the DOS manual page and just add a ProjectionList defining what you want to project on. Like
Code: python
dos_g = dos.gaussianSpectrum(energies, broadening = 0.2*eV, projection_list=ProjectionList(elements=[Silicon]))
or use atom indices, or angular momenta, depending on what you want to project on.