Is it possible to write the wavefunction to a molden file when using pcm? I’m using Psi4-1.8.1, and without pcm everything is fine. With pcm I get:
Traceback (most recent call last):
File "/usr/local/bin/psi4", line 372, in <module>
exec(content)
File "<string>", line 40, in <module>
File "/usr/local/lib/python3.8/site-packages/psi4/driver/p4util/writer.py", line 330, in _write_molden
Ca = self.Ca()
RuntimeError:
Fatal Error: Wavefunction::Ca: Unable to obtain MO coefficients.
Error occurred in file: /home/conda/feedstock_root/build_artifacts/psi4_1691021540832/work/psi4/src/psi4/libmints/wavefunction.cc on line: 804
The most recent 5 function calls were:
psi::PsiException::PsiException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*, int)
Printing out the relevant lines from the Psithon --> Python processed input file:
parsedFile = os.path.join(os.getcwd(), '@pcmsolver.14.73a995eb')
with open(parsedFile, 'w') as tmp:
tmp.write('\n'.join(['SECT toplevel 4 False', 'TAG F KW 2', 'STR UNITS 1 True', 'ANGSTROM', 'INT CODATA 1 False', '2010', 'SECT MEDIUM 1 True', 'TAG F KW 8', 'STR SOLVERTYPE 1 True', 'IEFPCM', 'STR SOLVENT 1 True', 'WATER', 'BOOL NONEQUILIBRIUM 1 False', 'False', 'BOOL MATRIXSYMM 1 False', 'True', 'DBL CORRECTION 1 False', '0.0', 'STR DIAGONALINTEGRATOR 1 False', 'COLLOCATION', 'DBL DIAGONALSCALING 1 False', '1.07', 'DBL PROBERADIUS 1 False', '1.8897261245650618', 'SECT GREEN 1 False', 'TAG F KW 13', 'STR TYPE 1 False', 'VACUUM', 'STR DER 1 False', 'DERIVATIVE', 'DBL EPS 1 False', '1.0', 'DBL EPSDYN 1 False', '1.0', 'STR PROFILE 1 False', 'LOG', 'DBL EPS1 1 False', '1.0', 'DBL EPSDYN1 1 False', '1.0', 'DBL EPS2 1 False', '1.0', 'DBL EPSDYN2 1 False', '1.0', 'DBL CENTER 1 False', '188.9726124565062', 'DBL WIDTH 1 False', '9.44863062282531', 'DBL_ARRAY INTERFACEORIGIN 3 False', '0.0', '0.0', '0.0', 'INT MAXL 1 False', '50', 'SECT GREEN 0 False', 'TAG F KW 13', 'STR TYPE 1 False', 'VACUUM', 'STR DER 1 False', 'DERIVATIVE', 'DBL EPS 1 False', '1.0', 'DBL EPSDYN 1 False', '1.0', 'STR PROFILE 1 False', 'LOG', 'DBL EPS1 1 False', '1.0', 'DBL EPSDYN1 1 False', '1.0', 'DBL EPS2 1 False', '1.0', 'DBL EPSDYN2 1 False', '1.0', 'DBL CENTER 1 False', '188.9726124565062', 'DBL WIDTH 1 False', '9.44863062282531', 'DBL_ARRAY INTERFACEORIGIN 3 False', '0.0', '0.0', '0.0', 'INT MAXL 1 False', '50', 'SECT CAVITY 0 True', 'TAG F KW 10', 'STR RADIISET 1 True', 'UFF', 'STR TYPE 1 True', 'GEPOL', 'BOOL SCALING 1 True', 'False', 'DBL AREA 1 True', '1.0713194477591061', 'STR MODE 1 True', 'IMPLICIT', 'STR NPZFILE 1 False', '', 'DBL MINRADIUS 1 False', '100.0', 'INT_ARRAY ATOMS 0 False', 'DBL_ARRAY RADII 0 False', 'DBL_ARRAY SPHERES 0 False', 'SECT MOLECULE 0 False', 'TAG F KW 2', 'DBL_ARRAY GEOMETRY 0 False', 'BOOL MEP 1 False', 'True', 'SECT CHARGEDISTRIBUTION 0 False', 'TAG F KW 2', 'DBL_ARRAY MONOPOLES 0 False', 'DBL_ARRAY DIPOLES 0 False']))
core.set_local_option('PCM', 'PCMSOLVER_PARSED_FNAME', '@pcmsolver.14.73a995eb')
E, wfn = optimize('B3LYP', return_wfn=True)
--> wfn.write_molden('Psi4.molden')
memory 2000 mb
molecule {
no_com
0 1
O 0.000 0.000 0.067
H 0.764 -0.000 -0.530
H -0.764 -0.000 -0.530
}
set {
basis 6-31G*
geom_maxiter 200
reference RHF
WRITER_FILE_LABEL Psi4
NORMAL_MODES_WRITE true
}
set pcm true
pcm = {
Units = Angstrom
Medium {
SolverType = IEFPCM
Solvent = H2O
}
Cavity {
RadiiSet = UFF
Type = GePol
Scaling = False
Area = 0.3
Mode = Implicit
}
}
E, wfn = optimize('B3LYP', return_wfn=True)
wfn.write_molden('Psi4.molden')