abqsims.hemisphere package

abqsims.hemisphere.BatchSubmission(remote_server, fileName, subData, scanPos, remotePath, **kwargs)[source]

Function to create bash script for batch submission of input file, and run them on remote server.

Parameters:
  • remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

  • fileName (str) – Base File name for abaqus input files

  • subData (str) – Data for submission to serve queue [walltime, memory, cpus]

  • scanPos (arr) – Array of coordinates [x,y] of scan positions to image biomolecule (can be clipped or full)

  • remotePath (str) – Path to remote file/directory

Keywords Args:
  • ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall. Defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

  • Submission (‘serial’/ ‘paralell’) – Optional define whether single serial script or seperate paralell submission to queue {Default: ‘serial’}

abqsims.hemisphere.ContourPlot(X, Z, forceGrid, forceContour, refForces, baseDims, tipDims, rSurface, elasticProperties, normalizer, maxRF, contrast)[source]

Function to plot a 2D force heatmap produced from simulation over the xz domain for single indenter and refereance force.

Parameters:
  • X (arr) – 1D array of x coordinates over scan positions

  • Z (arr) – 1D array of z coordinates over scan positions

  • forceGrid (arr) – 2D Array of force grid of xz positions

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force

  • refForces (float) – Threshold force to evaluate indentation contours at (pN)

  • baseDims (list) – Dimension of base

  • tipDims (list) – Geometric parameters for defining capped tip structure

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • normalizer (obj) – Normalisation of cmap

  • maxRF (float) – Maximum Force value

  • contrast (float) – Contrast between high and low values in AFM heat map (0-1)

abqsims.hemisphere.ContourPlot2(X, Z, forceGrid, forceContour, refForces, baseDims, tipDims, rSurface, elasticProperties, normalizer, maxRF, contrast)[source]

Function to plot a 2D force heatmap produced from simulation over the xz domain for single indenter and refereance force.

Parameters:
  • X (arr) – 1D array of x coordinates over scan positions

  • Z (arr) – 1D array of z coordinates over scan positions

  • forceGrid (arr) – 2D Array of force grid of xz positions

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force

  • refForces (float) – Threshold force to evaluate indentation contours at (pN)

  • baseDims (list) – Dimension of base

  • tipDims (list) – Geometric parameters for defining capped tip structure

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • normalizer (obj) – Normalisation of cmap

  • maxRF (float) – Maximum Force value

  • contrast (float) – Contrast between high and low values in AFM heat map (0-1)

abqsims.hemisphere.ContourPlotMan(X, Z, forceGrid, forceContour, indentorRadius, clearance, rSurface, baseDims, theta_degrees, tip_length, binSize, elasticProperties, normalizer, maxRF, contrast, n0, n1, n2)[source]

Function to plot a 2D force heatmap produced from simulation over the xz domain for single indenter and refereance force.

Parameters:
  • X (arr) – 1D array of x coordinates over scan positions

  • Z (arr) – 1D array of z coordinates over scan positions

  • rackPos (arr) – Array of initial scan positions for indenter [Nb, [x, z] ]

  • forceGrid (arr) – 2D Array of force grid of xz positions

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force

  • indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

  • clearance (float) – Clearance above molecules surface indentor is set to during scan

  • rSurface (float) – Radius of semi-sphere

  • baseDims (list) – Dimension of base

  • waveDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]

  • theta_degrees (float) – Principle conical angle from z axis in degrees

  • tip_length (float) – Total cone height

  • binSize (float) – Width of bins that subdivid xz domain during raster scanning/ spacing of the positions sampled over

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • normalizer (obj) – Normalisation of cmap

  • maxRF (float) – Maximum Force value

  • contrast (float) – Contrast between high and low values in AFM heat map (0-1)

abqsims.hemisphere.ContourPlotNI(X, Z, forceGrid, forceContour, refForces, baseDims, tipDims, rSurface, elasticProperties, normalizer, maxRF, contrast)[source]

Function to plot a 2D force heatmap produced from simulation over the xz domain for single indenter and refereance force.

Parameters:
  • X (arr) – 1D array of x coordinates over scan positions

  • Z (arr) – 1D array of z coordinates over scan positions

  • RF (arr) – Array of reaction force on indentor reference point

  • forceGrid (arr) – 2D Array of force grid of xz positions

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force

  • refForces (float) – Threshold force to evaluate indentation contours at (pN)

  • baseDims (list) – Dimension of base

  • tipDims (list) – Geometric parameters for defining capped tip structure

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • normalizer (obj) – Normalisation of cmap

  • maxRF (float) – Maximum Force value

  • contrast (float) – Contrast between high and low values in AFM heat map (0-1)

abqsims.hemisphere.DataPlot(NrackPos, TotalU2, TotalRF, Nb, Nt, n)[source]

Produces scatter plot of indentation depth and reaction force to visualise and check simulation data.

Parameters:
  • NrackPos (arr) – Array of initial scan positions for each indenter [Ni, Nb, [x, z] ]

  • TotalU2 (arr) – Array of indentors z displacement in time over scan position and for all indenter [Ni, Nb, Nt]

  • TotalRF (arr) – Array of reaction force in time on indentor reference point over scan position and for all indenter [Ni, Nb, Nt]

  • Nb (int) – Number of scan positions along x axis of base

  • Nt (int) – Number of frames in ABAQUS simulation/ time step

  • n (int) – Index of indenter data to plot corresponding to indices in indenterRadius

abqsims.hemisphere.DataRetrieval(remote_server, wrkDir, localPath, csvfiles, dataFiles, indentorRadius, **kwargs)[source]

Function to retrieve simulation data transfered back to local machine.

Using keyword arguments to change to compilation of simulations data.

Parameters:
  • remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

  • remotePath (str) – Path to remote file/directory

  • localPath (str) – Path to local file/directory

  • csvfiles (list) – List of csv and txt files to transfer to remote server

  • datafiles (list) – List of abaqus script files to transfer to remote server

  • indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

Keyword Arguments:
  • Compile (int) – If passed, simulation data is compiled from seperate sets of simulations in directory in remote server to combine complete indentations. Value is set as int representing the range of directories to compile from (directories must have same root naming convention with int denoting individual directories)

  • ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

Returns:
  • variables (list) – List of simulation variables: [timePeriod, timeInterval, binSize, meshSurface, meshIndentor, indentionDepth]

  • TotalU2 (arr) – Array of indentors z displacement in time over scan position and for all indenter [Ni, Nb, Nt]

  • TotalRF (arr) – Array of reaction force in time on indentor reference point over scan position and for all indenter [Ni, Nb, Nt]

  • NrackPos (arr) – Array of initial scan positions for each indenter [Ni, Nb, [x, z] ]

abqsims.hemisphere.ExportVariables(localPath, rackPos, variables, baseDims, tipDims, indentorType, elasticProperties)[source]

Export simulation variables as csv and txt files to load in abaqus python scripts.

Parameters:
  • localPath (str) – Path to local file/directory

  • rackPos (arr) – Array of coordinates [x,z] of scan positions to image biomolecule

  • variables (list) – List of simulation variables: [timePeriod, timeInterval, binSize, meshSurface, meshBase, meshIndentor, indentionDepth, surfaceHeight]

  • baseDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]

  • tipDims (list) – Geometric parameters for defining capped tip structure

  • indentorType (str) – String defining indentor type (Spherical or Capped)

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

abqsims.hemisphere.FInterpolatePlot(X, Z, F, baseDims, tipDims, rSurface, elasticProperties, normalizer, maxRF, contrast)[source]

Function to plot a 2D force heatmap produced from simulation over the xz domain for single indenter and refereance force.

Parameters:
  • X (arr) – 1D array of x coordinates over scan positions

  • Z (arr) – 1D array of z coordinates over scan positions

  • F (arr) – Array of interpolated force values over xz grid for all indentors and reference force [Ni, Nb, Nz]

  • baseDims (list) – Dimension of base

  • tipDims (list) – Geometric parameters for defining capped tip structure

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • normalizer (obj) – Normalisation of cmap

  • maxRF (float) – Maximum Force value

  • contrast (float) – Contrast between high and low values in AFM heat map (0-1)

abqsims.hemisphere.FWHMPlot(FWHM, indentorRadius, refForces, rSurface, elasticProperties)[source]

Function to plot Full Width Half Maxima of force contour for each indentor for varying reference force.

Parameters:
  • FWHM (arr) – 2D array of y coordinates over grid positions

  • indentorRadius (arr) – 2D array of z coordinates of force contour over grid positions

  • refForces (float) – Threshold force to evaluate indentation contours at (pN)

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

abqsims.hemisphere.FWHM_Volume(forceContour, NrackPos, Nf, Ni, indentorRadius, rSurface)[source]

Calculate Full Width Half Maxima and Volume for Force Contours of varying reference force using splines

Parameters:
  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force across scan positons for all indentor and reference force [Nf,Ni, Nb, [x,z]] (With mask applied).

  • NrackPos (arr) – Array of initial scan positions for each indenter [Ni, Nb, [x, z]]

  • Nf – Number if reference force values

  • Ni – Number if indentor radii/ values

  • indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

  • rSurface (float) – Radius of semi-sphere surface

Returns:
  • FWHM (arr) – Array of full width half maxima of force contour for corresponding indentor and reference force [Nf,Ni]

  • Volume (arr) – Array of volume under force contour for corresponding indentor and reference force [Nf,Ni]

abqsims.hemisphere.F_Hertz(U, E, rIndentor, rSurface, elasticProperties)[source]

Hertzian fit for indentation data

abqsims.hemisphere.F_TipConvolution(x, rSurface, rIndentor)[source]

Function to calculate hard sphere tip convolution of tip and semi-sphere using mathematics above

abqsims.hemisphere.Fconical(r, r0, r_int, z_int, theta, R, tip_length)[source]

Calculates and returns spherically capped conical tip surface heights from radial position r.

Uses radial coordinate along xz plane from centre as tip is axisymmetric around z axis (bottom of tip set as zero point such z0 = R).

Parameters:
  • r (float/1D arr) – xz radial coordinate location for tip height to be found

  • r0 (float) – xz radial coordinate for centre of tip

  • r_int (float) – xz radial coordinate of tangent point (point where sphere smoothly transitions to cone)

  • z_int (float) – Height of tangent point, where sphere smoothly transitions to cone (defined for tip centred at spheres center, as calculations assume tip centred at indentors bottom the value must be corrected to, R-z_int)

  • theta (float) – Principle conical angle from z axis in radians

  • R (float) – Radius of spherical tip portion

  • tip_length (float) – Total cone height

Returns:

Z (float/1D arr) – Height of tip at xz radial coordinate

abqsims.hemisphere.ForceContour2D(U2, RF, rackPos, forceRef, **kwargs)[source]

Function to calculate contours/z heights of constant force in simulation data for given threshold force.

Parameters:
  • U2 (arr) – Array of indentors y indentor position over scan ( As opposed to displacement into surface given from simulation and used elsewhere)

  • RF (arr) – Array of reaction force on indentor reference point

  • rackPos (arr) – Array of coordinates (x,z) of scan positions to image biomolecule [Nb,[x,z]]

  • forceRef (float) – Threshold force to evaluate indentation contours at (pN)

Keyword Arguments:

Symmetric – If false skip postprocessing step to ensure AFM image is symmetric about z-axis, instead produce image from raw data {Default: True}

Returns:
  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force across scan positons

  • forceContourmask (arr) – 2D boolean array giving mask for force contour for zero values in which no reference force

abqsims.hemisphere.ForceGrid2D(X, Z, U2, RF, rackPos, courseGrain, **kwargs)[source]

Function to produce force heat map over scan domain.

Parameters:
  • X (arr) – 1D array of postions over x domain of scan positions

  • Z (arr) – 1D array of postions over z domain of scan positions, discretised into bins of courseGrain value

  • U2 (arr) – Array of indentors y indentor position over scan, discretised into bins of courseGrain value ( As opposed to displacement into surface given from simulation and used elsewhere)

  • RF (arr) – Array of reaction force on indentor reference point

  • rackPos (arr) – Array of coordinates (x,z) of scan positions to image biomolecule [Nb,[x,z]]

  • courseGrain (float) – Width of bins that subdivid xz domain of raster scanning/ spacing of the positions sampled over

Keyword Arguments:

Symmetric – If false skip postprocessing step to ensure AFM image is symmetric about z-axis, instead produce image from raw data {Default: True}

Returns:
  • forceGrid (arr) – 2D Array of force heatmap over xz domain of scan i.e. grid of xz positions with associated force [Nx,Nz]

  • forceGridmask (arr) – 2D boolean array giving mask for force grid with exclude postions with no indentation data [Nx,Nz]

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force across scan positons

  • forceContourmask (arr) – 2D boolean array giving mask for force contour for zero values in which no reference force

abqsims.hemisphere.ForceInterpolation(Xgrid, Zgrid, U2, RF, rackPos, rIndentor, rSurface, elasticProperties, Nt, **kwargs)[source]

Calculate a 2D force heatmap over the xz domain, produced from interpolated forces using Hertz model.

Parameters:
  • Xgrid (arr) – 2D array/ grid of postions over xz domain of scan positions

  • Zgrid (arr) – 2D array/ grid of postions over xz domain of scan positions

  • U2 (arr) – Array of indentors y displacement in time over scan position and for one indenter [Ni, Nb, Nt]

  • RF (arr) – Array of reaction force in time on indentor reference point over scan position and for one indenter [Nb, Nt]

  • rackPos (arr) – Array of initial scan positions for one indenter [Nb, [x, z]]

  • rIndentor (float) – Indentor radius of spherical tip portion varied for seperate simulations

  • rSurface (float) – Radius of semi-sphere surface

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • Nt (int) – Number of time steps

Keyword Arguments:

Symmetric – If false skip postprocessing step to ensure AFM image is symmetric about z-axis, instead produce image from raw data {Default: True}

Returns:

Array of fitted elastic modulus for an indentation force value over each scan positions [Nb,Nt] E_contour (arr) : Array of fitted elastic modulus (upto clipped force) across the contour of the sample [Nb] F (arr) : Array of interpolated force values over xz grid for all indentors and reference force [Ni, Nb, Nz]

Return type:

E_hertz (arr)

abqsims.hemisphere.HemisphereSimulation(remote_server, wrkDir, localPath, abqscripts, abqCommand, fileName, subData, indentorType, indentorRadius, theta_degrees, tip_length, indentionDepths, baseDims, rSurface, refForces, courseGrain, binSize, clearance, meshSurface, meshIndentor, timePeriod, timeInterval, elasticProperties, **kwargs)[source]

Final function to automate simulation.

User inputs all variables and all results are outputted. The user gets a optionally get a surface plot of scan positions. Produces a heatmap of the AFM image, and 3D plots of the sample surface for given force threshold.

Parameters:
  • remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

  • wrkDir (str) – Working directory extension

  • localPath (str) – Path to local file/directory

  • abqscripts (list) – List of abaqus script files to transfer to remote server

  • abqCommand (str) – Abaqus command to execute and run script

  • fileName (str) – Base File name for abaqus input files

  • subData (str) – Data for submission to serve queue [walltime, memory, cpus]

  • indentorType (str) – String defining indentor type (Spherical or Capped)

  • indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

  • theta_degrees (float) – Principle conical angle from z axis in degrees

  • tip_length (float) – Total cone height

  • indentionDepths (arr) – Array of maximum indentation depth into surface

  • baseDims (list) – Dimension of base

  • rSurface (float) – Radius of semi-sphere

  • refForces (float) – Threshold force to evaluate indentation contours at, mimics feedback force in AFM (pN)

  • courseGrain (float) – Width of bins that subdivid xz domain of raster scanning/ spacing of the positions sampled over

  • binSize (float) – Width of bins that subdivid xz domain during raster scanning/ spacing of the positions sampled over

  • clearance (float) – Clearance above molecules surface indentor is set to during scan

  • meshSurface (float) – Value of indentor mesh given as bin size for vertices of geometry in nm (x10-9 m)

  • meshIndentor (float) – Value of indentor mesh given as bin size for vertices of geometry in nm (x10-9 m)

  • timePeriod (float) – Total time length for ABAQUS simulation/ time step (T)

  • timeInterval (float) – Time steps data sampled over for ABAQUS simulation/ time step (dt)

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

Keyword Arguments:
  • ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

  • Submission ('serial'/ 'paralell') – Type of submission, submit pararlell scripts or single serial script for scan locations {Default: ‘serial’}

  • Main (bool) – If false skip preprocessing step of simulation {Default: True}

  • SurfacePlot (bool) – If false skip surface plot of biomolecule and scan positions {Default: True}

  • Queue (bool) – If false skip queue completion step of simulation {Default: True}

  • Analysis (bool) – If false skip odb analysis step of simulation {Default: True}

  • Retrieval (bool) – If false skip data file retrivial from remote serve {Default: True}

  • Compile (int) – If passed, simulation data is compiled from seperate sets of simulations in directory in remote server to combine complete indentations. Value is set as int representing the range of directories to compile from (directories must have same root naming convention with int denoting individual directories) :

  • Postprocess (bool) – If false skip postprocessing step to produce AFM image from data {Default: True}

  • DataPlot (bool) – If false skip scatter plot of simulation data {Default: True}

  • Symmetric – If false skip postprocessing step to ensure AFM image is symmetric about z-axis, instead produce image from raw data {Default: True}

Returns:
  • X (arr) – 1D array of postions over x domain of scan positions, discretised into bins of courseGrain value [Nx]

  • Z (arr) – 1D array of postions over z domain of scan positions, discretised into bins of courseGrain value [Nz]

  • TotalU2 (arr) – Array of indentors z displacement in time over scan position and for all indenter [Ni, Nb, Nt]

  • TotalRF (arr) – Array of reaction force in time on indentor reference point over scan position and for all indenter [Ni, Nb, Nt]

  • NrackPos (arr) – Array of initial scan positions for each indenter [Ni, Nb, [x, z]]

  • forceGrid (arr) – 2D Array of force heatmap over xz domain of scan i.e. grid of xz positions with associated force [Nx,Nz] (With mask applied).

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force across scan positons (With mask applied).

  • FWHM (arr) – Array of full width half maxima of force contour for corresponding indentor and reference force [Nf,Ni]

  • Volume (arr) – Array of volume under force contour for corresponding indentor and reference force [Nf,Ni]

  • E_hertz (arr) – Array of fitted elastic modulus for each indentation force value over each scan positions for each indentor [Ni,Nb,Nt]

  • E_contour (arr) – Array of fitted elastic modulus (upto clipped force) across the contour of the sample for each indenter [Ni,Nb]

  • F (arr) – Array of interpolated force values over xz grid for all indentors and reference force [Ni, Nb, Nz]

abqsims.hemisphere.ImportVariables(localPath)[source]

Import simulation geometry variables from csv files.

Parameters:

localPath (str) – Path to local file/directory

Returns:
  • variables (list) – List of simulation variables: [timePeriod, timeInterval, binSize, meshSurface, meshBase, meshIndentor, indentionDepth, surfaceHeight]

  • baseDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]

  • rackPos (arr) – Array of coordinates [x,z] of scan positions to image biomolecule

abqsims.hemisphere.LineContourPlot(X, forceContour, refForces, rSurface, tipDims, elasticProperties, normalizer, maxRF, contrast)[source]

Function to plot fitted contour lines produced from simulation over the xz domain for single indenter and range reference force.Interpolate/none.

Parameters:
  • X (arr) – 1D array of x coordinates over scan positions

  • RF (arr) – Array of reaction force on indentor reference point

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force

  • refForces (float) – Threshold force to evaluate indentation contours at (pN)

  • rIndentor (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • normalizer (obj) – Normalisation of cmap

  • maxRF (float) – Maximum Force value

  • contrast (float) – Contrast between high and low values in AFM heat map (0-1)

abqsims.hemisphere.Postprocessing(TotalU2, TotalRF, NrackPos, Nb, Nt, courseGrain, refForces, indentorRadius, baseDims, rSurface, elasticProperties, **kwargs)[source]

Calculate a 2D force heatmap produced from simulation over the xz domain.

Parameters:
  • TotalU2 (arr) – Array of indentors y displacement in time over scan position and for all indenter [Ni, Nb, Nt]

  • TotalRF (arr) – Array of reaction force in time on indentor reference point over scan position and for all indenter [Ni, Nb, Nt]

  • NrackPos (arr) – Array of initial scan positions for each indenter [Ni, Nb, [x, z]]

  • Nb (int) – Number of scan positions along x axis of base

  • Nt (int) – Number of time steps

  • courseGrain (float) – Width of bins that subdivid xz domain of raster scanning/ spacing of the positions sampled over

  • refForces (arr) – Array of threshold force to evaluate indentation contours at (pN)

  • indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

  • baseDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]

  • rSurface (float) – Radius of semi-sphere surface

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

Keyword Arguments:

Symmetric – If false skip postprocessing step to ensure AFM image is symmetric about z-axis, instead produce image from raw data {Default: True}

Returns:
  • X (arr) – 1D array of postions over x domain of scan positions

  • Z (arr) – 1D array of postions over z domain of scan positions, discretised into bins of courseGrain value

  • forceGrid (arr) – 2D Array of force heatmap over xz domain of scan i.e. grid of xz positions with associated force for all indentors and reference force [Nf, Ni, Nb, Nz] (With mask applied).

  • forceContour (arr) – 2D Array of coordinates for contours of constant force given by reference force across scan positons for all indentor and reference force [Nf,Ni, Nb, [x,z]] (With mask applied).

  • FWHM (arr) – Array of full width half maxima of force contour for corresponding indentor and reference force [Nf,Ni]

  • Volume (arr) – Array of volume under force contour for corresponding indentor and reference force [Nf,Ni]

  • E_hertz (arr) – Array of fitted elastic modulus for each indentation force value over each scan positions for each indentor [Ni,Nb,Nt]

  • E_contour (arr) – Array of fitted elastic modulus (upto clipped force) across the contour of the sample for each indenter [Ni,Nb]

  • F (arr) – Array of interpolated force values over xz grid for all indentors and reference force [Ni, Nb, Nz]

abqsims.hemisphere.QueueCompletion(remote_server, **kwargs)[source]

Function to check queue statis and complete when queue is empty.

Parameters:

remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

Keywords Args:

ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

abqsims.hemisphere.RemoteCommand(remote_server, script, remotePath, command, **kwargs)[source]

Function to execute a command/ script submission on the SSH server.

A new Channel is opened and the requested command is executed. The commands input and output streams are returned as Python file-like objects representing stdin, stdout, and stderr.

Parameters:
  • remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

  • script (str) – Script to run via bash command

  • remotePath (str) – Path to remote file/directory

  • command (str) – Abaqus command to execute and run script

Keywords Args:

ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

abqsims.hemisphere.RemoteFTPFiles(remote_server, files, remotePath, localPath, **kwargs)[source]

Function to transfer files from directory on SSH server to local machine.

A new Channel is opened and the files are transfered. The function uses FTP file transfer.

Parameters:
  • remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

  • files (str) – File to transfer

  • remotePath (str) – Path to remote file/directory

  • localPath (str) – Path to local file/directory

Keywords Args:

ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

abqsims.hemisphere.RemoteSCPFiles(remote_server, files, remotePath, **kwargs)[source]

Function to make directory and transfer files to SSH server.

A new Channel is opened and the files are transfered.The commands input and output streams are returned as Python file-like objects representing stdin, stdout, and stderr.

Parameters:
  • remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

  • files (str/list) – File or list of file to transfer

  • remotePath (str) – Path to remote file/directory

Keywords Args:
  • ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

  • path – Path to data files

abqsims.hemisphere.RemoteSubmission(remote_server, remotePath, localPath, csvfiles, abqscripts, abqCommand, fileName, subData, rackPos, **kwargs)[source]

Function to run simulation and scripts on the remote servers.

Files for variables are transfered, ABAQUS scripts are run to create parts and input files. A bash file is created and submitted to run simulation for batch of inputs. Analysis of odb files is performed and data transfered back to local machine. Using keyword arguments can submitt the submission files in parrallel.

Parameters:
  • remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

  • remotePath (str) – Path to remote file/directory

  • localPath (str) – Path to local file/directory

  • csvfiles (list) – List of csv and txt files to transfer to remote server

  • abqscripts (list) – List of abaqus script files to transfer to remote server

  • abqCommand (str) – Abaqus command to execute and run script

  • fileName (str) – Base File name for abaqus input files

  • subData (str) – Data for submission to serve queue [walltime, memory, cpus]

  • rackPos (arr) – Array of scan positions and initial height [x,z] to image

Keyword Arguments:
  • ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

  • Submission ('serial'/ 'paralell') – Type of submission, submit pararlell scripts or single serial script for scan locations {Default: ‘serial’}

abqsims.hemisphere.Remote_Terminal(remote_server, **kwargs)[source]

Function to emulate cluster terminal.

Channel is opened and commands given are executed. The commands input and output streams are returned as Python file-like objects representing stdin, stdout, and stderr.

Parameters:

remote_server (list) – Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]

Keywords Args:

ProxyJump (proxy_server) – Optional define whether to use a Proxy Jump to ssh through firewall; defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

abqsims.hemisphere.SSHconnect(remote_server, **kwargs)[source]

Function to open ssh connecction to remote server.

A new Channel is opened and allows requested command to be executed in other functions. The function allows for ProxyJumpp/Port Forwarding/SSH Tunelling.

Args:

remote_server (list) : Contains varibles for remote server in list format [host, port, username, password, sshkey, home, scratch]:

  • host (str): Hostname of the server to connect to

  • port (int): Server port to connect to

  • username (str): Username to authenticate as (defaults to the current local username)

  • password (str): Used for password authentication, None if ssh-key is used; is also used for private key decryption if passphrase is not given.

  • sshkey (str): Path to private key for keyexchange if password not used, None if not used

  • home (str): Path to home directory on remote server

  • scratch (str): Path to scratch directory on remote server
    Keyword Args:
    ProxyJump (proxy_server)Optional define whether to use a Proxy Jump to ssh through firewall;

    defines varibles for proxy server in list format [host, port, username, password, sshkey, home, scratch]

    Returns:

    ssh_client (obj) : SHH client object which allows for bash command execution and file transfer.

abqsims.hemisphere.ScanGeometry(indentorType, tipDims, baseDims, rSurface, Nb, clearance)[source]

Produces array of scan locations and corresponding heights/ tip positions above surface in Angstroms (x10-10 m).

The scan positions are produced creating a straight line along the centre of the surface with positions spaced by the bin size. Heights, at each position, are calculated for conical indentor by set tip above sample and calculating vertical distance between of tip and molecules surface over the indnenters area. Subsequently, the minimum vertical distance corresponds to the position where tip is tangential. Spherical indentors are calculated explicitly.

Args:

indentorType (str) : String defining indentor type (Spherical or Capped) tipDims (list) : Geometric parameters for defining capped tip structure baseDims (list) : Geometric parameters for defining base/ substrate structure [width, height, depth] rSurface (float) : Radius of semi-sphere surface Nb (int) : Number of scan positions along x axis of base clearance (float) : Clearance above molecules surface indentor is set to during scan

Returns:

rackPos (arr) : Array of coordinates [x,z] of scan positions to image biomolecule

abqsims.hemisphere.SurfacePlot(rackPos, Nb, baseDims, tipDims, rSurface, binSize, clearance)[source]

Plot the surfaces and scan positions to visualise and check positions.

Parameters:
  • rackPos (arr) – Array of coordinates [x,z] of scan positions to image biomolecule

  • Nb (int) – Number of scan positions along x axis of base

  • baseDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]

  • tipDims (list) – Geometric parameters for defining capped tip structure

  • rSurface (float) – Radius of spherical surface

  • clearance (float) – Clearance above molecules surface indentor is set to during scan

abqsims.hemisphere.TipStructure(rIndentor, theta_degrees, tip_length)[source]

Produce list of tip structural parameters.

Change principle angle to radian. Calculate tangent point where sphere smoothly transitions to cone for capped conical indentor.

Parameters:
  • theta_degrees (float) – Principle conical angle from z axis in degrees

  • rIndentor (float) – Radius of spherical tip portion

  • tip_length (float) – Total cone height

Returns:

tipDims (list) – Geometric parameters for defining capped tip structure

abqsims.hemisphere.VolumePlot(Volume, indentorRadius, refForces, rSurface, elasticProperties)[source]

Function to plot volume under force contour for each indentor for varying reference force.

Parameters:
  • Volume (arr) – Array of volume under force contour for corresponding indentor and reference force [Nf,Ni]

  • indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

  • refForces (float) – Threshold force to evaluate indentation contours at, mimics feedback force in AFM

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

abqsims.hemisphere.YoungPlot(E_hertz, E_contour, TotalRF, indentorRadius, NrackPos, rSurface, elasticProperties, basePos)[source]

Function to plot elastic modulus over scan position for each indentor.

Parameters:
  • E_hertz (arr) – Array of fitted elastic modulus for each indentation force value over each scan positions for each indentor [Ni,Nb,Nt]

  • E_contour (arr) – Array of fitted elastic modulus (upto clipped force) across the contour of the sample for each indenter [Ni,Nb]

  • TotalRF (arr) – Array of reaction force in time on indentor reference point over scan position and for all indenter [Ni, Nb, Nt]

  • indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations

  • NrackPos (arr) – Array of initial scan positions for each indenter [Ni, Nb, [x, z]]

  • rSurface (float) – Radius of semi-sphere

  • elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]

  • basePos – Index of position along scan to consider vatioation in fitted E against force