Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 5 additions & 27 deletions src/nomad_simulations/schema_packages/model_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,11 @@ def normalize(self, archive, logger):
)


class ExplicitDispersionModel(BaseModelMethod):
"""Explicit dispersion / vdW treatment used together with an ab-initio method.
class EmpiricalDispersionModel(BaseModelMethod):
"""Empirical dispersion correction used together with an ab-initio method.

Covers pairwise-additive (D2/D3/D3(BJ)/D4), density-dependent (TS/TS-SCS),
many-body dispersion (MBD, e.g. MBD@rsSCS), and non-local correlation
functionals (VV10, rVV10, vdW-DF family, XDM).
many-body dispersion (MBD, e.g. MBD@rsSCS), and exchange-hole based XDM.

References
----------
Expand All @@ -232,13 +231,12 @@ class ExplicitDispersionModel(BaseModelMethod):
• S. Grimme et al., J. Chem. Phys. 136, 154105 (2012) - DFT-D3(BJ)
• A. Tkatchenko, M. Scheffler, Phys. Rev. Lett. 102, 073005 (2009) - TS
• A. Tkatchenko et al., Phys. Rev. Lett. 108, 236402 (2012) - MBD
• O. A. Vydrov, T. Van Voorhis, J. Chem. Phys. 133, 244103 (2010) - VV10
• C. Steinmann, WIREs Comput. Mol. Sci. 10, e1438 (2020) - overview
"""

model = Quantity(
type=MEnum(
# Pairwise / density-dependent
# Pairwise / density-dependent empirical models
'D2',
'D3',
'D3BJ',
Expand All @@ -252,26 +250,12 @@ class ExplicitDispersionModel(BaseModelMethod):
'MBD@rsSCS',
# Exchange-hole based
'XDM',
# Non-local correlation functionals
'VV10',
'rVV10',
'vdW-DF',
'vdW-DF2',
'optB88-vdW',
'optB86b-vdW',
'SCAN+rVV10',
'BEEF-vdW',
),
description="""
Identifier of the explicit dispersion / vdW model.
Identifier of the empirical dispersion correction model.
""",
)

is_embedded_in_xc = Quantity(
type=bool,
description='True if dispersion is part of the XC functional (e.g. SCAN+rVV10).',
)

damping_function = Quantity(
type=MEnum('zero', 'BJ', 'fermi', 'rational'),
description='Short-range damping: D3{zero,BJ}, TS{fermi}, XDM{rational}.',
Expand All @@ -283,12 +267,6 @@ class ExplicitDispersionModel(BaseModelMethod):
description="Base XC functional used/tuned for (e.g. 'PBE', 'SCAN', 'B3LYP').",
)

# Kernel family choice, when applicable. This is a model identifier, not a numerical knob.
nonlocal_kernel = Quantity(
type=MEnum('DRSLL', 'LMKLL', 'VV10', 'rVV10'),
description='Nonlocal correlation kernel flavor (when applicable).',
)


class RelativityModel(BaseModelMethod):
"""
Expand Down
11 changes: 4 additions & 7 deletions src/nomad_simulations/schema_packages/numerical_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ class SolvationSettings(NumericalSettings):

class DispersionKnob(ArchiveSection):
"""
A single typed numerical knob for an explicit dispersion / vdW correction.
A single typed numerical knob for an empirical dispersion correction.

This is a "typed physical constraint" record: it stores one scalar value
together with semantics that disambiguate what the value controls.
Expand All @@ -1305,14 +1305,12 @@ class DispersionKnob(ArchiveSection):
'a1',
'a2',
'sR',
# Nonlocal kernel parameter
'b',
# Many-body screening / range separation
'beta',
),
description="""
Identifies the dispersion parameter using standard notation.
(e.g. s6, a1, beta, b).
(e.g. s6, a1, beta).

All dispersion knobs are dimensionless.
""",
Expand All @@ -1323,7 +1321,6 @@ class DispersionKnob(ArchiveSection):
'pairwise',
'three_body_atm',
'many_body',
'nonlocal_kernel',
'density_partitioning',
),
description="""
Expand All @@ -1341,7 +1338,7 @@ class DispersionKnob(ArchiveSection):

class DispersionSettings(NumericalSettings):
"""
Numerical and evaluation settings for an explicit dispersion / vdW correction.
Numerical and evaluation settings for an empirical dispersion correction.

This section contains discrete switches and environment choices (e.g. whether
to include higher-order dispersion terms, which density partitioning is used),
Expand Down Expand Up @@ -1412,7 +1409,7 @@ class DispersionSettings(NumericalSettings):

Examples:
• D3BJ: s6/s8 (pairwise), a1/a2 (pairwise), optionally s9 (three_body_atm)
rVV10: b (nonlocal_kernel)
MBD@rsSCS: beta (many_body)
""",
)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_model_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
DFT,
TB,
ActiveSpace,
ExplicitDispersionModel,
EmpiricalDispersionModel,
ImplicitSolvationModel,
MultireferencePT,
MultireferenceSCF,
Expand Down Expand Up @@ -630,7 +630,7 @@ def test_dft_contributions_solvation_dispersion_relativity_normalize():
refractive_index=1.33,
)

edm = ExplicitDispersionModel(
edm = EmpiricalDispersionModel(
model='D3BJ',
damping_function='BJ',
)
Expand All @@ -650,7 +650,7 @@ def test_dft_contributions_solvation_dispersion_relativity_normalize():

assert len(dft.contributions) == 3
assert isinstance(dft.contributions[0], ImplicitSolvationModel)
assert isinstance(dft.contributions[1], ExplicitDispersionModel)
assert isinstance(dft.contributions[1], EmpiricalDispersionModel)
assert isinstance(dft.contributions[2], RelativityModel)

# Solvation
Expand Down
Loading