|
82 | 82 | "metadata": {}, |
83 | 83 | "outputs": [ |
84 | 84 | { |
85 | | - "name": "stderr", |
86 | | - "output_type": "stream", |
87 | | - "text": [ |
88 | | - "/Users/michaelwilliamsdelabastida/Code/Nbed/.venv/lib/python3.13/site-packages/pyscf/dft/libxc.py:512: UserWarning: Since PySCF-2.3, B3LYP (and B3P86) are changed to the VWN-RPA variant, corresponding to the original definition by Stephens et al. (issue 1480) and the same as the B3LYP functional in Gaussian. To restore the VWN5 definition, you can put the setting \"B3LYP_WITH_VWN5 = True\" in pyscf_conf.py\n", |
89 | | - " warnings.warn('Since PySCF-2.3, B3LYP (and B3P86) are changed to the VWN-RPA variant, '\n" |
| 85 | + "ename": "ValidationError", |
| 86 | + "evalue": "1 validation error for NbedConfig\nrun_virtual_localization\n Extra inputs are not permitted [type=extra_forbidden, input_value=True, input_type=bool]\n For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden", |
| 87 | + "output_type": "error", |
| 88 | + "traceback": [ |
| 89 | + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", |
| 90 | + "\u001b[31mValidationError\u001b[39m Traceback (most recent call last)", |
| 91 | + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[2]\u001b[39m\u001b[32m, line 3\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mnbed\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m nbed\n\u001b[32m----> \u001b[39m\u001b[32m3\u001b[39m result = \u001b[43mnbed\u001b[49m\u001b[43m(\u001b[49m\u001b[43mconfig\u001b[49m\u001b[43m=\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtest_config.json\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n", |
| 92 | + "\u001b[36mFile \u001b[39m\u001b[32m~/Code/Nbed/nbed/embed.py:66\u001b[39m, in \u001b[36mnbed\u001b[39m\u001b[34m(config, **config_kwargs)\u001b[39m\n\u001b[32m 64\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mopen\u001b[39m(FilePath(config)) \u001b[38;5;28;01mas\u001b[39;00m f:\n\u001b[32m 65\u001b[39m data = json.load(f)\n\u001b[32m---> \u001b[39m\u001b[32m66\u001b[39m config = \u001b[43mNbedConfig\u001b[49m\u001b[43m(\u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mdata\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 67\u001b[39m config = overwrite_config_kwargs(config, **config_kwargs)\n\u001b[32m 68\u001b[39m \u001b[38;5;28;01mcase\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n", |
| 93 | + "\u001b[36mFile \u001b[39m\u001b[32m~/Code/Nbed/.venv/lib/python3.13/site-packages/pydantic/main.py:253\u001b[39m, in \u001b[36mBaseModel.__init__\u001b[39m\u001b[34m(self, **data)\u001b[39m\n\u001b[32m 251\u001b[39m \u001b[38;5;66;03m# `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks\u001b[39;00m\n\u001b[32m 252\u001b[39m __tracebackhide__ = \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m253\u001b[39m validated_self = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m__pydantic_validator__\u001b[49m\u001b[43m.\u001b[49m\u001b[43mvalidate_python\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdata\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mself_instance\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m 254\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m validated_self:\n\u001b[32m 255\u001b[39m warnings.warn(\n\u001b[32m 256\u001b[39m \u001b[33m'\u001b[39m\u001b[33mA custom validator is returning a value other than `self`.\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[33m'\u001b[39m\n\u001b[32m 257\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mReturning anything other than `self` from a top level model validator isn\u001b[39m\u001b[33m'\u001b[39m\u001b[33mt supported when validating via `__init__`.\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[33m\"\u001b[39m\n\u001b[32m 258\u001b[39m \u001b[33m'\u001b[39m\u001b[33mSee the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.\u001b[39m\u001b[33m'\u001b[39m,\n\u001b[32m 259\u001b[39m stacklevel=\u001b[32m2\u001b[39m,\n\u001b[32m 260\u001b[39m )\n", |
| 94 | + "\u001b[31mValidationError\u001b[39m: 1 validation error for NbedConfig\nrun_virtual_localization\n Extra inputs are not permitted [type=extra_forbidden, input_value=True, input_type=bool]\n For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden" |
90 | 95 | ] |
91 | 96 | } |
92 | 97 | ], |
|
216 | 221 | }, |
217 | 222 | { |
218 | 223 | "cell_type": "code", |
219 | | - "execution_count": 7, |
| 224 | + "execution_count": 25, |
220 | 225 | "metadata": {}, |
221 | 226 | "outputs": [ |
222 | 227 | { |
|
225 | 230 | "dict_keys(['scf', 'v_emb', 'mo_energies_emb_pre_del', 'mo_energies_emb_post_del', 'correction', 'beta_correction', 'cl', 'e_rhf', 'classical_energy', 'e_ccsd', 'ccsd_emb', 'e_fci', 'fci_emb', 'hf_emb', 'scf_dft', 'v_emb_dft', 'dft_correction', 'dft_correction_beta', 'e_dft_in_dft', 'emb_dft', 'second_quantised'])" |
226 | 231 | ] |
227 | 232 | }, |
228 | | - "execution_count": 7, |
| 233 | + "execution_count": 25, |
229 | 234 | "metadata": {}, |
230 | 235 | "output_type": "execute_result" |
231 | 236 | } |
|
245 | 250 | }, |
246 | 251 | { |
247 | 252 | "cell_type": "code", |
248 | | - "execution_count": 8, |
| 253 | + "execution_count": 31, |
249 | 254 | "metadata": {}, |
250 | 255 | "outputs": [ |
251 | 256 | { |
252 | 257 | "data": { |
253 | 258 | "text/plain": [ |
254 | | - "<pyscf.scf.uhf.UHF at 0x12324c380>" |
| 259 | + "<pyscf.scf.uhf.UHF at 0x130d5bf00>" |
255 | 260 | ] |
256 | 261 | }, |
257 | | - "execution_count": 8, |
| 262 | + "execution_count": 31, |
258 | 263 | "metadata": {}, |
259 | 264 | "output_type": "execute_result" |
260 | 265 | } |
|
265 | 270 | }, |
266 | 271 | { |
267 | 272 | "cell_type": "code", |
268 | | - "execution_count": 9, |
| 273 | + "execution_count": 30, |
269 | 274 | "metadata": {}, |
270 | 275 | "outputs": [ |
271 | 276 | { |
|
274 | 279 | "np.float64(-14.229086664077219)" |
275 | 280 | ] |
276 | 281 | }, |
277 | | - "execution_count": 9, |
| 282 | + "execution_count": 30, |
278 | 283 | "metadata": {}, |
279 | 284 | "output_type": "execute_result" |
280 | 285 | } |
|
296 | 301 | }, |
297 | 302 | { |
298 | 303 | "cell_type": "code", |
299 | | - "execution_count": 10, |
| 304 | + "execution_count": 26, |
300 | 305 | "metadata": {}, |
301 | 306 | "outputs": [], |
302 | 307 | "source": [ |
|
305 | 310 | }, |
306 | 311 | { |
307 | 312 | "cell_type": "code", |
308 | | - "execution_count": 11, |
| 313 | + "execution_count": 27, |
309 | 314 | "metadata": {}, |
310 | 315 | "outputs": [ |
311 | 316 | { |
|
314 | 319 | "(np.float64(-14.229086664077219), (10, 10), (10, 10, 10, 10))" |
315 | 320 | ] |
316 | 321 | }, |
317 | | - "execution_count": 11, |
| 322 | + "execution_count": 27, |
318 | 323 | "metadata": {}, |
319 | 324 | "output_type": "execute_result" |
320 | 325 | } |
|
334 | 339 | }, |
335 | 340 | { |
336 | 341 | "cell_type": "code", |
337 | | - "execution_count": 12, |
| 342 | + "execution_count": 41, |
338 | 343 | "metadata": {}, |
339 | 344 | "outputs": [ |
340 | 345 | { |
|
0 commit comments