Substrate

tool_create_substrate.calc_en_gaussian(pos, pos_torque, basis, a, b, sigma, epsilon, u, u_inv)

Calculate energy, forces and torque on CM.

See corresponding particle function for details on parameters.

Return total energy (scalar) force (2d vector) torque (scalar).

tool_create_substrate.calc_en_sin(pos, pos_torque, basis, ks, epsilon)

Calculate energy, forces and torque on CM.

Substrate energy is modelled as sum of plane waves defined by the reciprocal vecotrs ks.

See corresponding particle function for details on parameters.

Return total energy (scalar) force (2d vector) torque (scalar).

tool_create_substrate.calc_en_sin_tri(pos, pos_torque, basis, a, epsilon, u, u_inv)

Calculate energy, forces and torque on CM.

!!! Coefficients are for triangular lattice only !!! Substrate energy is modelled as sum of three plane waves.

tool_create_substrate.calc_en_tanh(pos, pos_torque, basis, a, b, ww, epsilon, u, u_inv)

Calculate energy, forces and torque on CM.

Substrate energy is modelled as a lattice of tanh-shaped wells.

See corresponding particle function for details on parameters.

Return total energy (scalar) force (2d vector) torque (scalar).

tool_create_substrate.calc_matrices_bvect(b1, b2)

Metric matrices from primitive lattice vectors b1, b2.

Return 2x2 matrices to map to unit cell (u) and inverse (u_inv), back to real space.

tool_create_substrate.calc_matrices_square(R)

Metric matrices of square lattice of spacing R.

Return 2x2 matrices to map to unit cell (u) and inverse (u_inv), back to real space.

tool_create_substrate.calc_matrices_triangle(R)

Metric matrices of triangular lattice of spacing R.

Return 2x2 matrices to map to unit cell (u) and inverse (u_inv), back to real space.

tool_create_substrate.gaussian(x, mu, sigma)
tool_create_substrate.get_ks(R, n, c_n, alpha_n)

Compute wave vectors k of interfering plane waves

Coefficients for reciprical space from Vanossi, Manini, Tosatti www.pnas.org/cgi/doi/10.1073/pnas.1213930109 PNAS∣October 9, 2012∣vol. 109∣no. 41∣16429–16433

Lines: n, c_n, alpha_n = 2, 1, 0

Triangular: n, c_n, alpha_n = 3, 4/3, 0

Square: n, c_n, alpha_n = 4, np.sqrt(2), pi/4

Quasi-crystal 5-fold sym: n, c_n, alpha_n = 5, 2, 0

Quasi-crystal 6-fold sym: n, c_n, alpha_n = 6, 4/np.sqrt(3), -pi/6

tool_create_substrate.particle_en_gaussian(pos, pos_torque, basis, a, b, sigma, epsilon, u, u_inv)

Calculate energy, forces and torque on each particle.

Substrate energy is modelled as a lattice of gaussian-shaped wells.

Inputs are: - pos: position of particles in rigid cluster, as (N,2) array. - pos_torque: reference point (1,2 array) to compute the torque (usually CM). - basis: list of position of the substrate basis (N,2 array).

Well specific inputs (usually passed as *en_input): - a, b: beginning and end of tempered region (W=0 for x>b). - sigma: width of the gaussian. - epsilon: depth of the well. - u, u_inv: matrices to map to subsrtate unit cell (see calc_matrices_bvect)

Returns (for each particle) energy (N array), force (N,2), torque (N)

tool_create_substrate.particle_en_sin(pos, pos_torque, basis, ks, epsilon)

Calculate energy, forces and torque on each particle.

Substrate energy is modelled as sum of plane waves defined by the reciprocal vecotrs ks.

Inputs are: - pos: position of particles in rigid cluster, as (N,2) array. - pos_torque: reference point (1,2 array) to compute the torque (usually CM). - basis: list of position of the substrate basis (N,2 array).

Well specific inputs (usually passed as *en_input): - ks: list of wavevector generating the potential. - epsilon: depth of the potential.

Returns (for each particle) energy (N array), force (N,2), torque (N)

tool_create_substrate.particle_en_sin_tri(pos, pos_torque, basis, R, epsilon, u, u_inv)

Calculate energy, forces and torque on each particle.

!!! Coefficients are for triangular lattice only !!! Substrate energy is modelled as sum of three plane waves.

tool_create_substrate.particle_en_tanh(pos, pos_torque, basis, a, b, ww, epsilon, u, u_inv)

Calculate energy, forces and torque on each particle.

Substrate energy is modelled as a lattice of tanh-shaped wells.

Inputs are: - pos: position of particles in rigid cluster, as (N,2) array. - pos_torque: reference point (1,2 array) to compute the torque (usually CM). - basis: list of position of the substrate basis (N,2 array).

Well specific inputs (usually passed as *en_input): - a, b: beginning and end of tanh well (W=-epsilon for r<a, W=0 for x>b). - ww: shape factor for the tanh potential. - epsilon: depth of the well. - u, u_inv: matrices to map to subsrtate unit cell (see calc_matrices_bvect)

Returns (for each particle) energy (N array), force (N,2), torque (N)

tool_create_substrate.substrate_from_params(params)

Initialise a substrate from a parameter dictionary (usually from JSON file)

Returns the functions computing the particle-wise and total energy, and the list of potential-specific paramters to pass to these functions.