addition of function for determining cartesian based on dihedrals; revised angle determination based on linear algebra