Jedi

Jedi is written as a class which includes the structure’s geometries and its hessian in the relaxed state. The analysis works automatically with its inbuilt funcions. It converts the Hessian in redundant internal coordinates and calculates the energy in every internal mode using the equation shown below.

\[E_{RIMs} = \frac{1}{2} * {\Delta q}^T * H_q * \Delta q\]
strainjedi.jedi.jedi_analysis(atoms, rim_list, B, H_cart, delta_q, E_geometries, printout=None, ase_units=False)[source]

Analysis of strain energy stored in redundant internal coordinates.

atoms: class

An ASE Atoms object to determine the atomic species of the indices.

rim_list: list

A list of 4 numpy 2D arrays the first array containing bonds, second custom bonds, third bond angles, fourth dihedrals.

B: np array

B matrix.

H_cart: np array

Hessian in cartesian coordinates.

delta_q: np array

Array of deformations along the RICs.

E_geometries: float

Energy difference between the geometries.

printout: bool

Flag to print the output.

ase_units: bool

Flag to get eV for energies å fo lengths and degree for angles otherwise it is kcal/mol, Bohr and radians.

Returns

Analysis of RIMs.

strainjedi.jedi.jedi_printout(atoms, rim_list, delta_q, E_geometries, E_RIMs_total, proc_geom_RIMs, proc_E_RIMs, E_RIMs, ase_units=False)[source]

Printout of analysis of stored strain energy in redundant internal coordinates.

atoms: class

An ASE Atoms object to determine the atomic species of the indices.

rim_list: list

A list of 4 numpy 2D arrays the first array containing bonds, second custom bonds, third bond angles, fourth dihedrals.

delta_q: np array

Array of deformations along the RICs.

E_geometries: float

Energy difference between the geometries.

E_RIMs_total: float

Calculated total strain energy by jedi.

proc_geom_RIMs: float

Percentage deviation between calculated total energies.

proc_E_RIMs: array

Array of energy stored in each RIC.

ase_units: bool

Flag to get eV for energies å fo lengths and degree for angles otherwise it is kcal/mol, Bohr and radians.

strainjedi.jedi.jedi_printout_bonds(atoms, rim_list, E_geometries, E_RIMs_total, proc_geom_RIMs, proc_E_RIMs, E_RIMs, ase_units=False, file='total')[source]

Printout of analysis of stored strain energy in the bonds.

atoms: class

An ASE Atoms object to determine the atomic species of the indices.

rim_list: list

A list of 4 numpy 2D arrays the first array containing bonds, second custom bonds, third bond angles, fourth dihedrals.

delta_q: np array

Array of deformations along the RICs.

E_geometries: float

Energy difference between the geometries.

E_RIMs_total: float

Calculated total strain energy by jedi.

proc_geom_RIMs: float

Percentage deviation between calculated total energies.

proc_E_RIMs: np array

Array of energy stored in each RIC.

ase_units: bool

Flag to get eV for energies å fo lengths and degree for angles otherwise it is kcal/mol, Bohr and radians.

file: string

File to store the output.

class strainjedi.jedi.Jedi(atoms0, atomsF, modes)[source]
atoms0: class

Atoms object of relaxed structure with calculated energy.

atomsF: class

Atoms object of strained structure with calculated energy.

modes: class

VibrationsData object with hessian of relaxed structure.

classmethod fromdict(data: Dict[str, Any]) strainjedi.jedi.Jedi[source]

make it readable with .read()

get_b_matrix(indices=None)[source]

Calculates the derivatives of the RICs with respect to all cartesian coordinates using ase functions

get_common_rims()[source]

Get only the RICs in both structures bond breaks cannot be analysed logically

get_delta_q()[source]

get the strain in RICs substracts the values of the relaxed structure from the strained structure

Returns

2D array of the values.

get_energies()[source]

Calls the energies of the Atoms objects.

Returns

[energy difference, energy of atoms0, energy of atomsF]

get_hessian()[source]

Calls the hessian from the VibrationsData object

get_rims(mol)[source]

Gets the redundant internal coordinates

partial_analysis(indices, ase_units=False)[source]

Analyse a substructure with given indices.

Parameters

indices – list of indices of atoms in desired substructure

post_process(indices)[source]

get only the values of RICs inside a defined substructure

Parameters

indices – list of indices of atoms in desired substructure

Returns

Values for analyzed RIMs in the defined substructure

classmethod read(fd)

Read new instance from JSON file.

run(indices=None, ase_units=False)[source]

Runs the analysis. Calls all necessary functions to get the needed values.

Parameters
  • indices – list of indices of a substructure if desired

  • ase_units – boolean flag to get eV for energies å fo lengths and degree for angles otherwise it is kcal/mol, Bohr and radians

Returns

Indices, strain, energy in every RIM

set_bond_params(covf=1.3, vdwf=0.9)[source]
Parameters
  • covf – float factor for covalent radii to determine covalent bonds

  • vdwf – float factor for vdw radii to get the upper limit of the custom bond lengths

todict() Dict[str, Any][source]

make it saveable with .write()

vmd_gen(des_colors=None, box=False, man_strain=None, modus=None, colorbar=True, label='vmd')[source]

Generates vmd scripts and files to save the values for the color coding

Parameters
  • des_colors – (dict) key: order number, value: [R,G,B]

  • box – boolean True: draw box False: ignore box

  • man_strain – float reference value for the strain energy used in the color scale default: ‘None’

  • modus – str defines where to use the man_strain default: ‘None’

  • colorbar – boolean draw colorbar or not

  • label – string name of folder for the created files

write(fd)

Write to JSON file.