theochem / iodata

Python library for reading, writing, and converting computational chemistry file formats and generating input files.
https://iodata.readthedocs.io/
GNU Lesser General Public License v3.0
131 stars 46 forks source link

fchk to FCIDUMP (with gbasis) #362

Open paulandrewjohnson opened 2 months ago

paulandrewjohnson commented 2 months ago

I was able to read an fchk with IOdata, use gbasis to compute integrals, then write to an FCIDUMP with IOdata.

Please add a warning to the gbasis documentation examples: IOdata assumes integrals are stored internally in physicists' notation, hence transposes to chemists' notation upon dumping an FCIDUMP. Hence, one should not compute the 2 electron integrals with notation='chemist'.

Everything makes sense, and I am sorry for bringing this up. It would help.

PaulWAyers commented 2 months ago

Can you be more specific about the change you'd propose? I think, from the way you explain it, the issue is a gbasis issue.

You should also feel free to make a pull request with the documentation change you're suggesting. It's always most useful for the users to suggest the changes that would have made their lives easier; as developers we're often too deep in the weeds to understand how outsiders see it.

tovrstra commented 2 months ago

A warning does not seem to be the right solution when IOData and GBasis behave as documented.

Maybe a worked-out example in GBasis that shows how to write an FCIDUMP file could help?

It would make sense to add a note to the FCIDUMP docstring to explain that the internal representation in IOData and FCIDUMP differ, and that the numbers are rearranged upon loading and dumping. I'll make a PR with a suggestion to make this a bit more concrete.

One could go further and add some metadata in the IOData class that says with which notation the 4-index objects are stored in any given instance. This may be a bit overkill, but it avoids preferring one over the other in the IOData source. (This is a similar to how we support different basis sign and order conventions.)

PaulWAyers commented 2 months ago

I think a worked example in gbasis is sensible. @paulandrewjohnson , I'd invite you to even use your own experience to provide such an example, then make a pull request in gbasis.

paulandrewjohnson commented 2 months ago

Sure, that’s what I had in mind.

Again, this was not meant as a complaint at all!


From: Paul W. Ayers @.> Sent: Saturday, July 6, 2024 1:31:14 PM To: theochem/iodata @.> Cc: Paul Andrew Johnson @.>; Mention @.> Subject: Re: [theochem/iodata] fchk to FCIDUMP (with gbasis) (Issue #362)

I think a worked example in gbasis is sensible. @paulandrewjohnsonhttps://github.com/paulandrewjohnson , I'd invite you to even use your own experience to provide such an example, then make a pull request in gbasis.

— Reply to this email directly, view it on GitHubhttps://github.com/theochem/iodata/issues/362#issuecomment-2211826841, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE7SKZPC3ZCFY6UYTUOWJW3ZLASWFAVCNFSM6AAAAABKNO2HA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRHAZDMOBUGE. You are receiving this because you were mentioned.Message ID: @.***>

tovrstra commented 2 months ago

No worries. We appreciate that you bring this up. It is always a bit of a puzzle where and how to improve things.