When you calculate the e-e-d using gmx polystat, you will find the eigenvalues (say L1, L2 and L3) of radius of gyration tensor in the last three columns of the output file. Then, we can just use the standard asphericity formula as used in Loukas's JACS paper (eq 1). I wrote very simple shell script to calculate that for each frame. I think it will be much easier for you to implement in python. Here's the link for that paper
When you calculate the e-e-d using gmx polystat, you will find the eigenvalues (say L1, L2 and L3) of radius of gyration tensor in the last three columns of the output file. Then, we can just use the standard asphericity formula as used in Loukas's JACS paper (eq 1). I wrote very simple shell script to calculate that for each frame. I think it will be much easier for you to implement in python. Here's the link for that paper