DOI: 10.5061/dryad.0p2ngf26k
title: Nuclear induction lineshape modeling via hybrid SDE and MD approach

description: The temperature dependence of the nuclear-free induction decay in the
 presence of a magnetic-field gradient was found to exhibit motional
 narrowing in gases upon heating, a behavior that is opposite to that
 observed in liquids. This has led to the revision of the theoretical
 framework to include a more detailed description of particle trajectories
 since decoherence mechanisms depend on histories. In the case of free
 diffusion and single components, the new model yields the correct
 temperature trends. The inclusion of boundaries in the current formalism
 is not straightforward. We present a hybrid SDE-MD (stochastic
 differential equation – molecular dynamics) approach whereby MD is used to
 compute an effective viscosity and the latter is fed to the SDE to predict
 the line shape. The theory is in agreement with the experiments. This
 two-scale approach, which bridges the gap between short (molecular
 collisions) and long (nuclear induction) timescales, paves the way for the
 modeling of complex environments with boundaries, mixtures of chemical
 species, and intermolecular potentials.
description: # Nuclear induction lineshape modeling via hybrid SDE and MD approach
 [https://doi.org/10.5061/dryad.0p2ngf26k](https://doi.org/10.5061/dryad.0p2ngf26k) A sample of LAMMPS code for viscosity evaluation can be found in the "in.visc\_Bulk" file. The simulation was executed on the Hoffman2 cluster at UCLA. To submit the job, you can refer to the "submit\_job.sh" script. A sample data file generated from the simulation is available as "viscl\_300\_1.dat." For data analysis in Jupyter Lab, we provide a Python code in the "Viscosity Analysis.ipynb" notebook. ## Description of the data and file structure The data is generated using a "ave/correlate" fix within the LAMMPS code. The resulting output includes rows displaying the timestep in the first column, followed by the performance metrics in subsequent rows. Specifically, the components of the pressure tensor correlations, denoted as "v\_pxy," "v\_pxz," and "v\_pyz," are presented in the last three columns. The Jupyter notebook contains a function demonstrating how to import and work with such a file. ## Code/Software The Lammps code has the following sections: 1. Variable assignments: This section involves defining crucial variables, such as temperature (T), simulation dimensions (L), the number of particles (npart), and sampling intervals. 2. Unit conversion to SI: Here, unit conversions are encoded to ensure consistency with the International System of Units (SI). 3. Molecular Dynamics simulation setup: This part involves configuring the molecular dynamics simulation by specifying boundary conditions, defining the simulation region, setting coupling constants, and determining the time steps. 4. NVT canonical ensemble fix: A fix is defined to maintain the NVT canonical ensemble during the simulation. 5. Equilibration (Prerun): Prior to data collection, a prerun of 1e6 steps is executed to allow the system to reach an equilibrium state. 6. Correlation term computation: This section of the code focuses on calculating the correlation terms for the pressure tensor based on the Kubo formulation. The necessary summations are performed. 7. Main simulation run: The code proceeds to run for the desired number of steps, during which preliminary viscosity coefficient data is collected and printed for analysis. The simulation was performed for various temperatures in the range of 200-400 K for xenon particles in both liquid state and gas state.