Takes the given Z Matrix coordinates and converts them to cartesian coordinates.
The first Atom end up in the origin, the second on on the x axis, and the third
one in the XY plane. The rest is added by applying the Zmatrix distances, angles
and dihedrals. Angles are in degrees.
distances - Array of distance variables of the Z matrix
angles - Array of angle variables of the Z matrix
dihedrals - Array of distance variables of the Z matrix
first_atoms - Array of atom ids of the first invoked atom in distance, angle and dihedral
second_atoms - Array of atom ids of the second invoked atom in angle and dihedral
third_atoms - Array of atom ids of the third invoked atom in dihedral