#include <d3bj.hpp>
Inheritance diagram for q3::D3BJDispersionCalculator:Public Member Functions | |
| D3BJDispersionCalculator (const Crystal &crystal_structure) | |
| Real | compute_energy () const override |
| Total D3(BJ) dispersion energy correction, in Rydberg. | |
| DispersionGradients | compute_gradients () const override |
| std::string | name () const override |
Public Member Functions inherited from q3::DispersionCalculator | |
| virtual | ~DispersionCalculator ()=default |
|
inlineexplicit |
|
inlineoverridevirtual |
Total D3(BJ) dispersion energy correction, in Rydberg.
convert_from_crystal_to_cartesian() returns positions in units of alat, not Bohr – project through the Bohr-scaled lattice matrix directly instead.
Periodic-image shifts covering the van der Waals cutoff sphere (QE default: cutoff_squared = 9000 Bohr^2), precomputed once for the whole pair sum – see enumerate_image_shifts().
Unordered-pair (i<j) contributions are counted once; the self-pair (i==i) periodic-image sum double-counts every image with its mirror translation, hence 0.5.
Implements q3::DispersionCalculator.
Definition at line 53 of file d3bj.hpp.
References q3::Crystal::atomic_number(), q3::Crystal::element(), q3::Crystal::fractional_position(), q3::Crystal::lattice_vectors_bohr(), q3::Crystal::number_of_atoms(), q3::dispersion::r2r4_by_atomic_number(), q3::dispersion::rcov_by_atomic_number(), q3::Vector3D::x, q3::Vector3D::y, and q3::Vector3D::z.
|
inlineoverridevirtual |
Analytical gradients of the D3(BJ) dispersion energy (forces and stress; units and sign conventions documented on DispersionGradients).
Two coupled mechanisms contribute, mirroring compute_energy() exactly:
g_i = dE/dCN_i, accumulated across every (C6, C8) pair atom i takes part in (either role, including its own self-pair).
Direct term: d(1/(r^6+R0^6))/dR and d(1/(r^8+R0^8))/dR, expressed sqrt-free via r^2 (matching compute_energy()).
Force: F_i = -dE/dR_i. Self-pair separations are pure lattice vectors (position-independent), so the two increments below cancel automatically for atom_i==atom_j without any special-casing – they still contribute to stress below, since the cell shape does move them.
PASS 2: chain rule through dCN_i/dR, walking the identical neighbor loop as compute_coordination_numbers().
d(logistic)/dr = -k1*(ratio/r)*L*(1-L); CN decreases as atoms move apart, so this is negative.
Implements q3::DispersionCalculator.
Definition at line 371 of file d3bj.hpp.
References q3::Crystal::atomic_number(), q3::Crystal::cell_volume(), q3::Crystal::element(), q3::Crystal::fractional_position(), q3::Crystal::lattice_vectors_bohr(), q3::Crystal::number_of_atoms(), q3::dispersion::r2r4_by_atomic_number(), q3::dispersion::rcov_by_atomic_number(), q3::Vector3D::x, q3::Vector3D::y, and q3::Vector3D::z.
|
inlineoverridevirtual |
Scheme name as accepted by the input ("none", "d3bj", ...). Reporting code uses name() != "none" to decide whether to print dispersion rows.
Implements q3::DispersionCalculator.