pyvibdmc.simulation_utilities.xyz_npy ===================================== .. py:module:: pyvibdmc.simulation_utilities.xyz_npy Classes ------- .. autoapisummary:: pyvibdmc.simulation_utilities.xyz_npy.XYZNPY Module Contents --------------- .. py:class:: XYZNPY Handler of xyz <-> npy conversion, like a personal version of openBabel. .. py:method:: extract_xyz(file_name, num_atoms) :staticmethod: Extracts the coordinates from an xyz file and returns it as an np array of dimension nxmx3, where n = number of geometries, m = number of atoms, and 3 = cartesian coordinates :param file_name: Name of the .xyz file, including extension :type file_name: str :param num_atoms: Number of atoms in molecule. :type num_atoms: int :return: nxmx3 numpy array of coordinates .. py:method:: write_xyz(coords, fname, atm_strings, cmt=None) :staticmethod: Writes a numpy array of x,y,z coordinates to a .xyz file :param fname: name of xyz file :param coords: numpy array, either mx3 or nxmx3, where n = number of geometries and m = number of atoms :param atm_strings: list of strings that correspond to the atom type e.g. ["H","H","O"] :return: np.ndarray