open_viewmin.nematic.nematic_plot.nematic_plot_no_qt ==================================================== .. py:module:: open_viewmin.nematic.nematic_plot.nematic_plot_no_qt .. autoapi-nested-parse:: Define `NematicPlotNoQt` Plotter class for nematic liquid crystals visualization, with the filters tree but without Qt. Classes ------- .. autoapisummary:: open_viewmin.nematic.nematic_plot.nematic_plot_no_qt.NematicPlotNoQt Module Contents --------------- .. py:class:: NematicPlotNoQt(filenames=None, q0=0.0, user_settings=None, data_format='open-Qmin', sep='\t', reader=None, theme=None, off_screen=False, notebook=True, **kwargs) Bases: :py:obj:`open_viewmin.filter_tree_plot.filter_tree_plot.FilterTreePlot` Plotter class for nematic liquid crystals visualization, with the filters tree but without Qt. :param filenames: Files to import. :type filenames: list[str], str, or `None`, optional :param q0: Chiral wavenumber for cholesteric (chiral nematic) ground state, used in free energy calculations. :type q0: float, optional :param user_settings: Customizations to default plotter settings. :type user_settings: dict or `None`, optional :param data_format: Formatting style of data text files to import; used only if parameter `reader` has value `None`. :type data_format: ['open-Qmin' | 'Qmin' | 'director'], optional :param sep: Column delimiter for imported text file(s) :type sep: str, optional :param reader: Function for reading data from text files; set to `None` to use the `data_format` (and, optionally, `sep`) parameters to determine data import behavior. :type reader: callable() or `None`, optional :param theme: PyVista plot theme :type theme: ['dark' | 'document' | 'paraview' | `None`], optional :param off_screen: Whether to render off-screen :type off_screen: bool, optional :param notebook: Whether to display inside of a Jupyter notebook :type notebook: bool, optional :param \*\*kwargs: Keyword arguments to :class:`~open_viewmin.filter_tree_plot.filter_tree_plot.FilterTreePlot` .. py:method:: Q33_from_Q5(q5) :staticmethod: Convert 5-component Q-tensor information to 3x3 matrix .. py:method:: Q_from_n(director_data) :staticmethod: Create Q-tensor array from director data assuming S_0=1 .. py:method:: _legacy_qmin_import(qtensor_filename) Reader for output from older Qmin (a.k.a. nematicvXX) code. Note that while only the `"Qtensor_..."` files are supplied directly, this routine expects the associated `"Qmatrix_..."` files to be in the same directory. :param qtensor_filename: Filenames of `"Qtensor_..."` :type qtensor_filename: str :returns: Imported data :rtype: list[np.ndarray] .. py:method:: _pre_init(q0, data_format, reader, sep) Portion of initialization to run before `open_viewmin.FilterTreePlot.__init__()` :param q0: Chiral wavenumber :type q0: float :param data_format: Formatting style of data text files to import; used only if parameter `reader` has value `None`. :type data_format: ['open-Qmin' | 'Qmin' | 'director'], optional :param reader: Function for reading data from text files; set to `None` to use the `data_format` (and, optionally, `sep`) parameters to determine data import behavior. :type reader: callable() or None, optional :param sep: Column delimiter for imported text file(s) :type sep: str, optional :returns: Reader :rtype: callable() .. py:method:: add_circuits_around_points(points_mesh_name, normals_name, radius=3, n_samples=16, use_ints=False) Create small, closed-loop meshes around a set of points, for use in plotting director winding near disclinations. :param points_mesh_name: :type points_mesh_name: str :param normals_name: :type normals_name: str :param radius: :type radius: float :param n_samples: :type n_samples: int :param use_ints: :type use_ints: bool :rtype: :class:`~open_viewmin.filter_tree_plot.filter_formulas.FilterFormula` .. py:method:: analyze_disclination_at_picked_point(**kwargs) Show director winding character at a picked point on a disclination :param \*\*kwargs: Keyword arguments to :meth:`analyze_disclinations_at_points` :type \*\*kwargs: dict, optional .. py:method:: analyze_disclinations(defects_mesh_name='defects', n_centroids=50, tangents_glyph_name=None, **kwargs) For several "centroid" points along disclination lines, show the director winding character. :param defects_mesh_name: :type defects_mesh_name: str :param n_centroids: :type n_centroids: int :param tangents_glyph_name: :type tangents_glyph_name: str, optional :param \*\*kwargs: Keyword arguments to :meth:`analyze_disclinations_at_points` :type \*\*kwargs: dict, optional .. py:method:: analyze_disclinations_at_points(points_mesh_name, radius=3, n_samples=16, use_ints=False) :param points_mesh_name: :type points_mesh_name: str :param radius: :type radius: int :param n_samples: :type n_samples: int :param use_ints: :type use_ints: bool :rtype: :class:`~open_viewmin.filter_tree_plot.filter_formulas.FilterFormula` .. py:method:: auto_setup(notebook=True) Routines to run after first importing data. .. py:method:: calculate_D_tensor(refresh=True) Calculate Schimming-ViƱals tensor. Creates the tensor array "D_tensor", and the symmetric tensor arrays "D^T D" and "D D^T". .. py:method:: calculate_Westin_metrics() Calculate Westin scalars measures from the Q-tensor. Creates the scalar arrays "Westin_l", "Westin_p", "Westin_s". .. py:method:: calculate_and_show_defect_tangent(glyph_stride=2, field_name=None, scale='nematic_sites', mesh_name='defects', threshold=0.4) Display disclination line tangent vectors as glyphs :param glyph_stride: Typical spacing between glyphs :type glyph_stride: int, optional :param field_name: Proposed name for new tangent vector field array :type field_name: str or None, optional :param scale: Name of scalar array to use for glyph size scale. :type scale: str, optional :param mesh_name: Name of defects mesh :type mesh_name: str, optional :param threshold: Minimum value of 1/S for deciding which points to include in tangent calculation. :type threshold: float or None, optional :returns: Name of new glyphs mesh :rtype: str .. py:method:: calculate_chi_tensor(refresh=True) Calculate Efrati-Irvine handedness pseudotensor. Creates the tensor array "Chi", the symmetric tensor arrays "Chi^T Chi" and "Chi Chi^T", and the vector array "Omega from Chi". Note that this calculation extends Efrati and Irvine's construction to the Q-tensor rather than relying on the director field. .. py:method:: calculate_defect_tangent(threshold=0.4, mesh_name='defects', field_name=None) Calculate the unit tangent field to defect lines. :param threshold: Minimum value of 1/S for deciding which points to include in tangent calculation. :type threshold: float or None, optional :param mesh_name: Name of defects mesh :type mesh_name: str, optional :param field_name: Proposed name for new tangent vector field array :type field_name: str or None, optional :returns: Name of new tangent vector field array :rtype: str .. py:method:: calculate_frank_energy_comps() Calculate splay, twist, and bend Frank free energy densities and related quantities. .. py:method:: calculate_n_gradients(refresh=True) Calculate gradients of director field .. py:method:: calculate_rotation_vector_n() Calculate a combination of derivatives on the director field that, for an ideal disclination, gives the rotation vector (a.k.a. Frank vector) up to sign. .. py:method:: create_fullmesh(dat=None, mesh_name='fullmesh', frame_num=None) Create a uniform grid mesh as a root mesh for the filter tree. :param dat: Data array, with first three columns holding integer coordinates X, Y, Z. :type dat: np.ndarray, optional :param mesh_name: Name of root mesh. :type mesh_name: str, optional :param frame_num: Frame number for this root mesh. Pass `None` to append as a new frame. :type frame_num: int or `None`, optional :returns: Frame number and new root mesh. :rtype: int, pyvista.dataset .. py:method:: director_data_import(filename, sep='\t') :staticmethod: Import nematic director data and convert it into Q-tensor data in the open-Qmin data_format. :param filename: :type filename: str :param sep: :type sep: str, optional :returns: Q-tensor data in the open-Qmin data_format. :rtype: np.ndarray .. py:method:: load(filenames, **kwargs) Import a file or files. :param filenames: Files to load. :type filenames: str or list[str] :param reader: Function to read each file. :type reader: callable, optional :param mpi_group: Whether to stitch files together as separate outputs from the same timestep from an MPI run. :type mpi_group: bool, optional :param do_load_frame: Whether to view the frame containing the loaded data. :type do_load_frame: bool, optional .. py:method:: max_re_eigval(a) :staticmethod: Maximum real part of eigenvalue for eigenvalues in an array of 3x3 matrices :param a: Array of 3x3 matrices :type a: np.ndarray | pyvista.pyvista_ndarray :returns: Maximum real part of eigenvalues :rtype: np.ndarray .. py:method:: n_from_Q(q_matrix) :staticmethod: Get director from 3x3-matrix Q-tensor data .. py:method:: nematic_calculations(dat, mesh) Assign Q-tensor and director field data to a mesh, and conduct calculations based on them. :param dat: Data array of floats in the open-Qmin data_format: `x y z Qxx Qxy Qxz Qyy Qyz site_type S` :type dat: np.ndarray :param mesh: :type mesh: pyvista.DataSet .. py:method:: num_boundaries() Number of boundary objects :returns: Number of boundary objects :rtype: int .. py:method:: pick_point_analyze_disclination(**kwargs) Enable surface picking mode and analyze director winding about the picked point, assumed to be on a disclination. :param \*\*kwargs: Keyword arguments to :meth:`analyze_disclinations_at_points` :type \*\*kwargs: dict, optional .. py:method:: plot_director_glyphs_on_circuits(points_mesh_name, circuits_formula, result_name='director_on_circuits', defects_mesh_name='defects') Show director glyphs on small, closed-loop measuring circuits around disclinations at given points. :param points_mesh_name: :type points_mesh_name: str :param circuits_formula: :type circuits_formula: :class:`~open_viewmin.filter_tree.filter_formulas.FilterFormula` :param result_name: :type result_name: str :param defects_mesh_name: :type defects_mesh_name: str :rtype: :class:`~open_viewmin.filter_tree_plot.filter_formulas.FilterFormula` .. py:method:: post_init() Portion of initialization to run after `open_viewmin.FilterTreePlot.__init__()` .. py:method:: set_director(director_data, mesh_name=None) Set director orientation data directly from an array. :param director_data: :type director_data: np.ndarray :param mesh_name: Name of mesh on which to define director :type mesh_name: str or None, optional .. py:method:: set_q0(q0) Set energetically preferred cholesteric wavenumber. (Re)calculates arrays that depend on q0. :param q0: Chiral wavenumber :type q0: float .. py:method:: set_qtensor(q_data, mesh) Set Q-tensor data directly from an array. :param q_data: Q-tensor data with each row formatted as `[Qxx, Qxy, Qxz, Qyy, Qyz]` :type q_data: np.ndarray :param mesh: :type mesh: pyvista.DataSet :returns: Q-tensor data reformatted such that each row contains the nine elements of the symmetric Q-tensor matrix, flattened. :rtype: np.ndarray .. py:method:: setup_boundaries(separate_meshes=False) Add isosurface or isosurfaces for boundaries. :param separate_meshes: Whether to create a separate isosurface mesh for each boundary. :type separate_meshes: bool, optional .. py:method:: setup_defects() Add single-value isosurface of uniaxial order to visualize defects .. py:method:: setup_director() Add glyphs to visualize nematic director on a plane controlled by a plane widget .. py:method:: show_jones(**kwargs) Display optical transmission, calculated from Jones matrices, on three planes. :param \*\*kwargs: :type \*\*kwargs: dict, optional .. py:attribute:: do_auto_setup :value: False .. py:attribute:: q0 .. py:attribute:: reader .. py:attribute:: xyz_arrays