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

Revisit tabulate usage in basis module #10

Closed
hatemhelal opened this issue Sep 26, 2024 · 0 comments · Fixed by #13
Closed

Revisit tabulate usage in basis module #10

hatemhelal opened this issue Sep 26, 2024 · 0 comments · Fixed by #13

Comments

@hatemhelal
Copy link
Member

While preparing the conda feedstock for mess, @FNTwin noticed that we use the tabulate package but don't actually include it in our dependencies:

from tabulate import tabulate

The only usage is to give the Basis::__repr__ method some formatting. It turns out this is only ever seen in non-html terminals for example:

>>> from mess.basis import basisset
>>> from mess.structure import Structure
>>> mol = Structure(atomic_number=1, position=(0,0,0))
>>> basisset(mol)
  primitive    orbital    coefficient      norm  center      lmn         alpha
-----------  ---------  -------------  --------  ----------  -------  --------
          0          0       0.154329  1.79444   [0. 0. 0.]  [0 0 0]  3.42525
          1          0       0.535328  0.500326  [0. 0. 0.]  [0 0 0]  0.623914
          2          0       0.444635  0.187735  [0. 0. 0.]  [0 0 0]  0.168855

tabulate is what puts the --- in the column header.

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

Successfully merging a pull request may close this issue.

1 participant