[CP2K-user] [CP2K:11337] help with density matrix of dbcsr_type_no_symmetry and hfx_energy calculation

hut... at chem.uzh.ch hut... at chem.uzh.ch
Fri Mar 1 09:55:31 UTC 2019


Hi

remember that all operations in CP2K are programmed for symmetric
operators/matrices. For the one electron terms desymmetrizing
might do the trick, but for the HF exchange you might be out of luck.
Within the GPW formalism you could use the methodology from the
qs_active_space_methods.F Code.

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter                         Phone : ++41 44 635 4491
Institut für Chemie C                FAX   : ++41 44 635 6838
Universität Zürich                   E-mail: hut... at chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp... at googlegroups.com wrote: -----
To: "cp2k" <cp... at googlegroups.com>
From: pavan.... at gmail.com
Sent by: cp... at googlegroups.com
Date: 02/26/2019 12:45AM
Subject: [CP2K:11337] help with density matrix of dbcsr_type_no_symmetry and hfx_energy calculation

Hello CP2K Developers,

I am working on calculating electronic coupling element using a transformation of MO sets obtained for two different states A and B (in GPAW formalism). For this purpose I need to pass a modified density, which is non-symmetric, to make one more energy calculation. I am passing the force_env to a separate module from a mixed_energy calculation, where I am doing the following calls with the modified density:

1. CALL qs_rho_get(rho, rho_ao=rho_ao, rho_ao_kp=rho_ao_kp)
2. rho_ao_kp(1:nspins, 1:1) => density_modified(1:nspins)            ! density_modified is a dbcsr_type_no_symmetry matrix
3. rho_ao => density_modified
4. CALL qs_rho_set(rho, rho_ao=rho_ao, rho_ao_kp=rho_ao_kp)
5. CALL qs_rho_update_rho(rho, qs_env=qs_env)
6. CALL qs_ks_did_change(ks_env, rho_changed=.TRUE., potential_changed=.TRUE.)
7. CALL qs_ks_update_qs_env(qs_env, just_energy=.TRUE., calculate_forces=.FALSE.)

 I could get the first 6 steps right when I am doing a serial version. First question is whether my approach is correct in order to do another energy calculation with the new modified density?  I am trying to follow the same process as an scf loop update here, and using the qs_env for state B since only the density changes and rest all parameters remain same.

I had a problem with the core matrix trace calculations, which I solved by desymmetrizing matrixkp_h and matrixkp_t before passing to calculate_ptrace(), and that worked well. Now I am having a trouble with hfx calculation, in particular, in hfx_energy_potential.F -> integrate_four_center() -> get_full_density() subroutine. In get_full_density() subroutine, number_of_p_entries doesn't seem to match the new non-symmetric density matrix which results in the sendbuffer (hfx_communication.F: line 145) going out of bounds. The conditional statement with dbcsr_iterator_blocks_left(iter) is still true and is causing an out of bounds error. Can you please suggest a fix for this?  

Another naive question: Other than this are there any parts of build kohn-sham matrix routine that are resistant to a non-symmetric density matrix?

On a separate note, there is a harmless bug in the write_matrix_gen() subroutine where the string formats are interchanged for the omit_header cases at output (lines 544 and 587) which gives an unformatted transfer error during run-time.  


Thank you very much for your time, and please let me know if the questions are ambiguous, I will try to provide more information.

Best Regards,
Pavan.
  
  -- 
 You received this message because you are subscribed to the Google Groups "cp2k" group.
 To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com.
 To post to this group, send email to cp... at googlegroups.com.
 Visit this group at https://groups.google.com/group/cp2k.
 For more options, visit https://groups.google.com/d/optout.




More information about the CP2K-user mailing list