libAtoms / abcd

1 stars 4 forks source link

Print more digits for the histogram's bins #55

Closed eszter137 closed 4 years ago

eszter137 commented 4 years ago

Current output is:

$ abcd summary -q calculated_by_eszter -q formula=H4O2 -q "E_CC_MP2_2B<0.01" -q "E_CC_MP2_2B>-0.01" -p E_CC_MP2_2B -n 20

info.E_CC_MP2_2B  count: 1116  min: -0.00999893 med: -0.0029598639 max: 0.00703563   std: 0.0028955848 var:8.3844111e-06
▉▉▉▉▉▉▉▉                                  51 [-0.01, -0.01)
▉▉▉▉▉                                     37 [-0.01, -0.01)
▉▉▉▉▉▉▉                                   45 [-0.01, -0.01)
▉▉▉▉▉▉                                    39 [-0.01, -0.01)
▉▉▉▉▉▉                                    40 [-0.01, -0.01)
▉▉▉▉▉▉▉▉                                  54 [-0.01, -0.00)
▉▉▉▉▉▉▉▉                                  56 [-0.00, -0.00)
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉                          100 [-0.00, -0.00)
▉▉▉▉▉▉▉▉▉▉▉▉                              80 [-0.00, -0.00)
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉                    139 [-0.00, -0.00)
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉         209 [-0.00, -0.00)
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 254 [-0.00, 0.00)
                                           3 [0.00, 0.00)
                                           2 [0.00, 0.00)
                                           4 [0.00, 0.00)
                                           1 [0.00, 0.00)
                                           0 [0.00, 0.00)
                                           0 [0.00, 0.01)
                                           0 [0.01, 0.01)
                                           2 [0.01, 0.01)
gabor1 commented 4 years ago

maybe use scientific notation ? so 1.0e-3

fekad commented 4 years ago

with the {:.4e} it looks like:

abcd summary -p energy

info.energy  count: 11676  min: -1509.1239 med: -197.78784 max: 4.4658442   std: 217.3507 var:47241.329
                                          180 [-1.5091e+03, -1.3578e+03)
                                            0 [-1.3578e+03, -1.2064e+03)
                                            0 [-1.2064e+03, -1.0550e+03)
                                            0 [-1.0550e+03, -9.0369e+02)
                                            0 [-9.0369e+02, -7.5233e+02)
                                            0 [-7.5233e+02, -6.0097e+02)
▉▉▉▉▉                                    1150 [-6.0097e+02, -4.4961e+02)
▉▉▉▉▉▉                                   1420 [-4.4961e+02, -2.9825e+02)
▉▉                                        458 [-2.9825e+02, -1.4689e+02)
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 8468 [-1.4689e+02, 4.4658e+00)
gabor1 commented 4 years ago

great. please make it fixed width, so that it puts an extra space if the number is positive, and then the alignment will be nice too.