process_lines
This module contains the functions that are used to parse the body of xyz formatted files. The functions are written in Cython and are compiled to C code.
Summary
Functions:
Function to parse the body of an xyz file. |
|
Function to parse the body of an xyz file. |
Reference
- process_lines(input, n_atoms)
Function to parse the body of an xyz file. The function expects a list of strings, where each string is a line in the file. The function will parse the lines and return a numpy array with the xyz coordinates of the atoms in the file.
- Parameters:
input (list) – A list of strings, where each string is a line in the xyz file.
n_atoms (int) – The number of atoms in the xyz file.
- Returns:
A numpy array with the xyz coordinates of the atoms in the file.
- Return type:
numpy.ndarray
- process_lines_with_atoms(input, n_atoms)
Function to parse the body of an xyz file. The function expects a list of strings, where each string is a line in the file. The function will parse the lines and return a tuple with two elements. The first element is a list of strings, where each string is the atom type of the corresponding atom in the xyz file. The second element is a numpy array with the xyz coordinates of the atoms in the file.
- Parameters:
input (list) – A list of strings, where each string is a line in the xyz file.
n_atoms (int) – The number of atoms in the xyz file.
- Returns:
A tuple with two elements. The first element is a list of strings, where each string is the atom type of the corresponding atom in the xyz file. The second element is a numpy array with the xyz coordinates of the atoms in the file.
- Return type:
tuple