abqsims.wave package
- abqsims.wave.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.wave.ContourPlot(X, Z, rackPos, forceGrid, forceContour, refForce, clearance, A, N, waveDims, tipDims, 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
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
refForce (float) – Threshold force to evaluate indentation contours at
clearance (float) – Clearance above molecules surface indentor is set to during scan
A (arr) – Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb]
N (int) – Number of fourier series terms included in fit
waveDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]
tipDims (list) – Geometric parameters for defining capped tip structure
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.wave.ContourPlotMan(X, Z, rackPos, forceGrid, forceContour, indentorRadius, clearance, A, N, waveDims, 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
A (arr) – Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb]
N (int) – Number of fourier series terms included in fit
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.wave.ContourPlotNI(X, Z, rackPos, forceGrid, forceContour, refForce, clearance, A, N, waveDims, tipDims, 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
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
refForce (float) – Threshold force to evaluate indentation contours at
clearance (float) – Clearance above molecules surface indentor is set to during scan
A (arr) – Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb]
N (int) – Number of fourier series terms included in fit
waveDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]
tipDims (list) – Geometric parameters for defining capped tip structure
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.wave.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.wave.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.wave.ExportVariables(localPath, rackPos, variables, waveDims, wavePos, 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]
waveDims (list) – Geometric parameters for defining base/ substrate structure [wavelength, amplitude, width]
wavePos (arr) – Positions on wave used to define spline in ABAQUS
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.wave.FInterpolatePlot(X, Z, rackPos, F, clearance, waveDims, tipDims, elasticProperties, normalizer, maxRF, contrast)[source]
Function to plot a 2D force heatmap interpolated from simulation over the xz domain.
- 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] ]
F (arr) – Array of interpolated force values over xz grid for all indentors and reference force [Ni, Nb, Nz]
clearance (float) – Clearance above molecules surface indentor is set to during scan
waveDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]
tipDims (list) – Geometric parameters for defining capped tip structure
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.wave.FWHMPlot(FWHM, indentorRadius, refForces, waveDims, 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)
waveDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]
elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]
- abqsims.wave.FWHM_Volume_Fourier(forceContour, NrackPos, X0, Nf, Ni, Nmax, indentorRadius, waveDims)[source]
Calculate Fourier series components, 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]]
X0 (arr) – Array of x positions along the scan
Nf – Number if reference force values
Ni – Number if indentor radii/ values
Nmax (int) – Maximum number of terms in fourier series of force contour
indentorRadius (arr) – Array of indentor radii of spherical tip portion varied for seperate simulations
waveDims (list) – Geometric parameters for defining base/ substrate structure [wavelength, amplitude, width, Number of oscilations/ groups in wave]
- 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]
A (arr) – Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb]
- abqsims.wave.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.wave.ForceContour2D(U2, RF, rackPos, forceRef)[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)
- 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.wave.ForceGrid2D(X, Z, U2, RF, rackPos, courseGrain)[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 ( 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
- 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]
- abqsims.wave.ForceInterpolation(Xgrid, Zgrid, U2, RF, rackPos, rIndentor, elasticProperties, Nt)[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
elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]
Nt (int) – Number of time steps
- 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 an indentors and reference force [Nb, Nz]
- Return type:
E_hertz (arr)
- abqsims.wave.Fourier(x, waveDims, *a)[source]
Function to calculate Fourier Series for array of coefficence a
- abqsims.wave.FourierPlot(X, Z, TotalRF, NrackPos, forceGrid, forceContour, refForce, m, indentorRadius, clearance, A, Nmax, N, waveDims, elasticProperties, contrast)[source]
Function to plot Full Width Half Maxima of force contour for each indentor for varying reference force.
- Parameters:
X (arr) – 1D array of x coordinates over scan positions
Z (arr) – 1D array of z coordinates over scan positions
TotalRF (arr) – Array of reaction force on indentor reference point
NrackPos (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
refForce (float) – Threshold force to evaluate indentation contours at
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
A (arr) – Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb]
N (int) – Number of fourier series terms included in fit
Nmax (int) – Maximum number of terms in fourier series of force contour
waveDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]
elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]
contrast (float) – Contrast between high and low values in AFM heat map (0-1)
m (int) – Index for reference force
- abqsims.wave.Fspherical(r, r0, r_int, z_int, theta, R, tip_length)[source]
Calculates and returns spherical 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 for tangent point (point where sphere smoothly transitions to cone)
z_int (float) – Height of tangent point (point where sphere smoothly transitions to cone)
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)
- abqsims.wave.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]
waveDims (list) – Geometric parameters for defining base/ substrate structure [wavelength, amplitude, width, group number]
rackPos (arr) – Array of coordinates [x,z] of scan positions to image biomolecule
- abqsims.wave.LineContourPlot(X, Z, rackPos, forceContour, refForces, clearance, A, N, waveDims, tipDims, elasticProperties, normalizer, maxRF, contrast)[source]
Function to plot a 2D force contour lines produced from simulation over the xz domain for single indenter and range of reference 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
rackPos (arr) – Array of initial scan positions for indenter [Nb, [x, z] ]
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)
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
A (arr) – Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb]
N (int) – Number of fourier series terms included in fit
waveDims (list) – Geometric parameters for defining base/ substrate structure [width, height, depth]
tipDims (list) – Geometric parameters for defining capped tip structure
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.wave.Postprocessing(TotalU2, TotalRF, NrackPos, Nb, Nt, Nmax, courseGrain, refForces, indentorRadius, waveDims, elasticProperties)[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
Nmax (int) – Maximum number of terms in fourier series of force contour
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
waveDims (list) – Geometric parameters for defining base/ substrate structure [wavelength, amplitude, width, Number of oscilations/ groups in wave]
elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]
- 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]
A (arr) – Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb]
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.wave.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.wave.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.wave.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.wave.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.wave.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.wave.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.wave.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.wave.ScanGeometry(indentorType, tipDims, waveDims, 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.
- Parameters:
indentorType (str) – String defining indentor type (Spherical or Capped)
tipDims (list) – Geometric parameters for defining capped tip structure
waveDims (list) – Geometric parameters for defining base/ substrate structure [wavelength, amplitude, width]
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.wave.SurfacePlot(rackPos, Nb, waveDims, wavePos, tipDims, 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
waveDims (list) – Geometric parameters for defining base/ substrate structure [Wavelength, Amplitude, Width, Number of oscilations/ groups in wave ]
wavePos – Positions on wave used to define spline in ABAQUS
tipDims (list) – Geometric parameters for defining capped tip structure
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
- abqsims.wave.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.wave.VolumePlot(Volume, indentorRadius, refForces, waveDims, 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 (pN)
waveDims (list) – Geometric parameters for defining wave base/ substrate structure [wavelength, amplitude, width, Group number]
elasticProperties (arr) – Array of surface material properties, for elastic surface [Youngs Modulus, Poisson Ratio]
- abqsims.wave.WaveSimulation(remote_server, wrkDir, localPath, abqscripts, abqCommand, fileName, subData, indentorType, indentorRadius, theta_degrees, tip_length, indentionDepths, waveDims, refForces, courseGrain, Nmax, 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.
- 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
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 waveDims (list) : Geometric parameters for defining base/ substrate structure [wavelength, amplitude, width, Number of oscilations/ groups in wave] 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 Nmax (int) : Maximum number of terms in fourier series of force contour 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 Angstrom (x10-10 m) meshIndentor (float) : Value of indentor mesh given as bin size for vertices of geometry in Angstrom (x10-10 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 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’) : 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, set as indenter radius you wish to plot {Default: False} 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 produce AFM image from 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] A (arr) : Array of Fourier components for force contour for corresponding indentor and reference force [Nf,Ni,Nb] 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.wave.YoungPlot(E_hertz, E_contour, TotalRF, indentorRadius, NrackPos, waveDims, 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]]
waveDims (list) – Geometric parameters for defining wave base/ substrate structure [wavelength, amplitude, width, Group number]
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