Author Topic: Optimization geometry at different electron temperature  (Read 11503 times)

0 Members and 1 Guest are viewing this topic.

Offline Jenny

  • Heavy QuantumATK user
  • ***
  • Posts: 61
  • Reputation: 0
    • View Profile
Optimization geometry at different electron temperature
« on: February 17, 2015, 00:59 »
Dear all,

recently, I tried to get an optimized unit cell configuration at different temperature. However, when I set the electron temperature at different temperature (ex: room temperature 300K, low temperature 50K, high temperature 400K), the optimized unit cells have the same configuration which doesn't match my expectation. I applied DFT method here and attached the script I used.
Please give me an explanation or any reference for the explanation.

Jenny.

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #1 on: February 17, 2015, 07:18 »
This electron temperature parameter would affect the electron occupation, rather than the lattice or atoms. Your results look quite normal. The geometry optimization is performed only for zero temperature of ions (atoms).

To consider the temperature effect on the lattice atoms, you may try the molecular dynamics simulation at the different temperature, where the ion temperature is used to control the kinetic energy of atoms.

In short, you need to read the background of methodology in ATK-DFT  to understand the difference between "electron temperature" and "ion (atomic) temperature".
http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/chap.atkdft.html#sect1.atkdft.background
http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.moleculardynamics.html

« Last Edit: February 17, 2015, 07:24 by zh »

Offline Jenny

  • Heavy QuantumATK user
  • ***
  • Posts: 61
  • Reputation: 0
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #2 on: February 20, 2015, 20:45 »
This electron temperature parameter would affect the electron occupation, rather than the lattice or atoms. Your results look quite normal. The geometry optimization is performed only for zero temperature of ions (atoms).

To consider the temperature effect on the lattice atoms, you may try the molecular dynamics simulation at the different temperature, where the ion temperature is used to control the kinetic energy of atoms.

In short, you need to read the background of methodology in ATK-DFT  to understand the difference between "electron temperature" and "ion (atomic) temperature".
http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/chap.atkdft.html#sect1.atkdft.background
http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.moleculardynamics.html

Zh, thank you for your explanation. This really  helps a lot. But for "The geometry optimization is performed only for zero temperature of ions (atoms)" here you mentioned, "zero temperature" means 0K or room temprature?

Jenny

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Optimization geometry at different electron temperature
« Reply #3 on: February 20, 2015, 22:22 »
On what scale is room temperature zero? :) Of course it means 0 K.

Offline Jenny

  • Heavy QuantumATK user
  • ***
  • Posts: 61
  • Reputation: 0
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #4 on: February 27, 2015, 00:56 »
Thank you for the reply. When I looked into the molecular dynamics method, I couldn't find any convergence criteria like max force or energy. I don't understand. :-\

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #5 on: February 27, 2015, 02:52 »
For the molecular dynamics simulations, the important thing is what kind of ensembles is chosen. There is no any convergence criteria in the force or energy.
Please learn more about the background of molecular dynamics:
http://en.wikipedia.org/wiki/Molecular_dynamics

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys

Offline Jenny

  • Heavy QuantumATK user
  • ***
  • Posts: 61
  • Reputation: 0
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #7 on: March 2, 2015, 21:07 »
And even better:
http://quantumwise.com/publications/tutorials/item/732-basic-molecular-dynamics-tutorial

Dr. Anders Blom,

Thank you for the reference. It helped a lot. I still have two questions.
1. Since I'm using atk-13.8.1 version. The movie tool is not available in this version. Is there any method I can find the energy or temperature curves?
2. If I'd like to do some modification based on the molecular dynamics algorithm here, where can I find the original coding part?

Thanks a lot.

Jenny

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Optimization geometry at different electron temperature
« Reply #8 on: March 2, 2015, 23:00 »
1. I guess you can script yourself out of it using the manual, but older versions are not supported. If you have the trajectory you can compute the corresponding quantities image by image and plot the data.

2. We use the ASE library for most of the MD functionality, which is open source. The byte-compiled files (pyc) are in lib/{python-2.7}/site-packages/ase/md, but you could replace these with your own if you get the sources from ASE (see https://wiki.fysik.dtu.dk/ase/ase/md.html).

In general, ATK is however designed in a way that often lets you solve problems in the Python interface without modifying the basic source code. So if you give a hint what you want to achieve, there may be a lot simpler option than fiddling with the source code.

Offline Jenny

  • Heavy QuantumATK user
  • ***
  • Posts: 61
  • Reputation: 0
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #9 on: March 5, 2015, 20:05 »
1. I guess you can script yourself out of it using the manual, but older versions are not supported. If you have the trajectory you can compute the corresponding quantities image by image and plot the data.

2. We use the ASE library for most of the MD functionality, which is open source. The byte-compiled files (pyc) are in lib/{python-2.7}/site-packages/ase/md, but you could replace these with your own if you get the sources from ASE (see https://wiki.fysik.dtu.dk/ase/ase/md.html).

In general, ATK is however designed in a way that often lets you solve problems in the Python interface without modifying the basic source code. So if you give a hint what you want to achieve, there may be a lot simpler option than fiddling with the source code.

Thank you, Dr. Blom.

When I did the MD simulation, it failed and gave information saying "Traceback (most recent call last):
  File "c:\users\mems\appdata\local\temp\7143933610221804.py", line 136, in <module>
    method=method
  File ".\zipdir\NL\Dynamics\MolecularDynamics\MolecularDynamics.py", line 215, in MolecularDynamics
  File ".\build\atkpython\lib\site-packages\ase\md\nptberendsen.py", line 110, in step
  File ".\build\atkpython\lib\site-packages\ase\md\nptberendsen.py", line 100, in scale_positions_and_cell
  File ".\zipdir\NL\Dynamics\ASEAtomsInterface.py", line 346, in set_cell
NL.ComputerScienceUtilities.Exceptions.NLExecutionError: The variation of cell size during the step was too large."

Is there anyway I can solve the problem?

I've attached the script in the attachment.

Offline Jenny

  • Heavy QuantumATK user
  • ***
  • Posts: 61
  • Reputation: 0
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #10 on: March 5, 2015, 23:15 »
1. I guess you can script yourself out of it using the manual, but older versions are not supported. If you have the trajectory you can compute the corresponding quantities image by image and plot the data.

2. We use the ASE library for most of the MD functionality, which is open source. The byte-compiled files (pyc) are in lib/{python-2.7}/site-packages/ase/md, but you could replace these with your own if you get the sources from ASE (see https://wiki.fysik.dtu.dk/ase/ase/md.html).

In general, ATK is however designed in a way that often lets you solve problems in the Python interface without modifying the basic source code. So if you give a hint what you want to achieve, there may be a lot simpler option than fiddling with the source code.

Also, Dr. Blom. Is it possible for me to access the original code(py), since decompile the code would cause unwanted problem?

Thank you very much.

Jenny

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Optimization geometry at different electron temperature
« Reply #11 on: March 5, 2015, 23:43 »

Offline Julian Schneider

  • QuantumATK Staff
  • QuantumATK Guru
  • *****
  • Posts: 164
  • Country: dk
  • Reputation: 25
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #12 on: March 6, 2015, 19:31 »
Hi Jenny,

Unless you are explicitly interested in thermal or temperature dependent properties (e.g. thermal expansion), performing a geometry optimization at 0K and then calculating the desired properties based on the final structure is in fact the most common approach, in particular when you are interested in electronic-structure-related properties.
I see that your MD temperature is 50 K, and for this low temperature I would expect the difference to the 0K-structure to be very small.
The disadvantage of finite-temperature-structures is that there is no unique structure but rather an ensemble of configurations that you would have to average over.
If you really want to use finite temperature structures, then in your case, you would have to use the the NPTMelchionna-thermostat isntead of the NPTBerendsen-thermostat. The reason is that you have an anisotropic structure that is only periodic in z-direction, and NPTBerendsen treats everything as isotropic (cf. MD-tutorial), which probably causes your error message.
So you'd have to use something like:

method = NPTMelchionna(
    time_step=1*femtoSecond,
    reservoir_temperature=50*Kelvin,
    external_stress=1*bar,
    thermostat_timescale=100*femtoSecond,
    barostat_timescale=100*femtoSecond,
    bulk_modulus=1e+06*bar,
    initial_velocity=initial_velocity,
    mask=[[False, False, False], [False, False, False], [False, False, True]]
)

Offline Om Prakash Upadhyay

  • Heavy QuantumATK user
  • ***
  • Posts: 40
  • Country: in
  • Reputation: 0
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #13 on: February 18, 2017, 04:23 »
Actually what is the difference between electron temperature, atomic temperature and room temperature?

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Optimization geometry at different electron temperature
« Reply #14 on: February 18, 2017, 11:01 »
To understand the difference among them, my suggestion is to first understand the "Born–Oppenheimer approximation" used in the DFT calculations:
https://en.wikipedia.org/wiki/Born%E2%80%93Oppenheimer_approximation