Goal is to understand Protein Structures
This script employs the R programming language to analyze and visualize two molecular structures represented in coordinate files. It reads the structure data, parses the coordinates and labels, and plots the structures in a 3D environment. Principal Component Analysis (PCA) is conducted to determine the principal axes of the structures, and the script calculates the radius of gyration for both structures. Furthermore, it aligns the structures using rotation matrices based on their principal axes and computes the Root Mean Square Deviation (RMSD) to evaluate the alignment quality. The script also generates new structure data files for the aligned models. Finally, it visualizes the original and aligned structures.