How to print out basis set information?

I tried to print out the information of a basis set (exponents and contractions)

molecule h2 {
  0 1
 H
 H 1  r

  r = 0.7414
}

set {
  reference   rhf
  scf_type pk
  basis cc-pVDZ
}


print_detail_out()
energy('hf')

and I got (with psi4 1.6.1)

Printing out the relevant lines from the Psithon --> Python processed input file:
    ""","h2")
    core.IO.set_default_namespace("h2")
    core.set_global_option("REFERENCE", "rhf")
    core.set_global_option("SCF_TYPE", "pk")
    core.set_global_option("BASIS", "cc-pVDZ")
--> print_detail_out()
    energy('hf')

!-----------------------------------------!
!                                         !
!  name 'print_detail_out' is not defined !
!                                         !
!-----------------------------------------!

It seems the API page is beyond my comprehension PSI4 API: Linking C++ and Python. Then, how to print out the basis set information? Thank you very much

print_detail_out is a method of a basis set object, not a free-floating function. This is why the API says print_detail_out takes a self object. To create a basis set object, you can, for example, use basis = psi4.core.BasisSet.build(h2, target='cc-pVDZ').

1 Like

Thank you so much!

basis = psi4.core.BasisSet.build(h2, target='cc-pVDZ')
basis.print_detail_out()

works.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.