Friction

Startup

twod_materials.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.
twod_materials.friction.startup.run_normal_force_calculations(basin_and_saddle_dirs, spacings=array([ 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.25, 3.5, 3.75, 4. ]), 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 (list) – list of interlayer spacings (in Angstroms, as floats) at which to run the calculations.
  • submit (bool) – Whether or not to submit the jobs.

Analysis

twod_materials.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).
twod_materials.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:
F_N, ‘mu’: mu, ‘F_f’: F_f}, where
forces are in nN.
Return type:dict. Of the form {‘F_N’
twod_materials.friction.analysis.plot_friction_force(fmt=u'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.
twod_materials.friction.analysis.plot_gamma_surface(fmt=u'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.
twod_materials.friction.analysis.plot_mu_vs_F_N(basin_dir, fmt=u'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.
twod_materials.friction.analysis.plot_normal_force(basin_dir, fmt=u'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.