Jedi#
This is the main module you want to use. For an in-depth guide, please see our tutorial.
- class strainjedi.Jedi(atoms0: Atoms, atomsF: Atoms, modes: VibrationsData, epot: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None = None)[source]#
- property B#
- property E_RIMs#
- property E_RIMs_total#
- property H#
- add_custom_bonds(bonds: ndarray[tuple[Any, ...], dtype[_ScalarT]]) None[source]#
Add custom bonds for non-covalent interactions after creating the object.
- Parameters:
bonds – 1D or 2Darray with atom indices, [[i,j]…]
- ase_objtype = 'jedi'#
- property atoms0#
- property atomsF#
- property covf#
- property custom_bonds#
- property deltaE#
- property delta_q#
- property energies#
- classmethod fromdict(data: dict[str, Any]) Jedi[source]#
Reconstruct a Jedi object from a dictionary. Raises ValueError if required fields are missing or have incorrect types. Make Jedi state readable from JSON with Jedi.read()
- get_deltaE() float[source]#
Returns the difference in potential energies of self.atoms0 and self.atomsF.
- property indices#
- property part_rim_list#
- 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
- property proc_E_RIMs#
- property proc_geom_RIMs#
- property q0#
- property qF#
- classmethod read(fd)#
- property rics0#
- property ricsF#
- property rim_list#
- run(indices=None, ase_units=False, printout: bool = True)[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, Å for 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
- property vdwf#
- property visualization_data#
- visualize(visualizer='mpl', colormap='green_red', output_dir: Path | str = 'visualization', single_mode: str | None = None, man_strain: float | None = None, show: bool = False, show_indices: bool = False, box: bool = False, split_bonds: bool = True, ase_units: bool = False)[source]#
- Parameters:
visualizer – (‘mpl’ or ‘vmd’) Defines visualizer used for visualization.
colormap – (str or matplotlib Colormap object) Color scheme for strain energy mapping. Built-in options are ‘green_red’, ‘cyan_red’, ‘magma’, or any matplotlib colormap name (e.g. ‘viridis’, ‘inferno’). Alternatively, a custom matplotlib Colormap object can be passed directly. default: ‘green_red’
output_dir – (str or Path) Directory to save the visualization output files. default: ‘visualization’
single_mode – (str or None) Restrict visualization to a single mode. Options are ‘bl’ (bond lengths), ‘ba’ (bond angles), ‘da’ (dihedral angles), or ‘all’ (combined). If None, all modes are generated. default: None
man_strain – (float or None) Manual reference value for the maximum of the color scale. If None, the maximum strain energy in the data is used. default: None
show – (bool) Display the plot interactively. Only works with the Matplotlib visualizer. default: False
show_indices – (bool) Display atom indices. Only works with the Matplotlib visualizer.
split_bonds – (bool) Display PBC bonds as half-bonds at each side of the unit cell.
box – (bool) Draw the unit cell box. Only applies to periodic structures. default: False
ase_units – (bool) Whether to use Angstrom and eV instead of kcal/mol and Bohr. default: False
- vmd_gen(_des_colors: dict | None = None, _box: bool = False, man_strain: float | None = None, modus: str | None = None, _colorbar: bool = True, label: Path | str = 'vmd', incl_coloring: str | None = None)[source]#
Deprecated since version 1.1.0: Use
Jedi.visualize()withvisualizer="vmd"instead.- 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 or pathlib.Path name of folder for the created files
incl_coloring – str 2 inclusive coloring options, otherwise green to red gradient “cyan”: cyan to red gradient “magma”: matplotlib magma gradient default: ‘None’
- write(fd)#