Optimizing the geometry of organometallic molecule, problems


I’m trying to optimize the geometry of bis(triphenylphosphine)palladium using the HF method. The first scf cycle converges, but after the ions have been moved around once, the next scf cycle just exits mid-run (at UHF iter 43) without any error messages. I’m out of clues as to what’s wrong. Below is my input file:

#! Optimize bistripal HF/cc-pVDZ

memory 8 GB

molecule bistripal {
Pd         1.40219       -2.51441        2.58120
P          2.47716       -1.24478        2.94964
C          2.09289       -0.81059        4.65841
C          1.28983        0.32309        4.86063
C          0.52064        0.46952        6.01794
C          0.48631       -0.54880        6.97294
C          1.21921       -1.71837        6.76512
C          1.98616       -1.86055        5.60140
C          3.26793        0.32005        2.51236
C          4.02230        1.17720        3.32735
C          4.61049        2.32626        2.75874
C          4.48218        2.59618        1.38635
C          3.75832        1.72704        0.57635
C          3.16039        0.60918        1.14214
C          3.86298       -2.45811        3.18025
C          4.20740       -3.21011        2.04886
C          5.31051       -4.07014        2.04071
C          6.11884       -4.17762        3.17031
C          5.83610       -3.39714        4.29791
C          4.72365       -2.52239        4.30427
P          0.26690       -3.69426        2.07874
C          1.18504       -5.25402        2.20181
C          1.71430       -5.79001        1.01416
C          2.80736       -6.66526        1.03969
C          3.43887       -6.96733        2.24841
C          2.97575       -6.39229        3.43251
C          1.88251       -5.51689        3.40120
C         -0.58234       -3.62347        3.71043
C         -1.14817       -2.38617        4.03525
C         -1.94202       -2.21755        5.17153
C         -2.21024       -3.30547        5.99965
C         -1.70859       -4.57017        5.66724
C         -0.90949       -4.74182        4.51317
C         -0.95909       -4.26855        0.88977
C         -1.52800       -5.54792        0.77099
C         -2.52232       -5.77429       -0.20585
C         -2.97746       -4.73014       -1.02614
C         -2.44572       -3.45376       -0.87809
C         -1.44632       -3.23805        0.06658

reference uhf
basis sto-3g
df_scf_guess false
scf_type direct
guess sad
maxiter 200

Please read the guidelines for posting topics. In particular, what version of Psi are you using? Have you checked any error or output files associated with your computation?

1 Like

I think you are missing your hydrogens! :wink:

Though the SCF should not just quit mid iterations, of course. But with hydrogens the SCF should be behave much much better.



Oh, clearly I should’ve read the guidelines. I apologize!

Anyway, I’m using Psi4 1.0.0. As far as I can see, I get no error messages anywhere. I get two output files named output.dat and output.bistripal.intco (“bistripal” is what I call the molecule), and another one named psi.2533.clean, but neither of them contain any error messages or warnings.

I included the hydrogens as per hokru’s suggestion, and while that did indeed make the calculations more well-behaved, they still exited abruptly right before starting the second ionic step (it thus got one ionic step farther this time). Here is the last part of the output.dat file:

==> Basis Set <==

Basis Set: STO-3G
  Number of shells: 159
  Number of basis function: 255
  Number of Cartesian functions: 257
  Spherical Harmonics?: true
  Max angular momentum: 2

==> DirectJKGrad: Integral-Direct SCF Gradients <==

  Gradient:                    1
  J tasked:                  Yes
  K tasked:                  Yes
  wK tasked:                  No
  Integrals threads:           1
  Schwarz Cutoff:          0E+00

Thanks! That was, uhm, an embarrassing omission. Convergence of the first scf cycle immediately went from 68 iterations to 18, so it looks like I’m on the right track. The program still exits abruptly, though.

Using Psi4 1.0.0 would definitely cause problems. You can download something more recent here via conda. Let us know if updating to a more recent version of Psi fixes the problem or not.

Oh, thank you! I’ve installed the newer version and am testing it right now. I’ll report on the results.

I think my silly mistake was that I ran the jobs in the foreground, so that the they were terminated as soon as the terminal was shut down. The nohup command seems to have solved this issue.

Now I’ll just wait and see if the structure converges. Is there a way to use more than one processor? I’m using threading, but that’s just threading on one CPU, right?

There isn’t much to distribute across multiple computers. While you could hypothetically compute gradients by finite difference of energies rather than analytically, it’s not worthwhile to do that for Hartree-Fock and a molecule of this size. Hartree-Fock gradients are very fast, and you would need a massive number of displacements.

I see. However, I restarted the above calculation about 20 hours ago using 12 threads, and so far it has only achieved 10 ionic steps. If you’re saying that HF gradients are very fast, would this then be indicative that something’s not right? I think the processors are 6 core Intel Xeon from around 2015 or so (it’s a rather old cluster).

Direct is one of our slowest JK algorithms. Running the optimization with density fitting will be much much faster.

In addition to dgasmith’s good advice, if you’re distributing this across 12 threads, then your memory line is almost certainly wrong. In Psi, you don’t tell it the memory per thread. You tell it the total memory, and it distributes that across the threads for you. If you truly have 8GB, I would reconsider a 12-threaded computation. Otherwise, you probably mean to say 96 GB. These two points are important enough that unless there is a long wait time to get on your cluster, I recommend killing your current job and starting a new one at the best geometry so far, with these two changes.

Aha, thanks. I started out with density fitting, but the job crashed with an error message that made me think that the program somehow couldn’t handle the palladium atoms. Now it seems to work better, though. However, the job still crashed because the fourth scf cycle (or third ionic step) didn’t converge after the specified 200 iterations. Any tips (other than just increasing maxiter, that is)? I should probably mention that the slower non-DF calculation is still running after 25 ionic steps.

Ok, thanks for the advice! I haven’t yet run into any memory issues, but this is good to know. I could probably use some more memory per thread.

First, you may very well have been running into memory issues without realizing it. Less memory means more reading and writing from disks which means slower computations.

However, your report that you can’t converge the SCF with the DF approximation is disturbing. Are you absolutely sure you used Psi 1.3.2 for this and added the hydrogens? If you did, please upload the output file so we can investigate. If you didn’t do those things, try again with them.

(Note to self: This may be a problem with SCF reading if the displacements are large, because we need to re-orthogonalize MOs once we figure out orbital reads in DDD.)

1 Like

Yes, psi4 --version now returns 1.3.2, and yes, I’ve added the hydrogens, so now the structure has a total of 69 atoms. I’ve restarted from the last set of displaced coordinates, but now with 8 threads and 8 GB of memory in total. The DF guess converged after 44 iterations and I’ve set maxiter to 500 this time.

Can you send the output file where the DF optimization fails? If you were using the right version of Psi and the right number of hydrogens, this sounds like a bug.

Unfortunately, I didn’t save the original output file. However, perhaps the output file from the restarted job could do, since I still have the same problem. As you can see in the attached file, several scf cycles require quite a lot (>200) of iterations to converge, which makes the calculations pretty slow. problem_output.dat (832.0 KB)


Before I try playing with this example myself: why are you using a UHF reference? It looks like this is a closed-shell species. You can see a large speedup for free by using an RHF reference whenever you work with closed-shell species.

Also, you’re not using density-fitting just because you set df_scf_guess true. Did you look to see what that keyword actually does in the manual? I’m not sure if we need to clarify the documentation, or if you just didn’t read the manual very carefully. For that matter, where did you get scf_type direct from?

Before I added the hydrogens, it must’ve been an open shell molecule since I remember getting an error message that said so (which makes sense since the carbon atoms didn’t have completely filled valence shells then). I simply didn’t think about changing it back into RHF. I’m trying that now.

I read the documentation about density fitting and also some other forum threads. The latter is where I got scf_type direct from, but now that I think about it seems like it would just tell the Psi4 to override the DF guess.

Since I’m not very familiar with density fitting, I do find the documentation a bit difficult to understand. I have to read up more on this. However, could you perhaps tell me which keywords would initiate DF?