/** * MolecularDynamicsSolver — Classical molecular dynamics with Lennard-Jones potential. * * ## Governing Equations * * F_i = -∇V(r_i) * m_i · a_i = F_i * * ## Potential * * V_LJ(r) = 4ε[(σ/r)¹² - (σ/r)⁶] - V_LJ(r_c), cutoff at r_c = 2.5σ * * The standard shifted potential (subtract V_LJ(r_c) for r < r_c) ensures * energy continuity at the cutoff, improving NVE conservation. * * ## Integration: Velocity Verlet (symplectic, time-reversible) * * v(t + dt/2) = v(t) + F(t)/(2m) · dt * x(t + dt) = x(t) + v(t + dt/2) · dt * compute F(t + dt) * v(t + dt) = v(t + dt/2) + F(t + dt)/(2m) · dt * * ## Boundary Conditions * * Periodic in all 3 dimensions (minimum image convention for force evaluation) * * ## Thermostat * * Berendsen velocity rescaling: λ = √(1 + dt/τ · (T_target/T_current - 1)) * * @see SimSolver — generic interface */ export interface MDConfig { /** Number of particles */ particleCount: number; /** Simulation box size [Lx, Ly, Lz] in reduced units (σ) */ boxSize: [number, number, number]; /** LJ well depth ε (default: 1.0 in reduced units) */ epsilon?: number; /** LJ diameter σ (default: 1.0 in reduced units) */ sigma?: number; /** Particle mass (default: 1.0 in reduced units) */ mass?: number; /** Cutoff distance in units of σ (default: 2.5) */ cutoff?: number; /** Target temperature (reduced units, default: 1.0) */ temperature?: number; /** Berendsen coupling time τ (default: 0.5, set 0 for NVE) */ thermostatTau?: number; /** Initial arrangement: 'fcc' lattice or 'random' */ initialConfig?: 'fcc' | 'random'; } export interface MDStats { currentTime: number; stepCount: number; kineticEnergy: number; potentialEnergy: number; totalEnergy: number; temperature: number; pressure: number; } export declare class MolecularDynamicsSolver { private N; private box; private eps; private sig; private mass; private rc; private rc2; /** Energy shift V(r_c) so the potential is continuous at the cutoff. */ private vShift; private targetTemp; private thermostatTau; readonly positions: Float64Array; readonly velocities: Float64Array; private forces; private potentialEnergy; private virial; private currentTime; private stepCount; constructor(config: MDConfig); /** Velocity Verlet integration step. */ step(dt: number): void; /** Compute all pairwise LJ forces. O(N²) — fine for N < 10000. */ private computeForces; /** Wrap positions into periodic box. */ private applyPBC; /** Berendsen thermostat: rescale velocities toward target temperature. */ private berendsenThermostat; /** Initialize positions on FCC lattice. */ private initFCC; private initRandom; /** Maxwell-Boltzmann velocity initialization. */ private initVelocities; private computeTemperature; /** Translational degrees of freedom: 3(N−1) after CM-momentum removal. */ private degreesOfFreedom; getPositions(): Float64Array; getVelocities(): Float64Array; getStats(): MDStats; dispose(): void; } //# sourceMappingURL=MolecularDynamicsSolver.d.ts.map