Can we also set params["energy_units"] = "eV" for the libra code?

72 views
Skip to first unread message

丁一

unread,
Dec 4, 2019, 7:17:16 AM12/4/19
to Quantum-Dynamics-Hub
Dear developers:
  I have lots of Ham_re and Ham_im files for the pyxaid code. 
  These files use the eV as the energy units.
  Following the Example9a_NAMD_MoS2 of libra, I want to use the new libra code.
  However, I do not know whether there is a params["energy_units"]='eV' setting for the libra code.
  If we want use the old Ham_re and Ham_im files from the pyxaid code, what are the right energy units that can directly used for the libra code.
  Best Wishes,
  
Yi Ding

Alexey Akimov

unread,
Dec 4, 2019, 9:21:22 AM12/4/19
to Quantum-Dynamics-Hub
Dear Yi Ding,

Libra uses the atomic units system in most of its input and output, so before you use your files with properties in eV units, you'd need to convert them to a.u.

This can be done for instance by the functions:

transform_data(X, params) and   unit_conversion(X, scaling_factor) from the data_conv sub-module of libra_py module

Also, you may find it useful to use this function:
scale_NACs(hvib, alp), from the same module - but this one scales only NACs, not energies. The ones above are more general.

Also, see the example of usage of the scale_NAC function in this example: Example9a_NAMD_MoS2/X-NA-MD-MoS2.ipynb, although for a slightly-different purpose.

Hope this helps,
Alexey

丁一

unread,
Dec 6, 2019, 8:42:50 AM12/6/19
to Quantum-Dynamics-Hub
Thank you for your reply.
My Ham_re files use the eV as the unit, and the Ham_im files adopts the eV/fs.
For the libra code, the  Ham_re files should be changed to Ry or Ha as their units? Similrly, for the Ham_im files, what is the units for it, Ry/fs ?


Alexey Akimov

unread,
Dec 6, 2019, 9:09:43 AM12/6/19
to Quantum-Dynamics-Hub

Both Ham_re and Ham_im are in Ha units (atomic units). 

Keep in mind, Ham_im = hbar*<psi_i | d/dt | psi_j>, so they have units of energy, not energy/time


Reply all
Reply to author
Forward
0 new messages