Skip to content

Negative signs in length gague rt-TDDFT #4587

@ESROAMER

Description

@ESROAMER

Describe the bug

There are two sign mistakes in length gague rt-TDDFT:
1.The first one is in the length gague potential:
$V=-qE \cdot r$
For electron, $q=-e$, so it actually should be written as $V=eE \cdot r$ (SI), or $V=E \cdot r$ (au). While in ABACUS code, it was implemented in form $V=-E \cdot r$ (au).

2.The second one is in the output dipole:
$D=\int q\rho (r)rdr$
The problem $q=-e$ also exist here. It actually should be written as $D=-\int e\rho (r)rdr$.

Well , these two negative signs actually do no harm to the result of length gague TDDFT calculation, since the efield oscillates over time and the mistake in dipole calculation was cancelled by the mistake in potential calculation. But if you want to compare the result with velocity gague or other software's tddft, some physical quantities will be completely opposite.
Figure_1

So I suggest fixing these two negative signs to maintain consistency with other software and velocity gague.

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Verify the issue is not a duplicate.
  • Describe the bug.
  • Steps to reproduce.
  • Expected behavior.
  • Error message.
  • Environment details.
  • Additional context.
  • Assign a priority level (low, medium, high, urgent).
  • Assign the issue to a team member.
  • Label the issue with relevant tags.
  • Identify possible related issues.
  • Create a unit test or automated test to reproduce the bug (if applicable).
  • Fix the bug.
  • Test the fix.
  • Update documentation (if necessary).
  • Close the issue and inform the reporter (if applicable).

Metadata

Metadata

Assignees

Labels

BugsBugs that only solvable with sufficient knowledge of DFTFeatures NeededThe features are indeed needed, and developers should have sophisticated knowledge

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions