pyvibdmc.analysis.analyze_wfn ============================= .. py:module:: pyvibdmc.analysis.analyze_wfn Classes ------- .. autoapisummary:: pyvibdmc.analysis.analyze_wfn.AnalyzeWfn Module Contents --------------- .. py:class:: AnalyzeWfn(coordinates) .. py:attribute:: xx .. py:method:: dot_pdt(v1, v2) :staticmethod: Takes two stacks of vectors and dots the pairs of vectors together .. py:method:: exp_val(operator, dw) :staticmethod: Calculation of an expectation value using Monte Carlo Integration :param operator: array of bond lengths, bond angles, potentials, dipole moments, etc. :type operator: np.ndarray :param dw: Descendant Weights :type dw: np.ndarray :return: Expectation value (single float) .. py:method:: bond_length(atm1, atm2) Computes the norm of the vector between two atoms. :param atm1: desired atom number 1 (python index starts at 0) :type atm1: int :param atm2: desired atom number 2 :type atm2: int :return: norm of x[atm1]-x[atm2] .. py:method:: bond_angle(atm1, atm_vert, atm3) Calculate atm1 - atm_vert - atm3 angle :param atm1: Index of the first external atom (python index starts at 0) :type atm1: int :param atm_vert: Index of the atom at the vertex (python index starts at 0) :type atm_vert: int :param atm3: Index of the second external atom (python index starts at 0) :type atm3: int :return: Angle in radians .. py:method:: bisecting_vector(atm1, atm_vert, atm3) Get normalized bisecting vector of two vectors (two bond lengths). It is assumed that the two flanking atoms have the same central atom. |b|*a + |a|*b :param atm1: Index of the first external atom (python index starts at 0) :type atm1: int :param atm_vert: Index of the atom at the vertex (python index starts at 0) :type atm_vert: int :param atm3: Index of the second external atom (python index starts at 0) :type atm3: int :return: normalized bisecting vector .. py:method:: dihedral(atm_1, atm_2, atm_3, atm_4) Defines the dihedral coordinate using 3 vectors. vec_1 and vec_2 form a plane, and vec_2 and vec_3 form a plane. The dihedral angle is the calculated angle betwen these two planes. The sign is dependent on the direction of the vectors, as the cross product is taken between the two pairs of two vectors https://stackoverflow.com/questions/20305272/dihedral-torsion-angle-from-four-points-in-cartesian-coordinates-in-python https://en.wikipedia.org/w/index.php?title=Dihedral_angle&oldid=689165217#Angle_between_three_vectors .. py:method:: get_component(atm, xyz) Get x, y, or z component of a vector that corresponds to a particular atom in some predetermined cooridnate system. :param atm: atom's index in numpy array :type: int :param xyz: Either 0 (x), 1 (y), or 2 (z) :type xyz: int :return: vector of x, y, or z components of a stack of vectors .. py:method:: cart_to_spherical(vecc) :staticmethod: Takes stack of cartesian vectors (nx3) and translates them to stack of r theta phi coordinates, with the assumption that you are already in the coordinate frame you desire. .. py:method:: projection_1d(attr, desc_weights, bins=25, range=None, normalize=True) :staticmethod: Project the probability amplitude onto a particular coordinate, 1D Histogram. :param attr: the coordinate to be projected onto (bond length, bond angle, etc.) :type attr: np.ndarray :param desc_weights: the descendant weights for \psi**2 :type desc_weights: np.ndarray :param bins: Number of bins in histogram (higher number, more number of walkers needed) :type attr: int :param range: Range over which attr is histogrammed :type range: tuple :param normalize: Normalizes the wave function along coordinate :type attr: bool :return: np.ndarray of shape (bin_num-1 x 2), bin centers, amplitude at bin centers .. py:method:: projection_2d(attr1, attr2, desc_weights, bins=[25, 25], range=None, normalize=True) :staticmethod: Project the probability amplitude onto a 2 coordinates, 2D Histogram. :param attr1: coordinate 1 to be projected onto (bond length, bond angle, etc.) :type attr: np.ndarray :param attr2: coordinate 2 to be projected onto (bond length, bond angle, etc.) :type attr: np.ndarray :param desc_weights: the descendant weights for \psi**2 :type desc_weights: np.ndarray :param bins: Number of bins for histogram in both directions (higher number, more number of walkers needed) :type attr: tuple :param range: Range over which attr is histogrammed :type range: list of two tuples :param normalize: Normalizes the wave function along both coordinates (integrated area under 2D surface is 1) :type attr: bool :return: np.ndarray of shape (bin_num-1 x 2), bin centers x, bin centers y, and then the 2D array with amplitude.