Author Topic: [HowTo] Generate NTOs from TDDFT  (Read 6130 times)

finrod

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
[HowTo] Generate NTOs from TDDFT
« on: March 17, 2020, 11:08:54 AM »
Since it took me a bit of time to figure out the relevant steps, I wanted to share a step-by-step description on how to calculate NTOs (natural transition orbitals) from TDDFT calculations for anyone who might struggle.

0) You need a successfully completed escf run.

1) In the command line open the folder containing the calculation and start the program 'proper'.

2) Type 'mos' to enter the orbital generation menu, then type 'dftnto'. This generates the files 'nto_occ' and 'nto_vir'. Close the sub menu using 'end'.

3) Type 'grid' to enter the visualisation menu. Then type 'nto 1-5' to obtain the first five orbital pairs (occ + vir). This generates the orbital files in the .plt format.
Typing 'nto' without the index number will give you an error message.

4) The files can be visualised directly within TmoleX by opening the job and clicking 'Orbital/Density Plot'.


Alternative way, just for reference:

3b) You can also quit 'proper' using 'q'.

4b) Edit the control file and add the following lines:
$pointval nto 1-5
$ntos_occ file=nto_occ
$ntos_vir file=nto_vir


5b) Run 'ridft -proper' from within the same folder. This again generates the orbital files in the .plt format.
« Last Edit: March 17, 2020, 11:27:51 AM by finrod »

shafikoff

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [HowTo] Generate NTOs from TDDFT
« Reply #1 on: November 08, 2023, 09:17:15 PM »
Hello,

I tried this approach to generate NTOs with proper after ricc2 calculation. The files in .plt format are generated, but Tmolex does not see them for some strange reason. In the same job folder Tmolex sees the td.plv file though and can visualize it. Now, funnyly, if I trick Tmolex by renaming the td.plv file to something else and then renaming a .plt  format NTO to td.plv, Tmolex visualizes it with no problem. So it looks like Tmolex has some glitch in regard of recognizing .plt files. I use the latest version of Tmolex (2023). Also, the original td.plv file and proper generated .plt files do not contain the molecular geometry, and visualized densities appear without the molecule... Is anyone aware of a way these problems can be addressed by?

Best regards,
Marsel

uwe

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 560
  • Karma: +0/-0
Re: [HowTo] Generate NTOs from TDDFT
« Reply #2 on: November 28, 2023, 11:38:44 AM »
Hello,

first of all: Since TmoleX version 2023 NTOs from TDDFT can be generated and visualized directly in the graphical user interface without the need to run proper manually.

On the command line:
Proper (since version 2021, V7.6) has an option dftnto which does both steps in one run without asking any questions. So after an escf run where you have calculated N excited states, you can call

proper -dftnto 3

to get the NTOs of the 3rd excitation. It creates the first 10 occupied and virtual NTOs and writes the contribution to a file named tddft-nto-data.dat

Note that using this option when having symmetry is kind of dangerous because the name of the resulting plt files do not contain the IRREP name (a, b, a', e, ...). I'd recommend to run proper the non-automated way for symmetric cases. Or at least check the output of proper -dftnto <N>.

Final remark: Yes, TmoleX will show all plt files it finds in the job directory and lists them for visualization. So virtually everything can be put in there.
But the problem is that TmoleX does not re-read the content of the directory while it is running. Some tasks that are run do trigger this, but it is not easy to find out which ones... the only safe way is to end TmoleX and restart it. Or use COSMObuild (stand-alone version) and use File -> Open -> in Plot Viewer and change the 'Files of Type' to be shown from Molecules to TURBOMOLE plots.

There is an enhancement request for BIOVIA to also re-read in all plt files if a user uses the 'Refresh Job' option in the right-mouse menu when clicking on a  job directory.

Best Regards

shafikoff

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [HowTo] Generate NTOs from TDDFT
« Reply #3 on: November 30, 2023, 02:58:09 AM »
Dear Uwe,

Thank you for your reply. However, my comment was more related to ricc2 calculations as I'm trying to visualize transition NTOs after a CC2 calculation. I did make .plt format hole and electron density files with proper, but Tmolex does not want to see them in the directory, neither after restart nor after job refresh. I can visualize a .plt file only by making it to pretend to be td.plv file by renaming it.  The original td.plv file, which is in the directory after cc2 calculation and seen by Tmolex, has first to be renamed to smth else. Other problem I have, is that after I trick Tmolex to visualize .plt like I described, I still see only the densities and not the molecular frame, which makes it not very useful for publication...

Best regards,
Marsel

uwe

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 560
  • Karma: +0/-0
Re: [HowTo] Generate NTOs from TDDFT
« Reply #4 on: November 30, 2023, 08:54:15 AM »
Hello,

OK, if you have a plt or plv file (plv is the same as plt for scalar data while plv can also contain vectors on the grid) and the coord file, just Open the stand-alone COSMObuild tool. It is the same viewer as the 3D Molecular Builder within TmoleX, but as an own app it has a menu. There you can read in plt/plv files as well as coordinates, and you can simply open them in the same window. So you should see the molecule as well as the surface.
Right-click on the surface to change colour and opacity to change the level of transparency of the surface.

TmoleX 2023 should show all plv files in the job directory, they can have arbitrary names. Perhaps it is better not to name files you have created outside of TmoleX like a known file name like td (which is total density). Just rename plt files to .plv if plv works for you but not plt...

Hope this helps.

shafikoff

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [HowTo] Generate NTOs from TDDFT
« Reply #5 on: November 30, 2023, 08:31:47 PM »
Dear Uwe,

I have tried a number of tricks to make Tmolex to read those .plt format NTO files, including changing them to .plv. Tmolex does not see the files. The only way is to first rename the td.plv to smth else, and then name the .plt file as td.plv. This works, I think because Tmolex initially sees the original td.plv file in the directory. Any other names or extensions do not work. This is the Windows version of Tmolex2023. If there is any way to send the file(s) and you are interested in it, I could send you a .plt file or the whole job directory so you could see it yourself.

I tried to open the .plt files with plotviewer of COSMObuild, as you suggested, and it  indeed seems to work. Need to explore it a bit more. Thank you!

Best regards,
Marsel
« Last Edit: November 30, 2023, 10:38:15 PM by shafikoff »

shafikoff

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [HowTo] Generate NTOs from TDDFT
« Reply #6 on: December 25, 2023, 09:51:28 PM »
Hello,

I was looking for a "feature request" branch in the forum but could not find such and therefore will put it here.
It would be really helpful and convenient if NTOs could be generated in the .molden format files containing both molecular geometry and the densities, instead of .plt
Then for analysis and visualization one could use any visualization program that works with .molden files.

Thanks