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

mDFTB #1325

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

mDFTB #1325

wants to merge 8 commits into from

Conversation

vnquanvuong
Copy link

This version of the multipole expansion is based on DFTB+ 2019 and may require significant modification before merging with the main branch.

Copy link
Member

@bhourahine bhourahine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide some test cases and their results? These will be needed during refactoring to check for errors against your original code.

@vnquanvuong
Copy link
Author

Certainly! I will do that.

@aradi
Copy link
Member

aradi commented Oct 4, 2023

@v2quan89 Thanks a lot for the PR, this is a long expected one. 😄 I agree with @bhourahine, the first thing would be to create tests. Once that done, the code should be rebased on current main. And then, we should do some refactoring (mostly packaging things into types and/or subroutines). But let's first have tests with reasonable coverage for the new code.

@vnquanvuong
Copy link
Author

@bhourahine and @aradi Thank you for your comments. I have just added five test cases, as you suggested.

Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this integrate with the existing multipole infrastructure we have in DFTB+? Would it be possible to map the scaling parameters for the momenta to the actual dipole and quadrupole integrals we already store in the codebase? It would be preferable to converge to a single multipole infrastructure and not have two parallel implementations.

@vnquanvuong
Copy link
Author

@awvwgk This multipole is separated from the existing multipole in DFTB+. As far as I know, the existing multipole is from the xTB Hamiltonian; this one is for the DFTB Hamiltonian. The formulas are also different.

@awvwgk
Copy link
Member

awvwgk commented Oct 6, 2023

I know, but you think they could not be unified at all? Most if not all energy expressions from xTB did fit nicely in the provided framework of DFTB. Why should it be different for the multipoles?

@vnquanvuong
Copy link
Author

@awvwgk I don't think they could be unified as one. The difficulty of having multiples with DFTB is that it requires some additional integral evaluations. These integrals can be handled quite easily in the xTB framework, but not in the case of DFTB. I had to find a different way to make it work with DFTB. In addition, we used different kernel functions. I might be wrong. @aradi might have a better justification.

@aradi
Copy link
Member

aradi commented Oct 10, 2023

I absolutely agree with @awvwgk that we should try to integrate things and should not have parallel infrastructures, if not necessary. I still have to understand, whether and how this is possible. @v2quan89 Let's first rebase the code to be compatible with current main. Then we can think about refactoring. (Thanks for the tests!)

@vnquanvuong
Copy link
Author

vnquanvuong commented Oct 10, 2023

@aradi and @awvwgk, If it is doable, I am okay with either way.

@bhourahine
Copy link
Member

@v2quan89 the next step is now probably to start moving your changes to the newer code structure. How familar are you with the curent main branch code? There have been several additions since the 2020 version.
Also, and this is very simple, can you compose an entry for the CHANGELOG and start thinking about an entry in the user manual.

@vnquanvuong
Copy link
Author

@bhourahine I have started to move my changes to the current version. The current main code was restructured significantly. It gives me a hard time and might take longer time than I thought. In any case, I am working on it and will update the CHANGELOG and the manual as you suggested.

@bhourahine
Copy link
Member

@vnquanvuong See https://github.com/bhourahine/dftbplus/tree/mdftb_rebase for a rebased version on top of the current main code. I had to also make some changes to get it to compile with various different machines.
There are several things which will need to be changed, as at the moment the mdftb code is based only on dense matrices (so can't be easily parallelized or work with other extensions) and is completely separate from the structures used for the xTB multipoles.

@vnquanvuong
Copy link
Author

@bhourahine Thank you very much for the help! I appreciate it.

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 75.66540% with 192 lines in your changes are missing coverage. Please review.

Project coverage is 70.91%. Comparing base (22572cb) to head (9960336).
Report is 25 commits behind head on main.

Files Patch % Lines
src/dftbp/dftb/multipole.F90 75.33% 92 Missing ⚠️
src/dftbp/dftb/shortgammafuncs.F90 59.30% 70 Missing ⚠️
src/dftbp/dftbplus/mainio.F90 53.44% 27 Missing ⚠️
src/dftbp/dftbplus/parser.F90 96.82% 2 Missing ⚠️
src/dftbp/dftbplus/initprogram.F90 97.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1325      +/-   ##
==========================================
+ Coverage   70.86%   70.91%   +0.04%     
==========================================
  Files         231      232       +1     
  Lines       44203    44948     +745     
==========================================
+ Hits        31325    31875     +550     
- Misses      12878    13073     +195     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

None yet

4 participants