I wanted to follow up on
conda install psi4 -c psi4
comes with gdma already installed and compiled in.psi4 --test
should show “PASSED” for the gdma test.
Is this still the case? Whenever I run psi4 --test
, the pytests for GDMA are skipped. I’m trying to get the following input.dat script running (via psi4 input.dat
):
memory 500 MiB
molecule mol {
noreorient
nocom
0 1
C -1.017580844 -0.053063168 -0.006955938
C 0.446622115 0.257789494 0.010663968
O 1.226337855 -0.806152758 -0.457436486
H 2.166084161 -0.614310650 -0.169656010
H -1.301113426 -0.582492798 0.937983933
H -1.613834557 0.870671227 -0.014850699
H 0.724742192 1.169377602 -0.548075753
H -1.335308292 -0.715752205 -0.830828962
H 0.704050797 0.473933256 1.079155947
}
set {
basis def2-SVP
# GDMA options
gdma_limit 2
gdma_multipole_units AU
gdma_radius ['C', 0.53, 'N', 0.53, 'H', 0.53]
gdma_switch 4.0
}
optimize('pbe0')
# Calculate the wavefunction
energy, wfn = energy('pbe0', return_wfn=True)
# Run GDMA
gdma(wfn)
# Save final geometry
mol.save_xyz_file('final-geometry.xyz', 1)
# Get GDMA results
dma_distributed = variable("DMA DISTRIBUTED MULTIPOLES")
dma_total = variable("DMA TOTAL MULTIPOLES")
However, even after following the error message (conda install -c conda-forge gdma
), I still get the following error:
Traceback (most recent call last):
File "/opt/anaconda3/envs/p4env/bin/psi4", line 387, in <module>
exec(content)
File "<string>", line 42, in <module>
File "/opt/anaconda3/envs/p4env/lib/python3.12/site-packages/psi4/driver/driver.py", line 1809, in gdma
raise ModuleNotFoundError('Python module gdma not found. Solve by installing it: `conda install -c conda-forge gdma` or recompile with `-DENABLE_gdma`')
ModuleNotFoundError: Python module gdma not found. Solve by installing it: `conda install -c conda-forge gdma` or recompile with `-DENABLE_gdma`
Printing out the relevant lines from the Psithon --> Python processed input file:
core.set_global_option("GDMA_MULTIPOLE_UNITS", "AU")
core.set_global_option("GDMA_RADIUS", ['C', 0.53, 'N', 0.53, 'H', 0.53])
core.set_global_option("GDMA_SWITCH", 4.0)
optimize('pbe0')
energy, wfn = energy('pbe0', return_wfn=True)
--> gdma(wfn)
mol.save_xyz_file('final-geometry.xyz', 1)
dma_distributed = variable("DMA DISTRIBUTED MULTIPOLES")
dma_total = variable("DMA TOTAL MULTIPOLES")
print("DMA DISTRIBUTED MULTIPOLES:")
print(dma_distributed)
!----------------------------------------------------------------------------------!
! !
! Python module gdma not found. Solve by installing it: `conda install -c conda- !
! forge gdma` or recompile with `-DENABLE_gdma` !
! !
!----------------------------------------------------------------------------------!