scan

libra_py.scan.coords2xyz(labels, q, itraj, unit_conversion_factor=1.0)[source]

This function creates a string containing an xyz-formatted atomistic information.

Parameters
  • labels (list of strings) – the labels of the atoms of the system, the labels are in a specific order that corresponds to the atomic info in an xyz file. The length of this list is nat - the number of atoms.

  • q (MATRIX(ndof, ntraj)) – the coordinates of all DOFs for all trajectories, here ndof = 3 natoms

  • itraj (int) – the index of the trajectory that we are interested in.

  • unit_conversion_factor (double) – the conversion factor to convert input in q unit to the new units expected in the xyz file. In a common situation, when q uses Bohr units, and xyz is expected to be in Angstroms, use the unit_conversion_factor = 1.0/units.Angst

Returns

the string representation of the xyz file that is made of the provided input geomtry/atomic labels

Return type

string

libra_py.scan.make_path_xyz(R0, R1, E, s0=0.0, s1=1.0, npts=2, S0=0.0, S1=1.0)[source]

This function generates an xyz file with a “path” connecting one geometry to another (like in NEB), but also extends the range of the scan beyond the initial limiting points, allowing the put extra points along the scan direction

Parameters
  • R0 (MATRIX(3*nat, 1)) – coordinates of all DOFs for initial input geometry [ Bohr ]

  • R1 (MATRIX(3*nat, 1)) – coordinates of all DOFs for final input geometry [ Bohr ]

  • E (list of nat strings) – atom names (elements) of all atoms

  • s0 (double) – mapping of the R0 point onto the line of search [ default: 0.0 ]

  • s1 (double) – mapping of the R1 point onto the line of search [ default: 1.0 ]

  • npts (int) – the number of images (including the boundary points) we would have between the input points. This number defines the spacing between the images on the path.

  • S0 (double) – mapping of the actual initial point onto the line of search [ default: 0.0 ]

  • S1 (double) – mapping of the actual final point onto the line of search [ default: 1.0 ]

Returns

( R, xyz, s_axis), where:

  • R ( MATRIX(3*nat, Npts) ): coordinates of all points on the scan path [ Bohr ]

  • xyz ( string ): the xyz file content with all the points [ Angstrom ]

  • s_axis ( list of Npts doubles): values of the “reaction” coordinate

Return type

tuple

libra_py.scan.make_path_xyz2(labels, path, itraj, unit_conversion_factor=1.0)[source]

This function creates a string containing an xyz-formatted trajectory (multiple geometries)

Parameters
  • labels (list of strings) – the labels of the atoms of the system, the labels are in a specific order that corresponds to the atomic info in an xyz file. The length of this list is nat - the number of atoms.

  • path (list of nsteps MATRIX(ndof, ntraj) objects) – the coordinates of all DOFs for all trajectories for nsteps frames (geometries), here ndof = 3 natoms

  • itraj (int) – the index of the trajectory that we are interested in.

  • unit_conversion_factor (double) – the conversion factor to convert input in q unit to the new units expected in the xyz file. In a common situation, when q uses Bohr units, and xyz is expected to be in Angstroms, use the unit_conversion_factor = 1.0/units.Angst

Returns

the string representation of the xyz file that is made of the provided input geomtry/atomic labels

Return type

string