Quantum-Dynamics-Hub / libra-code

https://quantum-dynamics-hub.github.io/libra/index.html
GNU General Public License v3.0
51 stars 47 forks source link

a couple of questions on the parameter settings in the step4 of the Libra/CP2K workflow for NA-MD #147

Closed Elvin2527 closed 2 years ago

Elvin2527 commented 2 years ago

I am doing some testing calculations using the Libra/CP2K workflow for NA-MD. I have a couple of questions on the parameter settings in step4_cp2k.

  1. What is params['istate'] used for? In the README.md file, it is explained that both init_states and params['istate'] contain the initial states to start the dynamics from. What is the difference between these two parameters?
  2. In the params_common, the initial nuclear configurations are determined by "x0":[-4.0], "p0":[4.0], "masses":[2000.0], "k":[0.01], How to choose the proper values for these parameters for specific systems?
  3. Along with Q2, is it possible to use the nuclear configurations from the MD trajectory in step1 as the initial conditions for the nuclear part, which was adopted in the Libra/QE NA-MD workflow? Thanks a lot for your help.
alexvakimov commented 2 years ago

Hi Fulu Zheng,

This is a great question so thank you for putting it here. 1) params['istate'] is the actual parameter that defines the initial electronic state. It is a list of two numbers - the first element of this list is the selection of representation ( 0 - diabatic, 1 - adiabatic ), the second elements - is the index of the state. However, when used with the step4.namd_workflow this parameter acts more of a placeholder. In this case, the input init_states going into this function is used to run calculations starting with all listed initial electronic states (the representation is used as it is defined in params['istate'] ). Same happens with the tsh_methods - according to this list, some parameters in the params are also redefined according to what they are supposed to be for the selected method. Please see in libra_py.dynamics.tsh.recipes.set_method to know what parameters are actually redefined.

2) The parameters are chosen according to your problem: x0 and p0 are the centers of initial coordinates and momenta for all DOFs - these should be lists of N_dof elements, all in a.u. These will be used to eventually generate distributions of initial coordinates and momenta around these centers. The parameter k is the force constant (in a.u.) for the harmonic oscillator that determines the width of the Gaussians which are the ground-state eigenfunctions of the corresponding HO.

In fact, you are lucky - I have recently been looking into Tully's model problems again, and have added the corresponding relationships in the libra_py.dynamics.tsh.compute.init_nuclear_dyn_var function (to be committed shortly, so pls check for the updates of the code).

And of course masses are just masses of all DOFs in a.u.

3) Not exactly sure what you mean - but yeah, you can always take random coordinates from the step1 trajectories and use them as the initial conditions. There are different levels of wrapping for various Libra functions - one can control how to initialize the coordinates sampling - again see the init_nuclear_dyn_var function docstring. For now, the step4.namd_workflow wrapper doesn't yet allow the options for that but I'm gonna fix it shortly.

alexvakimov commented 2 years ago

The commit with the changes I mentioned above is in

alexvakimov commented 2 years ago

I believe, this issue can now be closed.