Author Topic: Grimme's DFT-D2 semi-empirical model for van der Waals interactions  (Read 19807 times)

0 Members and 1 Guest are viewing this topic.

Offline marmotte

  • Heavy QuantumATK user
  • ***
  • Posts: 63
  • Country: sa
  • Reputation: 0
    • View Profile
Dear ATK team,

Many thanks for the new version 13.8.b1. It is really and excellent version. :D

I need to know how to setup calculations with D2-DFT ? Could you please help on how to set-up these calculations ?

Thank you

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
We are preparing a tutorial on this. For now, please see the two attached files.

Edit: After some bug fixes, the DFTD2 script has been moved into our core functionality. Attached now is a pure script for graphene that works without any additional import statements.
« Last Edit: October 20, 2013, 17:40 by Anders Blom »

Offline marmotte

  • Heavy QuantumATK user
  • ***
  • Posts: 63
  • Country: sa
  • Reputation: 0
    • View Profile
Hi Anders, Thank you  ! I think I will wait for your tutorial and may be an upgraded version because I still have problem when running these script such as "import extendedCalculatorWithDFTD2" ...please advise if we need to add/on some extra module for that.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
You just need to place the two files I attached in the same directory, and run "atkpython graphene.py" in this directory.

Offline marmotte

  • Heavy QuantumATK user
  • ***
  • Posts: 63
  • Country: sa
  • Reputation: 0
    • View Profile
Hi Anders,
I followed your instruction and I'm getting this error

                            |--------------------------------------------------|
Calculating Kinetic Matrix : ==================================================
Traceback (most recent call last):
  File "graphene.py", line 68, in <module>
    optimizer_method=QuasiNewton(),
  File "./zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 211, in OptimizeGeometry
  File "./zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 263, in runRelaxation
  File "./zipdir/NL/Dynamics/ASEAtomsInterface.py", line 173, in get_forces
  File "./zipdir/NL/Dynamics/ASEAtomsInterface.py", line 97, in _update
  File "./zipdir/NL/Analysis/TotalEnergy.py", line 26, in __init__
  File "/home/goumris/D2-DFT/graphene/DFTD2.py", line 173, in _calculateTotalEnergy
    translation = NLEngine.Cartesian3DDouble()
AttributeError: 'module' object has no attribute 'Cartesian3DDouble'

Timing:                          Total     Per Step        %

--------------------------------------------------------------------------------

Exchange-Correlation    :       6.53 s       0.65 s      25.53% |=============|
Valence Density         :       3.73 s       0.37 s      14.59% |=======|
Real Space Integral     :       3.65 s       0.37 s      14.29% |=======|
Diagonalization         :       3.06 s       0.34 s      11.97% |======|
Constant Terms          :       0.74 s       0.74 s       2.89% |=|
Difference Density      :       0.68 s       0.07 s       2.67% ||
Basis Set Generation    :       0.48 s       0.48 s       1.88% ||
Real Space Basis        :       0.27 s       0.27 s       1.06% ||
Core Density            :       0.11 s       0.01 s       0.44% |
Neutral Atom Potential  :       0.07 s       0.07 s       0.26% |
Hartree Potential       :       0.04 s       0.00 s       0.17% |
Mixing                  :       0.04 s       0.00 s       0.17% |
Setting Density Matrix  :       0.00 s       0.00 s       0.01% |
Hubbard Term            :       0.00 s       0.00 s       0.00% |
--------------------------------------------------------------------------------

and when I want to run the script graphne.py from the VNL interface, I have also this error

+------------------------------------------------------------------------------+
| NanoLanguageScript execution started                                         |
+------------------------------------------------------------------------------+
# ------------------------------------------------------------ #
# This time-limited preview version will expire on 2013-10-01. #
# ------------------------------------------------------------ #
+------------------------------------------------------------------------------+
|                                                                              |
| Atomistix ToolKit 13.8.b1 [Build a1c2415]                                    |
|                                                                              |
+------------------------------------------------------------------------------+
Traceback (most recent call last):
  File "/tmp/1866424033809726.py", line 4, in <module>
    from DFTD2 import extendedCalculatorWithDFTD2
ImportError: No module named DFTD2
+------------------------------------------------------------------------------+
| NanoLanguageScript execution finished                                        |
+------------------------------------------------------------------------------+

Thx

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
It's quite simple :)

In the first case, "atkpython" actually refers to 12.8. If you check your PATH settings to make sure you run 13.8 instead, it will work.

If you want to do it from within VNL, create a new project located in the directory where the two files are located (VNL menu, choose Project>New). Once the project is defined and opened, you should see the two files - just drop graphene.py on the Job Manager.

Offline marmotte

  • Heavy QuantumATK user
  • ***
  • Posts: 63
  • Country: sa
  • Reputation: 0
    • View Profile
I did it using Vnl and also with new project. But still have problem with it

+------------------------------------------------------------------------------+
| NanoLanguageScript execution started                                         |
+------------------------------------------------------------------------------+
# ------------------------------------------------------------ #
# This time-limited preview version will expire on 2013-10-01. #
# ------------------------------------------------------------ #
+------------------------------------------------------------------------------+
|                                                                              |
| Atomistix ToolKit 13.8.b1 [Build a1c2415]                                    |
|                                                                              |
+------------------------------------------------------------------------------+
Traceback (most recent call last):
  File "/tmp/4479250470234043.py", line 4, in <module>
    from DFTD2 import extendedCalculatorWithDFTD2
ImportError: No module named DFTD2
+------------------------------------------------------------------------------+
| NanoLanguageScript execution finished                                        |
+----------------------------------------------------------------------------

could you please help me ?

Many thanks

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
I see you are on Linux. I'm on Windows, it works fine. I have to investigate. However, it would help a lot if you could provide the EXACT steps you follow.

Mine are: Drop the file graphene.py on Job manager. Click Run.

For now run on the command line instead.
« Last Edit: August 28, 2013, 15:20 by Anders Blom »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Please insert these two lines at the top of the script, before running it:
Code: python
import sys
print sys.path
and see if the project directory is part of the output. It should be!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
This turns out to be a bug in the beta-version. It can be solved by adding
Code: python
import sys, os
sys.path.append(os.curdir)
to the beginning of graphene.py.

Offline ramkrishna

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 253
  • Country: us
  • Reputation: 5
    • View Profile
Re: Grimme's DFT-D2 semi-empirical model for van der Waals interactions
« Reply #10 on: September 23, 2013, 15:46 »
Dear Sir,
     Does this DFT-D2 come with the GGA calculations only or we can use it with LDA also??

Regards
Ramkrishna

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Grimme's DFT-D2 semi-empirical model for van der Waals interactions
« Reply #11 on: September 23, 2013, 16:01 »
Yes, the vdW potential is something you add to the existing exchange-correlation potential, whichever it is.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Grimme's DFT-D2 semi-empirical model for van der Waals interactions
« Reply #12 on: September 23, 2013, 17:08 »
You can use it with LDA, however it is important to know that the functional is fitted to give correct results for GGA.
There is a global scaling parameter in the code called S. The global scaling parameter S has been optimized for several different DFT functionals such as PBE (S=0.75), BLYP (S=1.2), and B3LYP (S=1.05). Therefore before using it with any other functional one should really consider what is the appropriate value of S.

Offline ams_nanolab

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 389
  • Country: in
  • Reputation: 11
    • View Profile
Re: Grimme's DFT-D2 semi-empirical model for van der Waals interactions
« Reply #13 on: September 25, 2013, 08:46 »
Dear Dr. Blom,

I am getting the following error running the script for mos2 , i think some additions are needed in the D2DFT.py file in the R0 and C6 map (I am guessing).

For graphene it is running fine. So I guess it is the absence of Mo and S in the D2DFT.py , kindly give the parameters.

Attached is the screenshot.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Grimme's DFT-D2 semi-empirical model for van der Waals interactions
« Reply #14 on: September 25, 2013, 09:16 »
Yes, precisely. If you can find a reference for the relevant values in the literature, you can easily insert them yourself into the list of supported elements in the script.