script for angles

Hello

i am going to calculate all bend angles, dihedral angles and bond lenght for polymer chains.would you help me that how i can do that by scripting?

Thnaks