|
7 | 7 | URL, |
8 | 8 | MEnum, |
9 | 9 | Quantity, |
| 10 | + Reference, |
10 | 11 | Section, |
| 12 | + SectionProxy, |
11 | 13 | SubSection, |
12 | 14 | ) |
13 | 15 |
|
@@ -265,10 +267,20 @@ class ExplicitDispersionModel(BaseModelMethod): |
265 | 267 | description='Short-range damping: D3{zero,BJ}, TS{fermi}, XDM{rational}.', |
266 | 268 | ) |
267 | 269 |
|
268 | | - # TODO later: link to XCComponent(s) |
| 270 | + xc_partner_ref = Quantity( |
| 271 | + type=Reference(SectionProxy('XCFunctional')), |
| 272 | + description=""" |
| 273 | + Reference to the baseline `XCFunctional` section this model is paired with. |
| 274 | + """, |
| 275 | + ) |
| 276 | + |
| 277 | + # Deprecated compatibility field. Prefer `xc_partner_ref`. |
269 | 278 | xc_partner = Quantity( |
270 | 279 | type=str, |
271 | | - description="Base XC functional used/tuned for (e.g. 'PBE', 'SCAN', 'B3LYP').", |
| 280 | + description=""" |
| 281 | + Deprecated string label for the baseline XC partner |
| 282 | + (e.g. 'PBE', 'SCAN', 'B3LYP'). Prefer `xc_partner_ref`. |
| 283 | + """, |
272 | 284 | ) |
273 | 285 |
|
274 | 286 |
|
@@ -372,10 +384,20 @@ class NonlocalCorrelation(BaseModelMethod): |
372 | 384 | """, |
373 | 385 | ) |
374 | 386 |
|
375 | | - # TODO later: link to XCComponent(s) |
| 387 | + xc_partner_ref = Quantity( |
| 388 | + type=Reference(SectionProxy('XCFunctional')), |
| 389 | + description=""" |
| 390 | + Reference to the baseline `XCFunctional` section this nonlocal term is paired with. |
| 391 | + """, |
| 392 | + ) |
| 393 | + |
| 394 | + # Deprecated compatibility field. Prefer `xc_partner_ref`. |
376 | 395 | xc_partner = Quantity( |
377 | 396 | type=str, |
378 | | - description="Base XC functional used/tuned for (e.g. 'PBE', 'SCAN', 'B3LYP').", |
| 397 | + description=""" |
| 398 | + Deprecated string label for the baseline XC partner |
| 399 | + (e.g. 'PBE', 'SCAN', 'B3LYP'). Prefer `xc_partner_ref`. |
| 400 | + """, |
379 | 401 | ) |
380 | 402 |
|
381 | 403 |
|
@@ -648,6 +670,7 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None: |
648 | 670 | existing_nonlocal.type = nonlocal_corr_addon |
649 | 671 |
|
650 | 672 | if base_xc_key: |
| 673 | + existing_nonlocal.xc_partner_ref = self.xc |
651 | 674 | existing_nonlocal.xc_partner = base_xc_key |
652 | 675 |
|
653 | 676 | # XC-specific normalization now handled by XCFunctional |
|
0 commit comments