Skip to content
Snippets Groups Projects
Commit d5a79b0b authored by moritz.buchhorn's avatar moritz.buchhorn
Browse files

Minor changes

parent c58bdd43
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,17 @@ def make_fibonacci_sphere(center: np.ndarray, radius: float = 0.1, resolution: i
return x, y, z
class XYZ:
"""
A class for representing a molecular structure in cartesian coordinates.
The molecule is represented by a list of atoms and corresponding coordinates.
Attributes:
xyz (ndarray): A 2D numpy array of shape (num_atoms, 3) containing the
coordinates of the atoms in the molecule.
elements (list): A list of strings representing the elements of the atoms in
the molecule.
"""
sphere_mode = "ball"
def __init__(self, coords: list[dict[str, str|float]]):
......@@ -271,6 +282,13 @@ class XYZ:
return fig
class Trajectory:
"""
A class to represent a molecular trajectory in terms of XYZ objects.
Attributes:
coordinates (list[XYZ]): A list of XYZ objects representing the atomic coordinates for each frame in the trajectory.
vibration_vectors (list[list[float]] or None): A list of vibration vectors associated with the trajectory, if any.
"""
def __init__(self, coordinates: list[XYZ]):
self.coordinates = coordinates
self.vibration_vectors = None
......@@ -310,6 +328,7 @@ class Trajectory:
Args:
output_file (str): The path to the ORCA output file.
mode (int): The mode number.
Returns:
Trajectory: A Trajectory object.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment