Psi4 mol matrix having same geometry coordinates for all atoms

Hi, I am trying to run geometry optimization of different dimer complexes. The same code which worked for methanol-water is now giving an “atoms too close” error for methanol-acetone. The input structure looks good without any atoms too close and in the process of debugging, I found that the psi4mol geometry array had all elements exactly the same in contrast to the input file that it read. Specifically, the number seems to be the X coordinate of the first atom in Bohr units. Could anyone please advise me if and what I am missing here.

Below is the example code to reproduce this.

import numpy as np
import psi4
import optking

init_xyz = """
    O   -1.1191    0.1187   -0.6446 
    C   -1.1191    0.1187    0.5854 
    C   -1.1191   -1.1627    1.3747 
    C   -1.1191    1.4000    1.3747 
    H   -0.2228    1.4460    1.9986 
    H   -2.0153   -1.2086    1.9986 
    H   -1.1191   -2.0171    0.6914 
    H   -0.2228   -1.2087    1.9986 
    H   -1.1191    2.2544    0.6915 
    H   -2.0153    1.4460    1.9986 
    --
    H    0.8809    0.1187   -0.6446 
    O    1.8529    0.1187   -0.6446 
    C    2.2691   -0.5581   -1.8168 
    H    3.3615   -0.5762   -1.8481 
    H    1.8901   -0.0317   -2.6965 
    H    1.8901   -1.5831   -1.8008 

    nocom
    unit angstrom
"""

# Build the psi4 molecule.
MT_mol = psi4.geometry(init_xyz)
print("MT_mol:", MT_mol.save_string_xyz()) # looks good
#MT_mol.activate_all_fragments()
MT_mol.fix_orientation(True)
#MT_mol.fix_com(True)
# print(MT_mol.get_fragments()) # looks good: [(0, 10), (10, 16)]
print(MT_mol.geometry().to_array())

Output:

[[-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]
 [-2.11479251 -2.11479251 -2.11479251]]

I am using psi4 1.9.1 in this case.

Thank you
Venkat

How did you install Psi? What operating system are you using? If you use conda, please share your current conda environment.

I can’t reproduce this on the latest version of Psi4, so I strongly suspect that there’s something not right with your installation. This issue is likely relevant, but it’s impossible to say without more information. See also Atoms are too close after installation

Sorry for missing out on these details in my previous post. I conda installed psi4 and I got this issue on my Windows 11 machine (attached is the yml file:
psi4_babel_win.yml.txt (7.7 KB) )

You were right. It seems my conda env has psi4=1.9.1 with numpy=2.1.0 which is not the right combination as per the links you shared.

My Linux machine (
psi4_env.yml.txt (8.4 KB)
) with psi4=1.9.1 and numpy=1.26.4 does not give this issue though it all first started with my Linux run complaining about AlgError: Could not normalize vector. Vector norm beyond tolerance which took me to the above-reported issue while debugging. The good news is that it seems to run fine now without either of these errors.

What puzzles me is how this ran for the methanol-water system without either of these errors while complaining for methanol-acetone system.

Thank you for helping me @jmisiewicz

Anything with “atoms too close” probably means a mismatch between numpy v1 vs v2 psi4 was compiled against and what numpy is present at runtime.