psiresp
psiresp copied to clipboard
psiresp calculation on molecules (using example code) gets validation errors
I am testing using psiresp for our own molecules, some of which may be in slightly odd configurations as they're from transition states, so this error may be a result of our molecule just being a bit weird, but the molecule doesn't appear to present problems in psi4 in other configurations. I am using more or less the example code from the wiki.
Expected behavior The calculation should complete and return charges, as it does in the example, OR if the molecule isn't valid for some reason return an error saying that.
Actual behavior The calculation fails after the psi4 calculations with this error message:
pydantic.error_wrappers.ValidationError: 2 validation errors for WavefunctionProperties
orbitals_b
Return quantity scf_orbitals_b does not exist in the values. (type=value_error)
eigenvalues_b
Return quantity scf_eigenvalues_b does not exist in the values. (type=value_error)
To Reproduce The following python script reproduces the error. In order to restore the correct behaviour the string can just be replaced with the example one here: https://psiresp.readthedocs.io/en/latest/molecule.html (and yes i know my molecule isn't dmso)
import psiresp
import qcelemental as qcel
from rdkit import Chem
import numpy as np
# server stuff
import qcfractal.interface as ptl
from psiresp.testing import FractalSnowflake
dmso_spec = """\
20
! test molecule
S 24.58 -19.607 31.661
N 20.167 -19.023 27.319
N 18.498 -20.322 26.509
O 22.182 -19.453 28.456
N 17.93 -20.341 23.396
O 22.563 -16.868 30.759
C 25.324 -21.631 32.538
N 19.728 -18.841 23.288
O 19.993 -16.869 29.713
C 23.642 -20.181 30.2
N 20.934 -18.004 25.213
C 22.979 -18.958 29.56
C 22.012 -18.143 30.485
C 20.67 -18.096 29.663
C 21.147 -18.452 28.226
C 19.184 -19.94 27.597
C 19.084 -19.604 25.45
C 18.885 -19.598 24.044
C 20.683 -18.078 23.891
C 20.117 -18.805 25.96
"""
qcdmso = qcel.models.Molecule.from_data(dmso_spec, dtype='xyz')
dmso = psiresp.Molecule(qcmol=qcdmso)
dmso.add_conformer(qcmol=qcdmso)
server = FractalSnowflake()
client = ptl.FractalClient(server, verify=False)
# QMGeometryOptimizationOptions(method='b3lyp', basis='sto-3g', pcm_options=None,
# driver='gradient', query_interval=20,
# protocols={'wavefunction': 'orbitals_and_eigenvalues'},
# g_convergence='gau_tight', max_iter=200, full_hess_every=10, jobname='optimization')
geometry_options = psiresp.QMGeometryOptimizationOptions(
method="b3lyp", basis="sto-3g")
# QMEnergyOptions(method='b3lyp', basis='sto-3g', pcm_options=None, driver='energy',
# query_interval=20, protocols={'wavefunction': 'orbitals_and_eigenvalues'},
# jobname='single_point')
esp_options = psiresp.QMEnergyOptions(
method="b3lyp", basis="sto-3g",
)
resp_options = psiresp.RespOptions()
job = psiresp.Job(molecules=[dmso],
qm_optimization_options=geometry_options,
qm_esp_options=esp_options,
resp_options=resp_options,
update_molecules=True)
job.run(client=client)
print(job.charges)
for molecule in job.molecules:
print(molecule.stage_1_unrestrained_charges)
Computing environment:
- Operating system: Linux, ubuntu 22.04
- Python version: 3.8.13
- Version of PsiRESP: 0.4.2
- Output of running
conda list
:
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
alembic 1.8.1 pyhd8ed1ab_0 conda-forge
ambit 0.6 py38h53dec33_2 psi4
arrow-cpp 9.0.0 py38h6933191_6_cpu conda-forge
attrs 22.1.0 pyh71513ae_1 conda-forge
aws-c-cal 0.5.11 h95a6274_0 conda-forge
aws-c-common 0.6.2 h7f98852_0 conda-forge
aws-c-event-stream 0.2.7 h3541f99_13 conda-forge
aws-c-io 0.10.5 hfb6a706_0 conda-forge
aws-checksums 0.1.11 ha31a3da_7 conda-forge
aws-sdk-cpp 1.8.186 hb4091e7_3 conda-forge
bcrypt 3.2.2 py38h0a891b7_0 conda-forge
blas 1.0 mkl
boost 1.74.0 py38h2b96118_5 conda-forge
boost-cpp 1.74.0 h75c5d50_8 conda-forge
brotli 1.0.9 h166bdaf_7 conda-forge
brotli-bin 1.0.9 h166bdaf_7 conda-forge
brotlipy 0.7.0 py38h0a891b7_1004 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.18.1 h7f98852_0 conda-forge
ca-certificates 2022.9.24 ha878542_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
cairo 1.16.0 h19f5f5c_2
certifi 2022.9.24 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py38h74dc2b5_0
charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge
chemps2 1.8.11 hbe8a562_0 psi4
colorama 0.4.5 pyhd8ed1ab_0 conda-forge
conda 22.9.0 py38h578d9bd_1 conda-forge
conda-package-handling 1.9.0 py38h0a891b7_0 conda-forge
contourpy 1.0.5 py38h43d8883_0 conda-forge
cryptography 38.0.1 py38h2b5fc30_0 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
dftd3 3.2.1 h84218bc_2 psi4
dkh 1.2 h173d85e_2 psi4
double-conversion 3.2.0 h27087fc_1 conda-forge
expat 2.4.9 h27087fc_0 conda-forge
fftw 3.3.9 h27cfd23_1
fontconfig 2.14.0 hc2a2eb6_1 conda-forge
fonttools 4.37.4 py38h0a891b7_0 conda-forge
freetype 2.12.1 hca18f0e_0 conda-forge
gau2grid 2.0.7 hd18ef5c_0 psi4
gcp 2.0.2 he991be0_2 psi4
gdma 2.2.6 h0e1e685_6 psi4
geometric 0.9.7.2 py_0 conda-forge
gflags 2.2.2 he1b5a44_1004 conda-forge
glib 2.69.1 h4ff587b_1
glog 0.6.0 h6f12383_0 conda-forge
grpc-cpp 1.47.1 h05bd8bd_6 conda-forge
h5py 3.1.0 nompi_py38hafa665b_100 conda-forge
hdf5 1.10.6 nompi_h6a2412b_1114 conda-forge
icu 70.1 h27087fc_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
importlib-metadata 4.11.4 py38h578d9bd_0 conda-forge
importlib_resources 5.9.0 pyhd8ed1ab_0 conda-forge
iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge
intel-openmp 2021.4.0 h06a4308_3561
jpeg 9e h166bdaf_2 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
kiwisolver 1.4.4 py38h43d8883_0 conda-forge
krb5 1.19.3 h3790be6_0 conda-forge
lcms2 2.12 hddcbb42_0 conda-forge
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h9c3ff4c_0 conda-forge
libabseil 20220623.0 cxx17_h48a1fff_4 conda-forge
libarchive 3.5.2 hb890918_3 conda-forge
libbrotlicommon 1.0.9 h166bdaf_7 conda-forge
libbrotlidec 1.0.9 h166bdaf_7 conda-forge
libbrotlienc 1.0.9 h166bdaf_7 conda-forge
libcrc32c 1.1.2 h9c3ff4c_0 conda-forge
libcurl 7.85.0 h7bff187_0 conda-forge
libdeflate 1.10 h7f98852_0 conda-forge
libecpint 1.0.7 hfebba4c_0 psi4
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libevent 2.1.10 h9b69904_4 conda-forge
libffi 3.3 he6710b0_2
libgcc-ng 12.1.0 h8d9b700_16 conda-forge
libgfortran-ng 12.1.0 h69a702a_16 conda-forge
libgfortran5 12.1.0 hdcd56e2_16 conda-forge
libgoogle-cloud 2.2.0 h838d150_1 conda-forge
libiconv 1.17 h166bdaf_0 conda-forge
libint2 2.7.1 h2fe1556_15 psi4
libmamba 0.27.0 h0dd8ff0_0 conda-forge
libmambapy 0.27.0 py38h923e62a_0 conda-forge
libnghttp2 1.47.0 hdcd2b5c_1 conda-forge
libopenblas 0.3.21 pthreads_h78a6416_3 conda-forge
libpng 1.6.38 h753d276_0 conda-forge
libpq 14.5 hd77ab85_0 conda-forge
libprotobuf 3.21.7 h6239696_0 conda-forge
libsolv 0.7.22 h6239696_0 conda-forge
libssh2 1.10.0 haa6b8db_3 conda-forge
libstdcxx-ng 12.1.0 ha89aaad_16 conda-forge
libthrift 0.16.0 h491838f_2 conda-forge
libtiff 4.3.0 h0fcbabc_4 conda-forge
libutf8proc 2.7.0 h7f98852_0 conda-forge
libuuid 2.32.1 h7f98852_1000 conda-forge
libwebp-base 1.2.4 h166bdaf_0 conda-forge
libxc 5.1.5 h84b9e52_1 psi4
libxcb 1.15 h7f8727e_0
libxml2 2.10.2 h4c7fe37_1 conda-forge
libzlib 1.2.12 h166bdaf_3 conda-forge
llvm-openmp 14.0.4 he0ac6c6_0 conda-forge
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
lzo 2.10 h516909a_1000 conda-forge
mako 1.2.3 pyhd8ed1ab_0 conda-forge
mamba 0.27.0 py38h1abaa86_0 conda-forge
markupsafe 2.1.1 py38h0a891b7_1 conda-forge
matplotlib-base 3.6.0 py38hb021067_0 conda-forge
mkl 2021.4.0 h06a4308_640
mkl-service 2.4.0 py38h7f8727e_0
mkl_fft 1.3.1 py38hd3c417c_0
mkl_random 1.2.2 py38h51133e4_0
msgpack-python 1.0.4 py38h43d8883_0 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
ncurses 6.3 h5eee18b_3
networkx 2.8.7 pyhd8ed1ab_0 conda-forge
numpy 1.23.1 py38h6c91a56_0
numpy-base 1.23.1 py38ha15fc14_0
olefile 0.46 pyh9f0ad1d_1 conda-forge
openjpeg 2.5.0 h7d73246_0 conda-forge
openssl 1.1.1q h7f8727e_0
orc 1.7.6 h09e0d61_1 conda-forge
packaging 21.3 pyhd8ed1ab_0 conda-forge
pandas 1.5.0 py38h8f669ce_0 conda-forge
parquet-cpp 1.5.1 2 conda-forge
pcmsolver 1.2.1.1 py38h6d17ec8_2 psi4
pcre 8.45 h9c3ff4c_0 conda-forge
pillow 8.4.0 py38h8e6f84c_0 conda-forge
pint 0.19.2 pyhd8ed1ab_0 conda-forge
pip 22.2.2 py38h06a4308_0
pixman 0.40.0 h36c2ea0_0 conda-forge
plotly 5.10.0 pyhd8ed1ab_0 conda-forge
pluggy 1.0.0 py38h578d9bd_3 conda-forge
postgresql 14.5 hfdbbde3_0 conda-forge
psi4 1.6.1+5b9f6e3 py38h1bd450f_0 psi4
psiresp 0.4.2 pyhd8ed1ab_0 conda-forge
psiresp-base 0.4.2 pyhd8ed1ab_0 conda-forge
psutil 5.9.2 py38h0a891b7_0 conda-forge
psycopg2 2.9.3 py38h497a2fe_0 conda-forge
py 1.11.0 pyh6c4a22f_0 conda-forge
py-cpuinfo 8.0.0 pyhd8ed1ab_0 conda-forge
pyarrow 9.0.0 py38h8617f3d_6_cpu conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycairo 1.21.0 py38h9c00e7a_1 conda-forge
pycosat 0.6.3 py38h0a891b7_1010 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pydantic 1.10.2 py38h0a891b7_0 conda-forge
pyopenssl 22.0.0 pyhd8ed1ab_1 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
pytest 7.1.3 py38h578d9bd_0 conda-forge
python 3.8.13 h12debd9_0
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.8 2_cp38 conda-forge
pytz 2022.4 pyhd8ed1ab_0 conda-forge
pyyaml 6.0 py38h0a891b7_4 conda-forge
qcelemental 0.25.0 pyhd8ed1ab_0 conda-forge
qcengine 0.24.1 pyhd8ed1ab_0 conda-forge
qcfractal 0.15.8.1 py38h578d9bd_0 conda-forge
qcfractal-core 0.15.8.1 py38h578d9bd_0 conda-forge
rdkit 2022.03.5 py38ha829ea6_0 conda-forge
re2 2022.06.01 h27087fc_0 conda-forge
readline 8.1.2 h7f8727e_1
reportlab 3.5.68 py38hadf75a6_1 conda-forge
reproc 14.2.3 h7f98852_0 conda-forge
reproc-cpp 14.2.3 h9c3ff4c_0 conda-forge
requests 2.28.1 pyhd8ed1ab_1 conda-forge
ruamel_yaml 0.15.80 py38h0a891b7_1007 conda-forge
s2n 1.0.10 h9b69904_0 conda-forge
scipy 1.9.1 py38h14f4228_0
setuptools 63.4.1 py38h06a4308_0
simint 0.7 h642920c_1 psi4
six 1.16.0 pyh6c4a22f_0 conda-forge
snappy 1.1.9 hbd366e4_1 conda-forge
sqlalchemy 1.3.24 py38h0a891b7_1 conda-forge
sqlite 3.39.3 h5082296_0
tenacity 8.1.0 pyhd8ed1ab_0 conda-forge
tk 8.6.12 h1ccaba5_0
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
tornado 6.2 py38h0a891b7_0 conda-forge
tqdm 4.64.1 pyhd8ed1ab_0 conda-forge
typing-extensions 4.3.0 hd8ed1ab_0 conda-forge
typing_extensions 4.3.0 pyha770c72_0 conda-forge
tzcode 2022d h166bdaf_0 conda-forge
tzdata 2022d h191b570_0 conda-forge
unicodedata2 14.0.0 py38h0a891b7_1 conda-forge
urllib3 1.26.11 pyhd8ed1ab_0 conda-forge
wheel 0.37.1 pyhd3eb1b0_0
xz 5.2.6 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yaml-cpp 0.7.0 h27087fc_2 conda-forge
zipp 3.8.1 pyhd8ed1ab_0 conda-forge
zlib 1.2.12 h5eee18b_3
zstd 1.5.2 h6239696_4 conda-forge