Curve Shorten Module

geometricmd.curve_shorten_pbc.compute_trajectory(trajectory, local_num_nodes, energy, tol, filename, configuration, length_function=<function length>, W=1.0, pressure=1.0)[source]

This function updates the trajectory object positions to represent the shortest curve.

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.
  • 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).
  • length_function (optional, func) – A Python function that approximates the length of a curve.
  • W (optional, float) – A parameter for NPT simulations, used to define how mobile the unit cell is.
  • pressure (optional, float) – The constant pressure for the simulation.
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, length_function, W, pressure)[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.
  • start_cell (numpy.array) – The first cell of the curve.
  • end_cell (numpy.array) – The last cell 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.
  • length_function (func) – A Python function that estimates the length of a curve and also returns it’s gradient.
  • W (float) – A parameter for NPT simulations, used to define how mobile the unit cell is.
  • pressure (float) – The constant pressure for the simulation.
Returns:

The node number for which the returned midpoint corresponds to. numpy.array :

The midpoint along the approximate local geodesic curve.

numpy.array :

The midpoint cell along the approximate local geodesic curve.

Return type:

int