Build a shoebox model

Hi all,

I want to build a shoebox model to express the molecular size.Below I quote the statement in the literature for convenience:

"With this refined search, we applied our awk script 'shoebox', as explained in the main manuscript, that calculates D1, D2, D3 perpendicular molecular dimensions. For the original set of coordinates in the XYZ file, the script makes two rotations of the vector definining the two atoms that correspond to the largest intramolecular distance. Calculating the angles of this vector with [0,1,0] and [0,0,1] it is possible to make two rotations that project this vector along [1,0,0] (Scheme S1). Finally, all atomic coordinates are shifted so that the mid point of the above vector is the new origin. Within the new coordinate system, the difference of maximum and minimum coordinates along x, y, and z, ordered from largest to lowest gives the values of D1, D2, D3. By not including any rotation (Scheme 1, left) the initial box (d1, d2) defining molecular size is incorrect. After the rotations, by aligning the largest intramolecular distance, what we call 'shoebox' gives a more accurate definition of molecular size (D1, D2; Scheme 1, right). We call the algorithm 'shoebox' because shoe boxes are designed to have the minimum D1, D2, D3 lengths, for cost saving.The absolute-minimum box would have D1 as the diagonal, and not one of the sides as in this case. Hence 'shoebox' is not the box of minimum volume. Similarly to our shoebox definition, shoe boxes do not have the minimum volume since this would imply to locate shoes diagonally."

How can I achieve the functions in the article?Attach relevant mol file and pictures.

Looking forward your reply!