Diffusion Coefficient Panel

Calculate the diffusion coefficient for either a type of atom or a type of molecule from an MD trajectory. The trajectory can be generated for the calculation, or an existing trajectory can be used.

To open this panel, click the Tasks button and browse to Materials → Classical Mechanics → Diffusion Coefficient → Diffusion Coefficient Calculations .

The following licenses are required to use this panel: MS Maestro, MS Transport, Desmond, MS Force Field Applications (optional)

Using the Diffusion Coefficient Panel

In this panel, you can set up and run MD simulations which are analyzed to obtain the isotropic and anisotropic diffusion coefficients for a particular type of atom or molecule. You can use the results of an existing calculation, if you have the output of an MD simulation with a trajectory. Otherwise, for Desmond model systems (.cms), you can run the simulation as part of the job. The analysis of the mean square deviation (MSD) or the velocity autocorrelation, used to calculate the diffusion coefficient, is performed as part of the job. The mean square deviation or the velocity autocorrelation is fit to simulation time differences (tau) over a specified range.

The input structure must be a Desmond model system (.cms) prepared with OPLS2005, OPLS4, OPLS5, or MLFF. The input additionally can be all-atom or coarse-grained, with or without a trajectory. The output from a Quantum ESPRESSO MD simulation (.maegz) with a trajectory can also be used (only for the mean squared displacement method). If you are running the MD simulation as part of the job, you should make sure that the Desmond system is already fully relaxed, as the simulation does not include relaxation stages.

The diffusion coefficient can be calculated for individual atoms, individual coarse-grained particles, or individual molecules, and you can calculate diffusion coefficients for multiple species in a single run. In the Diffusion parameters tab, click Add Species to add species stages. For each stage, choose the center-of-mass type from the COM Type option menu and enter an ASL expression to select the atoms for that species. The atoms or molecules within each species must all be of the same type: same element for atoms, same molecular structure for molecules, same particles for coarse-grained systems, as the results are averaged over all selected molecules or atoms within each species.

The diffusion coefficients are added to the output structure as Maestro properties. The name of the properties contain the text Diffusion Coefficient, the calculation type—MSD or autocorrelation—and the direction of the dipole moment in case anisotropic dipole moments are calculated. See the Anisotropic diffusion coefficient section for more information. These properties are given in units of m2/s. The upper and lower tau values are also reported, as Tau Start and Tau End, given in ns.

To write out the input file and a script for running the job from the command line, click the arrow next to the Settings button and choose Write. For information on command usage and options, see diffusion_coefficient_msd_driver.py Command Help and diffusion_coefficient_gk_driver.py Command Help.

To visualize the results, you can use the Diffusion Coefficient Viewer Panel (click the Tasks button and browse to Materials → Classical Mechanics → Diffusion Coefficient → Diffusion Coefficient Results). To open this panel from the entry group for the results of a job, and load the results, use the Workflow Action Menu .

Diffusion Coefficient Panel Features

Use structures from option menu

Choose the structure source for calculation.

  • Project Table (n selected entries)—Use the entries that are currently selected in the Project Table or Entry List. The number of entries selected is shown on the menu item. An icon is displayed to the right which you can click to open the Project Table and select entries.
  • Workspace (n included entries)—Use the entries that are currently included in the Workspace, treated as separate structures. The number of entries in the Workspace is shown on the menu item. An icon is displayed to the right which you can click to open the Project Table and include or exclude entries.
Open Project Table button

Open the Project Table panel, so you can select or include the entries for the structure source.

Method tab
Trajectory options

Select an option for the source of the trajectory.

  • Generate from MD simulation—select this option if the structure does not have an associated trajectory (there is no T button in the Entry List for the structure). With this option, a simulation is run to generate the trajectory. This option is not available for Quantum ESPRESSO MD simulations.
  • Use existing—select this option if the structure has a trajectory that you want to use (there is a T button in the Entry List for the structure). The simulation is skipped, and the trajectory is analyzed to obtain the diffusion coefficients. If you chose Velocity autocorrelation for the diffusion coefficient calculation method, you should make sure the trajectory contains velocities. By default, most trajectories do not contain velocities.
Start with trajectory frame box

Start the calculations of the MSD against time difference (tau) from the specified trajectory frame. Earlier frames in the trajectory are discarded.

Diffusion Coefficient Calculation section

Choose to run a diffusion coefficient calculation and specify the parameters for it.

Calculate diffusion coefficient via options

Choose the method for calculating the diffusion coefficient:

  • Mean squared displacement—calculate the diffusion coefficient using the mean squared displacement. This method works well with larger trajectory recording intervals and longer simulation times.
  • Velocity autocorrelation—calculate the diffusion coefficient using the velocity autocorrrelation. This method requires much shorter trajectory recording intervals for accuracy, which may result in very large trajectories if the simulation time is long. If you want to use an existing trajectory with this method, you should make sure it contains velocities: in general, trajectories do not contain velocities by default. This method is not available for Quantum ESPRESSO MD simulations.
Fitting range for diffusion parameters section
Include Tau values from t1 ns to t2 ns for linear fit boxes

Perform the linear fit of the MSD for the diffusion coefficient between the specified time difference (tau) values. These text boxes allow you to discard small and large tau values where the relationship might not be linear. You can adjust the fit after the calculation is run, in the Diffusion Coefficient Viewer Panel.

Number of blocks text box

Specify the number of blocks of simulation data that are used for analysis. The data from the original simulation is divided into equally-sized blocks. Within each block, the velocity autocorrelation is calculated for each tau value, and the coefficient of variation of the velocity autocorrelation within the block is then calculated. The coefficient of variation is used to discard simulation blocks in which the variation exceeds a specified threshold.

This option is only available for the velocity autocorrelation method.

This option is not available. See the Diffusion Coefficient Panel to use this option.

Coefficient of variation text box

Set the maximum value for the coefficient of variation. Velocity autocorrelation data within a simulation block whose coefficient of variation is larger than this value are excluded from the diffusion coefficient calculation.

This option is only available for the velocity autocorrelation method when the number of blocks is greater than 1.

Simulation Protocols tab

Specify parameters for the simulation from which the diffusion coefficients are calculated.

Ensemble class option menu

Choose the ensemble class for the simulation, from NVT, NPT, or NVE. The default is NVE.

Temperature text box

Set the temperature in kelvin for the simulation and thus for the diffusion coefficients. If the ensemble is NVE, this text box supplies the initial temperature for the simulation, and is labeled Initial temperature.

Pressure text box

Set the pressure in bar for the simulation and thus for the diffusion coefficients. Only available when the Ensemble class is NPT.

Simulation time text box

Specify the desired simulation time in ns.

Time step text box

Specify the time step for the simulation in fs.

Trajectory recording interval text box

Set the recording interval for saving points on the trajectory, in ps. This is the amount of time between frames in the trajectory. The entered value is rounded to an integer multiple of the far time step size. The resultant number of records to be written is reported to the right.

For velocity autocorrelation, this should be no longer than 10 time steps.

Set random number seed option and text box

Select this option to specify a random seed to be used in the simulations. Specifying the seed allows you to reproduce the results, unless other factors affect them. If this option is not selected, a seed is chosen at random.

Save trajectory option

Save the trajectory when the simulation is done. If this option is not selected, the trajectory is used to evaluate the diffusion coefficients, then it is discarded.

Diffusion Parameters tab

Make settings for the calculation of the diffusion coefficient. You can add multiple species to calculate diffusion coefficients for several species in a single run.

Species definition

Each species stage defines a set of atoms or molecules for which the diffusion coefficient is calculated. Click Add Species to add a new stage. Each stage contains the following settings:

Species label

The label indicates details of the species for which the diffusion coefficient is calculated. It is updated if the COM Type or ASL is changed. The label remains visible when the reaction settings are hidden.

stage management buttons

These buttons perform display and ordering operations on the stage. They allow for easy duplication and rearrangement of stages.

    Show or hide the contents of the stage. When hidden, only the stage number, label (if any) and these buttons are displayed. This is useful when you have a number of stages and want to compare two separate stages, for example.
    Move the stage up or down one place in the list.
Duplicate the stage. This is useful for creating similar stages with variations on the settings.
Delete the stage.

COM Type option menu

Choose the substructure for which the mean square displacement (MSD) of the center of mass is calculated. Choose from Atom, Molecule, Monomer, or SMARTS. The default is Molecule. If you choose SMARTS, the SMARTS text box is enabled.

ASL text box

Enter an ASL expression to select the atoms for the diffusion coefficient calculation. The default is all, which selects all atoms in the system. See Atom Specification Language for information on ASL syntax.

SMARTS text box

Enter a SMARTS pattern to define the center of mass atoms. Only available when SMARTS is selected from the COM Type option menu.

Show markers option

Select this option to highlight the atoms matching the current ASL expression in the Workspace.

Anisotropic diffusion coefficient section

Select options for calculating anisotropic diffusion coefficients in addition to the isotropic diffusion coefficient.

Along the x, y, and z axes, respectively option

Select this option to calculate the diffusion coefficient parallel to the x, y, and z axes, respectively.

In the plane perpendicular to vector option and Modify button

Select this option to calculate the diffusion coefficient in a plane perpendicular to a vector. The currently selected vector is printed next to this option. Click Modify to define the plane, for which the diffusion coefficient is computed. Opens the Define Interface Dialog Box

Job toolbar

Manage job submission and settings. See Job Toolbar for a description of this toolbar.

The Job Settings button opens the Diffusion Coefficient - Job Settings Dialog Box, where you can make settings for running the job.

Status bar

The status bar displays information about the current job settings and status for the panel. The settings includes the job name, task name and task settings (if any), number of subjobs (if any) and the host name and job incorporation setting. The job status can include messages about job start, job completion and incorporation.

Use the Reset button to reset the panel to its default settings and clear any data from the panel. You can also reset the panel from the Job toolbar.

The status bar also contains the Help button , which opens the help topic for the panel in your browser. If the panel is used by one or more tutorials, hovering over the Help button displays a button, which you can click to display a list of tutorials (or you can right-click the Help button instead). Choosing a tutorial opens the tutorial topic.