theochem / ModelHamiltonian

Generate 1- and 2-electron integrals so that molecular quantum chemistry software can be used for model Hamiltonians.
https://modelh.qcdevs.org
GNU Lesser General Public License v3.0
26 stars 16 forks source link

Support for 2d and .mol file moltype #93

Closed adsrichards closed 5 months ago

adsrichards commented 5 months ago

As requested, I have added support for basic 2d moltype in tools.py. I have also created separate functions for building connectivity which are called from within the build_moha function depending on the specified moltype. I have also fixed a minor error where the condition if data["control"]["save_integrals"] == 'true' was not correct. Since true is specified as a bool within the toml file, comparing it to a string always leads to no output.

adsrichards commented 5 months ago

I also went ahead and created a build_connectivity function for .mol file types since I assume this may be useful.

adsrichards commented 5 months ago

I have made the build_connectivity functions only return the adjacency matrix. I have also added an example molfile.toml input in the examples/toml directory with molfile in a new examples/mol directory.

adsrichards commented 5 months ago

Also, I set the norb and nelec to be always set equal to the natoms as read from the molfile in the build_connectivity_molfile function.