Curve Shorten Module

geometricmd.curve_shorten_pbc.compute_trajectory(trajectory, local_num_nodes, energy, pressure, W, tol, filename, configuration)[source]

This function creates a new task to compute a geodesic midpoint and submits it to the worker pool.

Parameters:
  • trajectory (curve) – A GeometricMD curve object describing the initial trajectory between start and end configurations.
  • local_num_nodes (int) – The number of points to use when computing the local geodesics.
  • energy (float) – The total energy of the system.
  • pressure (float) – The pressure of the system.
  • W (float) – The stiffness of the unit cell.
  • tol (float) – The tolerance by which if the total curve movement falls below this number then the Birkhoff method stops.
  • filename (str) – The filename for the output files from the simulation.
  • configuration (dict) – A dictionary containing additional parameters for the simulation. Accepts: ‘processes’ - the number of processors to use (defaults to 1), ‘write_to_log’ - a boolean value, if true writes to a logfile, otherwise prints to console (defaults to False) and ‘save_every’ - an integer indicating the program will save after every ‘save_every’th iteration of the Birkhoff algorithm (defaults to 1).
geometricmd.curve_shorten_pbc.find_geodesic_midpoint(start_point, end_point, start_cell, end_cell, number_of_inner_points, dimension, mass_matrix, molecule, energy, node_number, pressure, W)[source]

This function computes the local geodesic curve joining start_point to end_point using the L-BFGS method.

Parameters:
  • start_point (numpy.array) – The first end point of the curve.
  • end_point (numpy.array) – The last end point of the curve.
  • number_of_inner_points (int) – The number of nodes along the curve, less the end points.
  • dimension (int) – The dimension of the problem. Computed from the atomistic simulation environment.
  • mass_matrix (numpy.array) – A diagonal NumPy array containing the masses of the molecular system as computed in the SimulationClient object.
  • molecule (ase.atoms) – The ASE atoms object corresponding to the molecule being simulated.
  • energy (float) – The total energy of the system.
  • node_number (int) – The node number for which we are calculating a new position for.
  • pressure (float) – The pressure of the system.
  • W (float) – The stiffness of the unit cell.
Returns:

The midpoint along the approximate local geodesic curve.

Return type:

numpy.array

geometricmd.curve_shorten_pbc.length(x, start_point, end_point, start_cell, end_cell, number_of_inner_nodes, mass_matrix, dimension, molecule, energy, pressure, W, epsilon=1e-12)[source]

This function computes an approximation of the length functional for local geodesics. It also provides the gradient of this approximation.

Parameters:
  • x (numpy.array) – The positions of the interior curve points.
  • start_point (numpy.array) – The first end point of the curve.
  • end_point (numpy.array) – The last end point of the curve.
  • number_of_inner_points (int) – The number of nodes along the curve, less the end points.
  • mass_matrix (numpy.array) – A diagonal NumPy array containing the masses of the molecular system as computed in the SimulationClient object.
  • dimension (int) – The dimension of the problem. Computed from the atomistic simulation environment.
  • molecule (ase.atoms) – The ASE atoms object corresponding to the molecule being simulated.
  • energy (float) – The total energy of the system.
  • pressure (float) – The pressure of the system.
  • W (float) – The stiffness of the unit cell.
  • epsilon (optional, float) – A small number used where the metric co-efficient is zero or not defined.
Returns:

The approximate length of the curve and the corresponding gradient.

Return type:

float, numpy.array

References

[Sutton2013]Microscopic Hamiltonian Systems and their Effective Description, Daniel C. Sutton, 2013.