Question on calculation setup (gengeral)

Hi All,

I’ve gotten use to setting up my calculations in a certain format that was shown to me, and I would like to appreciate more of the specifics.

When I do a geometry optimization, I use:

set scf_type df
set basis aug-cc-pVTZ
set reference rks

mol.update_geometry()
mol.symmetrize(1e-3)

e, wfn = optimize('b3lyp-d3bj', return_wfn=True)
mol.print_out()
print_variables()

I’m unclear what the 'e, wfn = ’ is doing for me, as I understand that I could just start with ‘optimize’ or ‘opt’ – correct?

When I do not want optimization, and simply want properties, I will use (for example):

set scf_type df
set basis aug-cc-pVTZ
set reference rks
set s_tolerance 1e-9
set_num_threads(64)

psi4.properties("b3lyp-d3bj/aug-cc-pVTZ", properties=["DIPOLE_POLARIZABILITIES", "MULLIKEN_CHARGES", "DIPOLE"])
mol.print_out()
print_variables()

Which I understand to be correct (in terms of format) – yes?

At one point, I was told to do this as:

set scf_type df
set basis aug-cc-pVTZ
set reference rks
set s_tolerance 1e-9
set_num_threads(64)

psi4.properties("b3lyp-d3bj/aug-cc-pVTZ", properties=["DIPOLE_POLARIZABILITIES", "MULLIKEN_CHARGES", "DIPOLE"])
mol.print_out()
print_variables()

e, wfn = energy('b3lyp-d3bj', return_wfn=True)
oeprop(wfn, "MULLIKEN_CHARGES")
mol.print_out()
print_variables()

But I see no need to also add the last 4 lines in this case, as it seems to simply calculate the Mulliken charges again, which is a waste of time.

Please enclose code in triple backticks for the sake of formatting. I’ve done that for you.

As for your questions:

  1. Correct, e, wfn = is doing nothing for you. Many scripts either need to use the energy (first variable) or wavefunction (second variable). e, wfn = is either an artifact from such a script or used to make it easy to convert to such a script if needed. Similarly, if you don’t need the function to return the wavefunction, then return_wfn=True is similarly useless.
  2. The last four lines are indeed redundant. properties should be how you interface to any property computations. In this case, Psi will compute them by calling oeprop, but you the user don’t need to know that.
1 Like

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