grimme-lab / xtb

Semiempirical Extended Tight-Binding Program Package
https://xtb-docs.readthedocs.io/
GNU Lesser General Public License v3.0
574 stars 144 forks source link

printing wavefunction in the cube files #414

Open alexvakimov opened 3 years ago

alexvakimov commented 3 years ago

Is your feature request related to a problem? Please describe. Could you please add a printing out of the MOs into the cube files? It seems that only the charge/spin densities can be printed out at the moment [ xtb version 6.3.3 (7355c4f) compiled by 'conda@14e9545d6667' on 2020-09-17]. It seems to me that this should be a relatively straightforward task if one is familiar with the intrinsics of the code considering that all the infrastructure is already present in the code.

Describe the solution you'd like Understanding that MO cube files may be quite sizable and not all of them may actually be needed, It would be great to let the user control which MOs to print out. The printed out MO cube files could be indexed with the MO index and the k-point index (for periodic systems)

Describe alternatives you've considered We could try implementing our local version of the code for our needs, but the feature seems to be rather generic, so it is likely the community will find it useful if is available in the official version.

If possible state how you can assist in providing data or code to implement the feature We could help with testing the implementation, once the feature is there

Additional context N/A

awvwgk commented 3 years ago

Thanks for the suggestion. The wavefunction is currently available via the molden printout, which is disabled by default due to being quite sizeable.

The creation of the cube files happens in https://github.com/grimme-lab/xtb/blob/master/src/cube.f90, which is pretty much self-contained and should be easy enough to adapt.

alexvakimov commented 3 years ago

Thank you Sebastian for a quick reply. Yes, I noted the printout of the molden files, so you are right - that could work for general purposes. However, for our more specific purposes, we'd like to have a numerical representation of the wavefunction on the grid. It is unlikely we'll be able to adapt the piece of code you pointed out any time soon, so we'll just move on to something else until xtb has something like that :) or until we have resources to contribute that feature.

awvwgk commented 3 years ago

Sounds good to me.

You might want to look out for DFTB+ / Octopus development regarding real space representation of TB wavefunctions than.

alexvakimov commented 3 years ago

Oh yes, we can do it with DFTB+ but the parameterization is somewhat limited. The main reason we looked for the xtb would be to take advantage of the all-periodic-system parameterization.

Since we are moving a bit off-track from the original "new feature request", I'd be happy to chat with you a bit more about the scientific part at one of our Slack workspaces (will send you an invite), if you don't mind.