mpinterfaces.mat2d.friction package

Submodules

mpinterfaces.mat2d.friction.analysis module

mpinterfaces.mat2d.friction.analysis.get_basin_and_peak_locations()[source]

Find which directories inside ‘friction/lateral’ represent the minimum (basin) and maximum (peak) energy stacking configurations.

Returns:tuple. Of the form (basin, peak).
mpinterfaces.mat2d.friction.analysis.get_mu_vs_F_N(basin_dir)[source]

Essentially the same function as plotting, but without the plot.

Parameters:basin_dir (str) – directory corresponding to the minimum energy on the gamma surface. Generally obtained by the get_basin_and_peak_locations() function.
Returns:
Of the form {‘F_N’: F_N, ‘mu’: mu, ‘F_f’: F_f}, where
forces are in nN.
Return type:dic
mpinterfaces.mat2d.friction.analysis.get_number_of_surface_atoms()[source]

Count the number of atoms at a 2D material’s surface. This enables energy and force calculations to be normalized to the number of surface atoms.

Returns:
int. Number of surface atoms (top + bottom) for both
layers in the bilayer model.
mpinterfaces.mat2d.friction.analysis.plot_friction_force(fmt='pdf')[source]

Plot the sinusoidal curve of delta E between basin and saddle points for each normal spacing dz.

Parameters:fmt (str) – matplotlib format style. Check the matplotlib docs for options.
mpinterfaces.mat2d.friction.analysis.plot_gamma_surface(fmt='pdf')[source]

Collect the energies from a grid of static energy calculations to plot the Gamma surface between two layers of the 2D material.

Parameters:fmt (str) – matplotlib format style. Check the matplotlib docs for options.
mpinterfaces.mat2d.friction.analysis.plot_mu_vs_F_N(basin_dir, fmt='pdf')[source]

Plot friction coefficient ‘mu’ vs. F_Normal. mu = F_friction / F_Normal.

Parameters:
  • basin_dir (str) – directory corresponding to the minimum energy on the gamma surface. Generally obtained by the get_basin_and_peak_locations() function.
  • fmt (str) – matplotlib format style. Check the matplotlib docs for options.
mpinterfaces.mat2d.friction.analysis.plot_normal_force(basin_dir, fmt='pdf')[source]

Plot the LJ-like curve of the energy at the basin point as a function of normal spacing dz.

Parameters:
  • basin_dir (str) – directory corresponding to the minimum energy on the gamma surface. Generally obtained by the get_basin_and_peak_locations() function.
  • fmt (str) – matplotlib format style. Check the matplotlib docs for options.

mpinterfaces.mat2d.friction.startup module

mpinterfaces.mat2d.friction.startup.run_gamma_calculations(submit=True, step_size=0.5)[source]

Setup a 2D grid of static energy calculations to plot the Gamma surface between two layers of the 2D material. These calculations are run and stored in subdirectories under ‘friction/lateral’.

Parameters:
  • submit (bool) – Whether or not to submit the jobs.
  • step_size (float) – the distance between grid points in Angstroms.
mpinterfaces.mat2d.friction.startup.run_normal_force_calculations(basin_and_saddle_dirs, spacings=(1.5, 4.25, 0.25), submit=True)[source]

Set up and run static calculations of the basin directory and saddle directory at specified interlayer spacings to get f_N and f_F.

Parameters:
  • basin_and_saddle_dirs (tuple) –

    Can be obtained by the get_basin_and_peak_locations() function under friction.analysis. For example,

    run_normal_force_calculations((‘0x0’, ‘3x6’))

    or

    run_normal_force_calculations(get_basin_and_peak_locations())

    will both work.

  • spacings (tuple) – list of interlayer spacings (in Angstroms, as floats) at which to run the calculations.
  • submit (bool) – Whether or not to submit the jobs.

Module contents