Closed Elvin2527 closed 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.
The commit with the changes I mentioned above is in
I believe, this issue can now be closed.
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.
params['istate']
used for? In the README.md file, it is explained that bothinit_states
andparams['istate']
contain the initial states to start the dynamics from. What is the difference between these two parameters?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?