Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stress tensor (vc-relax) with KCP not implemented #15

Open
degennar opened this issue Apr 20, 2023 · 0 comments
Open

Stress tensor (vc-relax) with KCP not implemented #15

degennar opened this issue Apr 20, 2023 · 0 comments

Comments

@degennar
Copy link
Collaborator

Currently the stress tensor does not account for the possibility of complex wave functions.
The problem is that some of the involved quantities and routines do not have a complex "twin".

An example -- which causes the code crashing if one forces the calculation of the stress tensor with do_wf_cmplx=.true. -- is the calls to the routine dennl in any of the rhoofr_cp_* routines (see chargedensity.f90). In those calls to dennl one passes always bec%rvec, i.e. the real member of bec (type twin_matrix), also in the case of complex wfc calculations. For such calculation, only the complex member bec%cvec is defined while bec%rvec is not defined. One should then:

  1. pass the proper member of bec (depending on whether bec%iscmplx is True or False)
  2. adapt the routines receiving bec%rvec/cvec to deal with real or complex variables (i.e. creating twin versions of such routines in order to accept also complex values and creating the corresponding interfaces)

When do_wf_cmplx=.false., in principle the stress tensor is computed and one can perform a vc-relax calculation. However, it has not been tested whether the stress tensor is well computed for ODD functionals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant