Skip to content

Resolve clarify-confusing-message-printed-during-cs

Summary of changes

  • Added pretty table print module in io. (with api function print_table)
  • Added cs.print_tables()
  • Added cutoffs.cutoff_matrix property which returns copy

Example output

from ase.build import bulk
from hiphive import ClusterSpace
from hiphive.cluster_filter import Cutoffs
atoms = bulk('Al')
cs = ClusterSpace(atoms, Cutoffs([[4.0, 3.0, 3.0, 3.0], [4.0, 3.0, 0.0, 0.0]]))
cs.print_tables()
Cutoff Matrix
 body/order |  2  |  3  |  4  |  5  
-----------------------------------
     1      |  -  |  -  |  -  |  -  
     2      | 4.0 | 3.0 | 3.0 | 3.0 
     3      |  -  | 3.0 | 0.0 | 0.0 

Cluster counts
 body/order | 2  | 3  | 4  | 5  | sum 
-------------------------------------
     1      | 1  | 0  | 1  | 0  |  2  
     2      | 12 | 24 | 36 | 48 | 120 
     3      | -  | 24 | 0  | 0  | 24  
    sum     | 13 | 48 | 37 | 48 |     

Orbit counts
 body/order | 2 | 3 | 4 | 5 | sum 
---------------------------------
     1      | 1 | 0 | 1 | 0 |  2  
     2      | 1 | 1 | 2 | 2 |  6  
     3      | - | 1 | 0 | 0 |  1  
    sum     | 2 | 2 | 3 | 2 |     

Eigentensor counts
 body/order | 2 | 3  | 4  | 5  | sum 
------------------------------------
     1      | 1 | 0  | 2  | 0  |  3  
     2      | 3 | 5  | 18 | 28 | 54  
     3      | - | 7  | 0  | 0  |  7  
    sum     | 4 | 12 | 20 | 28 |     

Closes #243 (closed)

Edited by Erik Fransson

Merge request reports